Introduce the GRUB_MKIMAGE_OPTS variable to allow additional options
to be passed to grub-mkimage, making its behavior more configurable.
(for example, this allows disabling shim lock when necessary).
Update do_mkimage to use ${GRUB_MKIMAGE_OPTS}. This change reduce the
need for hardcoded modifications and makes future adjustments easier.
Signed-off-by: Valeria Petrov <valeria.petrov@spinetix.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN="
EXTRA_OECONF += "--enable-efiemu=no"
+# Define GRUB_MKIMAGE_OPTS variable for additional grub-mkimage options (e.g., disabling shim lock)
+GRUB_MKIMAGE_OPTS ?= ""
+
do_mkimage() {
cd ${B}
# built in cfg file provided via this recipe
grub-mkimage -v -c ${UNPACKDIR}/cfg -p ${EFIDIR} -d ./grub-core/ \
-O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
- ${GRUB_MKIMAGE_MODULES}
+ ${GRUB_MKIMAGE_OPTS} ${GRUB_MKIMAGE_MODULES}
}
addtask mkimage before do_install after do_compile