User:Brendlefly62/Rockchip RK3399 Asus Tinker Board 2 S/Assemble a Gentoo System

From Gentoo Wiki
Jump to:navigation Jump to:search

"Re-use" your Armbian-built system to deploy Gentoo

Move the contents of the Armbian root filesystem, install gentoo stage 3, and restore boot directory. Start by mounting the boot media (SD Card) on another workstation that has internet connectivity. Note: if possible, use another arm64 system so subsequent chroot steps will be possible.

root #mount /dev/sdx1 /mnt/gentoo
root #cd /mnt/gentoo
root #mkdir armbian_rootfs
root #mv -v * /armbian_rootfs/ # ignore error about moving this directory into itself
root #cat stage3-*.DIGESTS
root #sha512sum stage3-armv7a-openrc-20231104T213159Z.tar.xz
(compare to saved hash)
  • (continue, basically as outlined in Gentoo Handbook (amd64)
root #tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner

Assemble a Gentoo system from scratch

  1. Prepare media (microSD card for u-boot, kernel, initramfs; optional additional media for rootfs -- project depicted at top of article employs a 128G pcie NVMe via USB stick, luks encrypted, with lvm volumes for Gentoo rootfs.)
  2. Install u-boot, kernel, and initramfs to boot device; optionally use serial console to observe u-boot handoff to initramfs and kernel
  3. Install Gentoo rootfs as stage3 (see above; follow handbook install process all the way to boot and add local user. Tune make.conf for this board)
  4. Install eselect-repository and add joetoo repo
  5. Install dev-embedded/tinker264-headless-meta::joetoo with USE=joetoo
  6. Verify CPU_FLAGS and COMMON_FLAGS with cpuid2cpuflags and resolve-march-native
  7. Install dev-util/joetoolkit::joetoo and use get_my_cflags.sh to double-check
  8. This will select joetoo-base/joetoo-meta::joetoo which installs standard software according to USE flags, and basic joetoo .conf files for these software packages. ==> configure those
  9. update with app-portage/jus::joetoo (joetoo update sequence)
  10. rebuild the entire system with rus (rebuild update sequence) script from app-portage/jus

(to do) See also this similar work for a different board -- User:Brendlefly62/Rockchip_RK3288_Asus_Tinker_Board_S/Assemble_a_Gentoo_System