diff options
author | Jinliang Li <jinliang.li@linux.alibaba.com> | 2018-06-25 17:49:50 +0800 |
---|---|---|
committer | Jia Zhang <zhang.jia@linux.alibaba.com> | 2018-06-26 09:40:48 +0800 |
commit | 1812c8755bd02f14f18518da13f8f09acc40ded1 (patch) | |
tree | bc46ff3c74974af70053787d69109e9e67a6c49d /meta-efi-secure-boot | |
parent | 33ec1d1f82cc783fc9640d4105795d85f52213f9 (diff) | |
download | meta-secure-core-1812c8755bd02f14f18518da13f8f09acc40ded1.tar.gz |
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 <jinliang.li@linux.alibaba.com>
Diffstat (limited to 'meta-efi-secure-boot')
-rw-r--r-- | meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend | 6 |
1 files changed, 6 insertions, 0 deletions
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() { | |||
76 | sed -i 's/^\s*linux\s\+.*bzImage.*/& ima_policy=tcb/g' "$menu" | 76 | sed -i 's/^\s*linux\s\+.*bzImage.*/& ima_policy=tcb/g' "$menu" |
77 | } | 77 | } |
78 | 78 | ||
79 | # Replace the root parameter in boot command line with BOOT_CMD_ROOT, | ||
80 | # which can be configured. It is helpful when secure boot is enabled. | ||
81 | [ -n "${BOOT_CMD_ROOT}" ] && { | ||
82 | sed -i "s,root=/dev/hda2,root=${BOOT_CMD_ROOT},g" "$menu" | ||
83 | } | ||
84 | |||
79 | # Install the stacked grub configs. | 85 | # Install the stacked grub configs. |
80 | install -d "${D}${EFI_BOOT_PATH}" | 86 | install -d "${D}${EFI_BOOT_PATH}" |
81 | install -m 0600 "${WORKDIR}/grub-efi.cfg" "${D}${EFI_BOOT_PATH}/grub.cfg" | 87 | install -m 0600 "${WORKDIR}/grub-efi.cfg" "${D}${EFI_BOOT_PATH}/grub.cfg" |