The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "User:Pnoecker/Raspberry Pi 4"
(→Pre-boot Configuration: uboot me grub) |
|||
Line 183: | Line 183: | ||
==Booting the Raspberry Pi 4== | ==Booting the Raspberry Pi 4== | ||
{{console|body= | {{console|body= | ||
###i## /etc/init.d/busybox-ntpd restart | ###i## /etc/init.d/busybox-ntpd restart | ||
Line 194: | Line 191: | ||
Next, set your timezone: | Next, set your timezone: | ||
{{console|body= | {{console|body= | ||
###i## ln -sf /usr/share/zoneinfo/ | ###i## ln -sf /usr/share/zoneinfo/America/Detroit /etc/localtime | ||
}} | }} | ||
Line 213: | Line 200: | ||
###i## epro flavor server | ###i## epro flavor server | ||
}} | }} | ||
{{console|body= | {{console|body= | ||
###i## rc-update add dhcpcd default | |||
###i## rc-update add busybox-ntpd sysinit | ###i## rc-update add busybox-ntpd sysinit | ||
###i## rc-update add swclock boot | ###i## rc-update add swclock boot | ||
###i## rc-update del hwclock boot | ###i## rc-update del hwclock boot | ||
###i## rc-update del swap boot | |||
}} | }} | ||
Now you can follow the [[Funtoo Linux Installation|Funtoo Install documentation]] to continue configuring your system. You'll definitely want to look into {{Package|sys-devel/distcc}} if you are going to be adding lots of software to your system. | Now you can follow the [[Funtoo Linux Installation|Funtoo Install documentation]] to continue configuring your system. You'll definitely want to look into {{Package|sys-devel/distcc}} if you are going to be adding lots of software to your system. |
Revision as of 03:40, November 14, 2020
This guide draws heavily on Raspberry_Pi_2
What you need
- Raspberry PI 4
- An existing Linux install Undead_USB_Install built with fchroot is a solid choice if you do not have funtoo installed on a hard drive.
- A suitable SD card for your PI.
Prepare your SD card
List the device to be partitioned, mine is on /dev/sdc
root # lsblk -o name,size,label,partlabel
root # gdisk /dev/sdc
Command: o ↵ This option deletes all partitions and creates a new protective MBR. Proceed? (Y/N): y ↵
Command: n ↵ Partition Number: 1 ↵ First sector: ↵ Last sector: +1M ↵ Hex Code: EF02 ↵ Command: c ↵ Partition number: 1 Enter name: BIOS Boot
Command: n ↵ Partition Number: 2 ↵ First sector: ↵ Last sector: +384M ↵ Hex Code: EF00 ↵ Command: c ↵ Partition number: 2 Enter name: BOOT
Command: n ↵ Partition Number: 3 ↵ First sector: ↵ Last sector: ↵ Hex Code: 8305 ↵ Command: c ↵ Partition number: 3 Enter name: FUNTOO
Command: w ↵ Do you want to proceed? (Y/N): Y ↵
1007.0 KiB free space 1 1024.0 KiB BIOS boot partition BIOS Boot 2 256.0 MiB EFI System BOOT 3 29.5 GiB Linux ARM64 root (/) FUNTOO
write quit
Create File Systems
Next, we need to create file systems on the partitions:
root # mkfs.vfat -F 32 /dev/sdc2 root # fatlabel /dev/sdc2 "BOOT" root # mkfs.ext4 /dev/sdc3 root # e2label /dev/sdc3 "FUNTOO"
Prepare Your Boot Partition
Make mount points for your boot and root partitions on the SD card:
root # mkdir /mnt/funtoo
Mount your SD card:
root # mount /dev/sdc3 /mnt/funtoo root # mkdir /mnt/funtoo/boot root # mount /dev/sdc2 /mnt/funtoo/boot
Get the Funtoo Files Onto the SD Card
Download the Necessary Files
Grab the latest Arm64_generic stage 3 file: Subarches
root # cd /mnt/funtoo root # wget https://build.funtoo.org/1.4-release-std/arm-64bit/arm64_generic/2020-09-07/stage3-arm64_generic-1.4-release-std-2020-09-07.tar.xz
Extract the stage 3:
root # tar --numeric-owner --xattrs --xattrs-include='*' -xpf stage3*
Pre-boot Configuration
Edit your make.conf file to enable fchroot to compile:
/mnt/funtoo/etc/portage/make.conf
FEATURES="-pid-sandbox"
PORTAGE_TMPDIR="/run"
GRUB_PLATFORMS="uboot"
Edit your fstab file so everything mounts correctly on boot:
root # nano /mnt/funtoo/etc/fstab
/mnt/funtoo/etc/fstab
proc /proc proc defaults 0 0
LABEL=BOOT /boot vfat noauto,noatime 1 2
LABEL=FUNTOO / ext4 noatime 0 1
Chrooting into your new installation
for a good time install Package:Fchroot
as root, start the binfmt service:
root # /etc/init.d/binfmt restart
Finally perform the usually chroot routine (as described in detail in the Funtoo Linux Installation Guide):
root # cd /mnt/funtoo root # mount --rbind /run run root # fchroot .
- Set yo password
root # passwd && ego sync
root # echo "media-libs/raspberrypi-userland-bin **" >> /etc/portage/package.accept_keywords root # echo "sys-boot/raspberrypi-firmware **" >> /etc/portage/package.accept_keywords root # echo "sys-kernel/raspberrypi-image **" >> /etc/portage/package.accept_keywords root # emerge raspberrypi-userland-bin raspberrypi-firmware raspberrypi-image
root # emerge -avuND @world
root # nano /boot/config.txt
/boot/config.txt
arm_64bit=1
kernel=kernel8.img
disable_overscan=0
/boot/cmdline.txt
- Stifler's Momdwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=LABEL=FUNTOO rootfstype=ext4 elevator=deadline rootwait
Clean unmount
Make sure all buffers have been flushed and unmount the temp directories:
root # exit root # cd .. && sync root # umount -lR funtoo
Booting the Raspberry Pi 4
root # /etc/init.d/busybox-ntpd restart or root # date MMDDHHMMCCYY
Next, set your timezone:
root # ln -sf /usr/share/zoneinfo/America/Detroit /etc/localtime
Set your profile with epro:
root # epro list root # epro flavor server
root # rc-update add dhcpcd default root # rc-update add busybox-ntpd sysinit root # rc-update add swclock boot root # rc-update del hwclock boot root # rc-update del swap boot
Now you can follow the Funtoo Install documentation to continue configuring your system. You'll definitely want to look into No results if you are going to be adding lots of software to your system.