First working revision
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.
This commit is contained in:
12
boot/grub2/gen-grub-cfg.sh
Executable file
12
boot/grub2/gen-grub-cfg.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# vim: set sw=4 ts=4 sts=4 et :
|
||||
|
||||
vers=${BR2_EXTERNAL_AIMEEOS_VERSION}
|
||||
br2_vers=${BR2_VERSION_FULL}
|
||||
|
||||
cat > "${TARGET_DIR}"/boot/grub.cfg <<EOF
|
||||
menuentry "Aimee OS ${vers} (Buildroot ${br2_vers}) on \$dev" --class gnu-linux --id "id-\$partuuid" "\$dev" "\$partuuid" {
|
||||
set root="\$2"
|
||||
linux "/boot/zImage" root=PARTUUID=\$3 ro
|
||||
}
|
||||
EOF
|
||||
11
boot/grub2/grub.cfg
Normal file
11
boot/grub2/grub.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user