inindev / nanopi-r5

stock debian arm64 linux for the nanopi r5c & r5s
GNU General Public License v3.0
110 stars 17 forks source link

add ESP to boot image? #26

Open sarnold opened 1 year ago

sarnold commented 1 year ago

If you could add a small ESP to the disk image, then it would be possible to use u-boot(efi) => grub/EFI kernel instead of depending on just the u-boot commands for specific kernel images (eg, bootz or booti). Something like this works nicely:

echo 'label: gpt' | sudo sfdisk ${DISK}
echo -e '16M,512M,U\n,+,\n' | sudo sfdisk ${DISK}

Also, thanks for publishing this!

Edit: 512 MB is apparently the minimum recommended ESP size.

sarnold commented 10 months ago

The above is verified working on nanopi-r5c and roc-rk3328-cc booting from mmc and emmc (among others) as documented here.