X in /dev/mmcblkX == the device number (usually 0, 1, or 2) sudo su ( or su) parted /dev/mmcblkX mklabel gpt parted -a optimal /dev/mmcblkX unit mib mkpart Kernel 1 65 parted -a optimal /dev/mmcblkX unit mib mkpart root 65 100% cgpt add -i 1 -t kernel -l Kernel -S 1 -T 5 -P 15 /dev/mmcblkX cryptsetup -v -c serpent-xts-plain64 -s 512 --hash whirlpool --iter-time 5000 --use-random luksFormat --type luks2 --pbkdf argon2id /dev/mmcblkXp2 cryptsetup luksOpen /dev/mmcblkX root mkfs.f2fs /dev/mapper/root mkdir /mnt/gentoo mount /dev/mapper/root /mnt/gentoo cd /mnt/gentoo wget http://distfiles.gentoo.org/experimental/arm/musl/stage3-armv7a_hardfp-musl-hardened-20200112.tar.bz2 tar xvjpf stage3-*.tar.bz2 --xattrs --numeric-owner cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf mount -t proc /proc /mnt/gentoo/proc mount --rbind /sys /mnt/gentoo/sys mount --rbind /dev /mnt/gentoo/dev # Note rslave is needed only for systemd profiles (I think) mount --make-rslave /mnt/gentoo/sys mount --make-rslave /mnt/gentoo/dev chroot /mnt/gentoo /bin/bash source /etc/profile emerge-webrsync