Changes

Jump to: navigation, search

Funtoo Linux Installation on RPI

8 bytes added, 2 months ago
Configure the Boot Parameters
# [[#Install Binary Kernel, Modules and dtbs]]
# [[#Cross-compile Kernel, Modules and dtbs from Source]]
# [[#Use QEMUTo chroot]]
# [[#Partition and Format an SDCard]]
# [[#Deploy Installation to SDCard]]
== Get the Bash Script (Or Not) ==
=== If You Want to Try the Script ===
Development code to automate completely the process of installing is available on [https://github.com/d4g33z/sysroot.git github]. The structure of the file {{c|sysroot.sh}} should roughly correspond to the information contained here in this document. The script contains enough functionality to:
* get the latest stage3 tarballand verify its integrity
* install necessary open and closed source firmware
* configure the system:
** rpi binary kernel, dtbs, and modules
** OR cross compile a kernel, modules and dtbs from source
* install QEMU and use binary translation to allowing allow the use of chroot for further tweaking
* partition and format an sdcard
* copy the bootable configured stage3 to the sdcard
Read the questions carefully and answer yes or no.
 
=== If You Want to Do it Yourself ===
Read the document here and follow the steps, referring {{c|sysroot.sh}} to reassure yourself of the correctness of the installer script.
== Create Your Installation Settings ==
SYSROOT_WORK=/mnt/shared/sysroots
STAGE3_URL=httphttps://ftpbuild.osuoslfuntoo.org/pub/funtoo/funtoo1.3-release-currentstd/arm-32bit/raspi3/2019-01-25/stage3-latestraspi3-1.3-release-std-2019-01-25.tar.xz
CHOST=armv7a-hardfloat-linux-gnueabi
CFLAGS="-O2 -pipe -march=armv7-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard"
INSTALL_VARS=(KERNEL_WORK RPI_KERN_BRANCH SYSROOT_WORK STAGE3_URL CHOST CFLAGS SDCARD_DEV)
}}
 
 
== Install the Stage 3 Tarball ==
###i## git clone --depth 1 https://github.com/RPi-Distro/firmware-nonfree ${KERNEL_WORK}/firmware-nonfree
###i## git --git-dir=${KERNEL_WORK}/firmware-nonfree/.git --work-tree=${KERNEL_WORK}/firmware-nonfree pull origin
###i## mkdir -p ${SYSROOT}/lib/firmware/brcm###i## cp -r ${KERNEL_WORK}/firmware-nonfree/brcm/brcmfmac43430-sdio.{bin,txt} ${SYSROOT}/lib/firmware/brcm
}}
==== Set Up Root Password ====
Here we interactively add a root password to log in with to {{c|$SYSROOT/etc/shadow}}.
{{warning|Occasionally this fails due to an unescaped sed control character in the password hash. Just try it until it works, or run the password generation separately from the shadow file editing, or actually fix it.}}
{{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.
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}}.
{{console|body=
###i## ln rc-sf /etc/init.d/update add swclock ${SYSROOT}/etc/runlevels/boot###i## rm ${SYSROOT}/etc/runlevels/rc-update del hwclock 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## cat > ${SYSROOT}/boot/cmdline.txt << EOF
\##i## dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait\##i## EOF
}}
}}
== Use QEMU To chroot ==
{{Package|app-emulation/qemu}} relies upon KVM and the associated kernel module, called either {{c|kvm_intel}} or {{c|kvm_amd}}, depending on the architecture the kernel is running on. Please see [[KVM]] to find out how to get these kernel modules loaded and virtualization working.
=== Install a QEMU Chroot ===
Bureaucrats, Administrators, wiki-admins, wiki-staff
6,213
edits

Navigation menu