diff mbox series

[master,2/2] meta-ti-bsp: wic: Add a new GRUB config for ti platforms

Message ID 20250908105315.19583-3-m-shah@ti.com
State Changes Requested
Delegated to: Ryan Eatmon
Headers show
Series Add recipes to build initramfs image | expand

Commit Message

Moteen Shah Sept. 8, 2025, 10:53 a.m. UTC
Add a new grub config for TI specific platforms. While,
only supporting to boot linux from filesystem on MMC for
now, it will support booting linux and initrd image from
OSPI, UFS later down the line. Hence, make a new config
altogether for easier development.

Signed-off-by: Moteen Shah <m-shah@ti.com>
---
 meta-ti-bsp/wic/sdimage-2part-efi.wks.in |  2 +-
 meta-ti-bsp/wic/ti-grub.cfg              | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
diff mbox series

Patch

diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
index ae38daa7..11912606 100644
--- a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
+++ b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
@@ -3,6 +3,6 @@ 
 # supports EFI.  Boot files are located in the first vfat partition with extra
 # reserved space.  We cannot use a GPT here.
 
-bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}"
+bootloader --configfile="ti-grub.cfg"
 part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M
 part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
diff --git a/meta-ti-bsp/wic/ti-grub.cfg b/meta-ti-bsp/wic/ti-grub.cfg
new file mode 100644
index 00000000..7fcaf275
--- /dev/null
+++ b/meta-ti-bsp/wic/ti-grub.cfg
@@ -0,0 +1,14 @@ 
+# Set timeout and default options
+set timeout=3
+set default=0
+set root_part=(hd0,msdos2)
+
+# Define paths to kernel and initrd in root partition
+set kernel_path="${root_part}/boot/Image"
+set initrd_path="${root_part}/boot/initrd.cpio"
+
+# Main boot entry
+menuentry "Boot Linux" {
+    linux ${kernel_path} root=/dev/disk/by-label/root rootwait rootfstype=ext4  
+    initrd ${initrd_path}
+}