diff mbox series

grub-efi: support custom embedded grub configs

Message ID 20260418214910.47616-1-vince@underview.tech
State Changes Requested
Headers show
Series grub-efi: support custom embedded grub configs | expand

Commit Message

Vincent Davis April 18, 2026, 9:49 p.m. UTC
Adds support for including custom
embedded grub configs. The default one
provided in OE-core is limited to everything
being in the /EFI/BOOT directory.

Some users may want their modules
and configs in /boot/grub instead.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
---
 meta/recipes-bsp/grub/grub-efi_2.14.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ross Burton April 21, 2026, 12:31 p.m. UTC | #1
On 18 Apr 2026, at 22:49, Vincent Davis Jr via lists.openembedded.org <vince=underview.tech@lists.openembedded.org> wrote:
> 
> Adds support for including custom
> embedded grub configs. The default one
> provided in OE-core is limited to everything
> being in the /EFI/BOOT directory.

The cfg file is in SRC_URI, so you can do this with a simple bbappend to provide a replacement cfg file without any changes to the recipe.

Ross
Vincent Davis April 21, 2026, 4:48 p.m. UTC | #2
O yeah!!

We can drop this patch.
Don't know what I was thinking here.

Vincent

On Tue, Apr 21, 2026, 8:32 AM Ross Burton <Ross.Burton@arm.com> wrote:

> On 18 Apr 2026, at 22:49, Vincent Davis Jr via lists.openembedded.org
> <vince=underview.tech@lists.openembedded.org> wrote:
> >
> > Adds support for including custom
> > embedded grub configs. The default one
> > provided in OE-core is limited to everything
> > being in the /EFI/BOOT directory.
>
> The cfg file is in SRC_URI, so you can do this with a simple bbappend to
> provide a replacement cfg file without any changes to the recipe.
>
> Ross
diff mbox series

Patch

diff --git a/meta/recipes-bsp/grub/grub-efi_2.14.bb b/meta/recipes-bsp/grub/grub-efi_2.14.bb
index 6354b43989..8fcc7aa01d 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.14.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.14.bb
@@ -48,6 +48,7 @@  EXTRA_OECONF += "--enable-efiemu=no"
 
 # Define GRUB_MKIMAGE_OPTS variable for additional grub-mkimage options (e.g., disabling shim lock)
 GRUB_MKIMAGE_OPTS ?= ""
+EMBEDDED_GRUB_CONFIG ?= "${UNPACKDIR}/cfg"
 
 do_mkimage() {
 	cd ${B}
@@ -63,7 +64,7 @@  do_mkimage() {
 
 	# Search for the grub.cfg on the local boot media by using the
 	# built in cfg file provided via this recipe
-	grub-mkimage -v -c ${UNPACKDIR}/cfg -p ${EFIDIR} -d ./grub-core/ \
+	grub-mkimage -v -c ${EMBEDDED_GRUB_CONFIG} -p ${EFIDIR} -d ./grub-core/ \
 	               -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
 	               ${GRUB_MKIMAGE_OPTS} ${GRUB_MKIMAGE_MODULES}
 }