At this point, we can generate an SD card image that is composed of an EFI system partition, a SquashFS root partition (a), a blank root partition (b), and a data partition. On the EFI system partition are the Raspberry Pi firmware and device trees, U-Boot and GRUB. The SquashFS filesystem contains the kernel and the whole filesystem tree. A Raspberry Pi can successfully boot from an SD card containing this image. It's not quite usable yet, because there's no writable storage available, or indeed any way to log in.
12 lines
255 B
INI
12 lines
255 B
INI
# vim: set ft=sh :
|
|
# vim: set sw=4 ts=4 sts=4 et:
|
|
|
|
load_env
|
|
regexp --set 1:disk '(.*),.*' $root
|
|
for dev in ($disk,gpt*); do
|
|
if [ -f $dev/boot/grub.cfg ]; then
|
|
probe --set partuuid --part-uuid $dev
|
|
source $dev/boot/grub.cfg
|
|
fi
|
|
done
|