Changes

Jump to: navigation, search

Draft Funtoo Install on RPI/Configure

1,399 bytes added, 1 year ago
no edit summary
There are two ways to approach configuration. Here we alter files and symlinks in {{c|$SYSROOT/etc}} directly from the operating system we are working under to do the install. This is most flexible. Further configuration using Funtoo tools can be done on the pi itself once it is booted.
Alternatively, we could also chroot into $SYSROOT using QEMU with binary translation of arm binaries in the stage3 to the architecture of the machine you are working to do the install. Then one can install packages, edit files and use {{c|rc-update}} directly to set up services using Funtoo provided services directlywith the stage3.``
==== Set Up Mount Points ====
Alter {{c|$SYSROOT/etc/fstab}} as follows. We remove the swap, and alter the storage device name and partition file types. We also remove the {{c|/dev/cdrom}} device.
{{warning|No swap is configured. If you need to control out of memory conditions (e.g. when compiling chromium) you need to configure a swap parition or use {{Package|sys-block/zram-init}}. A partition must also be created and formatted on the device (probably on the sd card, but usb block memory devices can be used if necessary). }}
==== Set Up Mount Points ====
Alter {{c|$SYSROOT/etc/fstab}} as follows. We remove the swap, and alter the storage device name and partition file types. We also remove the {{c|/dev/cdrom}} device.
{{warning|No swap is configured. If you need to control out of memory conditions (e.g. when compiling chromium) you need to configure a swap parition or use {{Package|sys-block/zram-init}}. A partition must also be created and formatted on the device (probably on the sd card, but usb block memory devices can be used if necessary). }}
/dev/mmcblk0p1 /boot vfat noauto,noatime 1 2
/dev/mmcblk0p2 / ext4 noatime 0 1
}}
We can use Most of the following examples use {{Package|sys-apps/sed}} codeto present the simple subsitutions in a simple form.
{{console|body=
###i## sed -i "s/\/dev\/sda1.*/\/dev\/mmcblk0p1 \/boot vfat defaults 0 2/" ${SYSROOT}/etc/fstab
###i## sed -i "s/\/dev\/sda3.*/\/dev\/mmcblk0p2 \/ ext4 defaults 0 1/" ${SYSROOT}/etc/fstab
###i## sed -i "s/\#\/dev\/cdrom.*//" ${SYSROOT}/etc/fstab
}}
==== Set Up Root Password ====
{{console|body=
###i## sed -i "s{{!}}root\:\*{{!}}root\:`(openssl passwd -1)`{{!}}" $SYSROOT/etc/shadow
}}
==== Set Up Networking ====
We add dhcpcd as a default runlevel service.
{{console|body=
###i## ln -sf /etc/init.d/dhcpcd ${SYSROOT}/etc/runlevels/default
}}
==== Set Up SSH Access ====
If you want to ssh to the board as root, you need to allow it explicitly and we add sshd as a default runlevel service.
{{console|body=
###i## echo "PermitRootLogin yes" >> ${SYSROOT}/etc/ssh/sshd_config
###i## ln -sf /etc/init.d/sshd ${SYSROOT}/etc/runlevels/default~
}}
==== Set Up the Software Clock ====
Let's set up the software clock. This is Raspberry Pi specific, and due to its lack of a stock RTC chipset. This has ramifications for maintaining the correct time via a pacakge like {{Package|net-misc/openntpd}}, {{Package|net-misc/ntp}}. or {{Package|net-misc/chrony}}. A simple solution is using {{Package|net-misc/ntpclient}} to set the time at startup.
{{console|body=
###i## ln -sf /etc/init.d/swclock ${SYSROOT}/etc/runlevels/boot
###i## ln -sf /etc/init.d/sshd ${SYSROOT}/etc/runlevels/default~
}}
==== Set Up the Software Clock ====
Let's set up the software clock. This is Raspberry Pi specific, and due to its lack of a stock RTC chipset. This has ramifications for maintaining the correct time via a pacakge like {{Package|net-misc/openntpd}}, {{Package|net-misc/ntp}}.or {{Package|net-misc/chrony}}. A simple solution is using {{Package|net-misc/ntpclient}} to set the time at startup.{{console|body=###i## ln -sf /etc/init.d/swclock ${SYSROOT}/etc/runlevels/boot###i## rm ${SYSROOT}/etc/runlevels/boot/hwclock###i## mkdir -p ${SYSROOT}/lib/rc/cache###i## touch ${SYSROOT}/lib/rc/cache/shutdowntime}}==== Disable Serial Console Access ====Let's prevent serial consoles from spawning. If you have a need for this, you'll be able to set it up yourself.{{console|body=###i## sed -i "s/s0\:.*/\#&/" ${SYSROOT}/etc/inittab
}}
==== Link to Accelerated Video Libraries ====
}}
== Install Binary Kernel, Modules and dtbs =={{console|body=###i## mkdir -p ${SYSROOT}/boot/overlays###i## cp ${KERNEL_WORK}/firmware/boot/dts/*.dtb ${SYSROOT}/boot/###i## cp ${KERNEL_WORK}/firmware/boot/dts/overlays/*.dtb* ${SYSROOT}/boot/overlays/###i## cp ${KERNEL_WORK}/firmware/boot/dts/overlays/README ${SYSROOT}/boot/overlays/###i## cp ${KERNEL_WORK}/firmware/boot/kernel7.img ${SYSROOT}/boot/}} Next: [[Draft_Funtoo_Install_on_RPI/Kernel|Install Binary Kernel, Modules and dtbs|]]
wiki-users
780
edits

Navigation menu