From 1812c8755bd02f14f18518da13f8f09acc40ded1 Mon Sep 17 00:00:00 2001 From: Jinliang Li Date: Mon, 25 Jun 2018 17:49:50 +0800 Subject: Add root parameter configuration in boot command line. It is helpful when secure boot is enabled, because you can not modify boot command line after boot-menu.inc is signed before deploying. Signed-off-by: Jinliang Li --- meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'meta-efi-secure-boot') diff --git a/meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend b/meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend index 87ebc08..2890895 100644 --- a/meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend +++ b/meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend @@ -76,6 +76,12 @@ do_install_append_class-target() { sed -i 's/^\s*linux\s\+.*bzImage.*/& ima_policy=tcb/g' "$menu" } + # Replace the root parameter in boot command line with BOOT_CMD_ROOT, + # which can be configured. It is helpful when secure boot is enabled. + [ -n "${BOOT_CMD_ROOT}" ] && { + sed -i "s,root=/dev/hda2,root=${BOOT_CMD_ROOT},g" "$menu" + } + # Install the stacked grub configs. install -d "${D}${EFI_BOOT_PATH}" install -m 0600 "${WORKDIR}/grub-efi.cfg" "${D}${EFI_BOOT_PATH}/grub.cfg" -- cgit v1.2.3-54-g00ecf