Skip to content

Commit 27a3f36

Browse files
rootfs: simplify GRUB config for DTB-agnostic combined-DTB boot
Update build-ubuntu-rootfs.sh to align the generated GRUB configuration with the new UEFI-based combined DTB flow. Changes: - Replace the previous GRUB setup (three menu entries for EVK, CRD and QLI, each with an explicit devicetree directive) with a single, DTB-agnostic menu entry: "Ubuntu ${CODENAME}". - Drop the CRD/EVK-specific DTB path variables: /lib/firmware/$kernel_ver/device-tree/x1e80100-crd.dtb /lib/firmware/$kernel_ver/device-tree/hamoa-iot-evk.dtb since GRUB no longer selects or loads DTBs directly. - Keep the existing kernel command line (root=LABEL=system, cma, clock and power domain flags, efi=noruntime, etc.) and initrd handling unchanged. Rationale: With the introduction of a UEFI-loaded combined DTB image (dtb.bin), DTB selection now happens entirely at the firmware layer. GRUB only needs to locate the "system" filesystem label, load the appropriate vmlinuz/initrd pair and pass the standard kernel parameters. Removing per-board DTB handling in GRUB reduces duplication and prevents drift between what UEFI loads and what the bootloader assumes. Signed-off-by: Bjordis Collaku <[email protected]>
1 parent 57281a2 commit 27a3f36

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

rootfs/scripts/build-ubuntu-rootfs.sh

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -502,29 +502,11 @@ kernel_ver=$(basename "$KERNEL_DEB" \
502502
| sed 's|^linux-kernel-\(.*\)-arm64\.deb$|\1|' \
503503
| sed 's|-[0-9][0-9]*-[0-9][0-9]*$||')
504504
505-
crd_dtb_path=\"/lib/firmware/\$kernel_ver/device-tree/x1e80100-crd.dtb\"
506-
evk_dtb_path=\"/lib/firmware/\$kernel_ver/device-tree/hamoa-iot-evk.dtb\"
507-
508-
echo '[CHROOT] Writing GRUB configuration...'
505+
echo '[CHROOT] Writing GRUB configuration for single DTB-agnostic entry...'
509506
tee /boot/grub.cfg > /dev/null <<GRUBCFG
510507
set timeout=5
511-
set default=${CODENAME}_evk
512-
513-
menuentry \"Ubuntu ${CODENAME} IoT for X Elite EVK\" --id ${CODENAME}_evk {
514-
search --no-floppy --label system --set=root
515-
devicetree \$evk_dtb_path
516-
linux /boot/vmlinuz-\$kernel_ver earlycon console=ttyMSM0,115200n8 root=LABEL=system cma=128M rw clk_ignore_unused pd_ignore_unused efi=noruntime rootwait ignore_loglevel
517-
initrd /boot/initrd.img-\$kernel_ver
518-
}
519-
520-
menuentry \"Ubuntu ${CODENAME} IoT for X Elite CRD\" --id ${CODENAME}_crd {
521-
search --no-floppy --label system --set=root
522-
devicetree \$crd_dtb_path
523-
linux /boot/vmlinuz-\$kernel_ver earlycon console=ttyMSM0,115200n8 root=LABEL=system cma=128M rw clk_ignore_unused pd_ignore_unused efi=noruntime rootwait ignore_loglevel
524-
initrd /boot/initrd.img-\$kernel_ver
525-
}
526508
527-
menuentry \"Ubuntu QLI IoT for X Elite CRD\" --id QLI {
509+
menuentry "Ubuntu \${CODENAME}" {
528510
search --no-floppy --label system --set=root
529511
linux /boot/vmlinuz-\$kernel_ver earlycon console=ttyMSM0,115200n8 root=LABEL=system cma=128M rw clk_ignore_unused pd_ignore_unused efi=noruntime rootwait ignore_loglevel
530512
initrd /boot/initrd.img-\$kernel_ver

0 commit comments

Comments
 (0)