diff options
author | Diego Sueiro <diego.sueiro@arm.com> | 2022-03-11 18:07:12 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-12 09:20:03 +0000 |
commit | 7b68b6ff438b9b2aec12599d96f25eda5954b935 (patch) | |
tree | 4e8d2a7d056709d631a2e2c89d05d928c9d311d5 /meta/recipes-bsp/grub | |
parent | eae11483f9b3ea4b817d6564ac162eddb47608ae (diff) | |
download | poky-7b68b6ff438b9b2aec12599d96f25eda5954b935.tar.gz |
grub-efi: Add option to include all available modules
Include all available modules If 'all' is present in GRUB_BUILDIN variable.
To achieve this we need to search for all .mod files in ${B}/grub-core/ and
pass them to grub-mkimage command.
Also, add the verbose option to grub-mkimage.
(From OE-Core rev: ed1bf9aa0af8c12905cf8332bbbb212ab158fe3c)
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/grub')
-rw-r--r-- | meta/recipes-bsp/grub/grub-efi_2.06.bb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/meta/recipes-bsp/grub/grub-efi_2.06.bb b/meta/recipes-bsp/grub/grub-efi_2.06.bb index df5f23e22e..9857e8e036 100644 --- a/meta/recipes-bsp/grub/grub-efi_2.06.bb +++ b/meta/recipes-bsp/grub/grub-efi_2.06.bb | |||
@@ -46,11 +46,21 @@ EXTRA_OECONF += "--enable-efiemu=no" | |||
46 | 46 | ||
47 | do_mkimage() { | 47 | do_mkimage() { |
48 | cd ${B} | 48 | cd ${B} |
49 | |||
50 | GRUB_MKIMAGE_MODULES="${GRUB_BUILDIN}" | ||
51 | |||
52 | # If 'all' is included in GRUB_BUILDIN we will include all available grub2 modules | ||
53 | if [ "${@ bb.utils.contains('GRUB_BUILDIN', 'all', 'True', 'False', d)}" = "True" ]; then | ||
54 | bbdebug 1 "Including all available modules" | ||
55 | # Get the list of all .mod files in grub-core build directory | ||
56 | GRUB_MKIMAGE_MODULES=$(find ${B}/grub-core/ -type f -name "*.mod" -exec basename {} .mod \;) | ||
57 | fi | ||
58 | |||
49 | # Search for the grub.cfg on the local boot media by using the | 59 | # Search for the grub.cfg on the local boot media by using the |
50 | # built in cfg file provided via this recipe | 60 | # built in cfg file provided via this recipe |
51 | grub-mkimage -c ../cfg -p ${EFIDIR} -d ./grub-core/ \ | 61 | grub-mkimage -v -c ../cfg -p ${EFIDIR} -d ./grub-core/ \ |
52 | -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \ | 62 | -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \ |
53 | ${GRUB_BUILDIN} | 63 | ${GRUB_MKIMAGE_MODULES} |
54 | } | 64 | } |
55 | 65 | ||
56 | addtask mkimage before do_install after do_compile | 66 | addtask mkimage before do_install after do_compile |
@@ -70,6 +80,7 @@ do_install() { | |||
70 | install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}${EFI_FILES_PATH}/${GRUB_IMAGE} | 80 | install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}${EFI_FILES_PATH}/${GRUB_IMAGE} |
71 | } | 81 | } |
72 | 82 | ||
83 | # To include all available modules, add 'all' to GRUB_BUILDIN | ||
73 | GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \ | 84 | GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \ |
74 | efi_gop iso9660 configfile search loadenv test" | 85 | efi_gop iso9660 configfile search loadenv test" |
75 | 86 | ||