Installing a Minimal Linux on the eMMC

You can use dd to copy a pre-built image onto the eMMC or you can just use debootstrap to create one from scratch. This can be useful if you don’t want that many services starting up by default:

e2fsck /dev/mmcblk0p2
mount /dev/mmcblk0p2 /mnt
debootstrap --arch=arm64 buster /mnt

Back in u-boot we can switch to using the rootfs on the eMMC, though still pulling kernel and device tree via tftp:

setenv emmcboot "setenv bootargs ${args_common} debug root=/dev/mmcblk0p2; dhcp ${loadaddr} Image-librem5-devkit; dhcp ${fdt_addr} librem5-devkit.dtb; booti ${loadaddr} - ${fdt_addr}"