Skip to content
Snippets Groups Projects

grub-efi-recipe,oniro-grub-bootconf-recipe : fusing grub-config into grub's binary .

Open Kareem Zarka requested to merge kzarka/oniro:config-fused-grub into kirkstone
Files
2
@@ -21,3 +21,27 @@ GRUB_BUILDIN:append = " squash4 halt echo"
# grub supports this arch. It doesn't support hardfp configuration that can't
# be forced into softfp with a compiler flag. qemuarm-efi defaults to softfp.
COMPATIBLE_HOST:qemuarm-efi = 'arm.*-(linux.*|freebsd.*)'
# Dependency on cdrtools-native in order to use mkisofs utility.
# Dependency on oniro-grub-bootconf in order to use Oniro-specific
# grub configuration.
do_mkimage[depends] += "\
cdrtools-native:do_populate_sysroot \
oniro-grub-bootconf:do_deploy \
"
# Embedding Oniro-specific override for grub's embedded configuration
# into grub's binary.
# In this way SysOTA will only need to update one file instead of two.
do_mkimage:append() {
# Generating an image for the stand-alone oniro-specific grub's
# configuration that needs to get embedded.
# In order for it to get embedded correctly.
mkdir -p grubcfgiso/boot/grub
cp ${DEPLOY_DIR_IMAGE}/grub.cfg grubcfgiso/boot/grub/grub.cfg
mkisofs -o grubcfgiso.img grubcfgiso
rm -rf grubcfgiso
grub-mkimage -v -m grubcfgiso.img -p ${EFIDIR} -d ./grub-core/ \
-O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
${GRUB_MKIMAGE_MODULES}
}
Loading