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 | |
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>
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend | 6 |
2 files changed, 10 insertions, 0 deletions
@@ -92,6 +92,10 @@ DEBUG_FLAGS_forcevariable = "" | |||
92 | IMAGE_INSTALL += "kernel-image-bzimage" | 92 | IMAGE_INSTALL += "kernel-image-bzimage" |
93 | USER_CLASSES_remove = "image-prelink" | 93 | USER_CLASSES_remove = "image-prelink" |
94 | 94 | ||
95 | # Uncomment this line to modify the root parameter in boot command line if the default one | ||
96 | # is not working for you. It is helpful when secure boot is enabled. | ||
97 | #BOOT_CMD_ROOT = "/dev/hda2" | ||
98 | |||
95 | III. Build meta-secure-core | 99 | III. Build meta-secure-core |
96 | =========================== | 100 | =========================== |
97 | 101 | ||
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" |