mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-15 22:08:47 +00:00
config: Add root hash value and measure config to kernel params
After we have a guest kernel with builtin initramfs which provide the rootfs measurement capability and Kata rootfs image with hash device, we need set related root hash value and measure config to the kernel params in kata configuration file. Fixes: #6674 Signed-off-by: Wang, Arron <arron.wang@intel.com>
This commit is contained in:
committed by
Fabiano Fidêncio
parent
0080588075
commit
f62b2670c0
@@ -485,7 +485,19 @@ install_shimv2() {
|
||||
|
||||
export GO_VERSION
|
||||
export RUST_VERSION
|
||||
DESTDIR="${destdir}" PREFIX="${prefix}" "${shimv2_builder}"
|
||||
|
||||
if [ "${MEASURED_ROOTFS}" == "yes" ]; then
|
||||
extra_opts="DEFSERVICEOFFLOAD=true"
|
||||
if [ -f "${repo_root_dir}/tools/osbuilder/root_hash.txt" ]; then
|
||||
root_hash=$(sudo sed -e 's/Root hash:\s*//g;t;d' "${repo_root_dir}/tools/osbuilder//root_hash.txt")
|
||||
root_measure_config="rootfs_verity.scheme=dm-verity rootfs_verity.hash=${root_hash}"
|
||||
extra_opts+=" ROOTMEASURECONFIG=\"${root_measure_config}\""
|
||||
fi
|
||||
|
||||
DESTDIR="${destdir}" PREFIX="${prefix}" EXTRA_OPTS="${extra_opts}" "${shimv2_builder}"
|
||||
else
|
||||
DESTDIR="${destdir}" PREFIX="${prefix}" "${shimv2_builder}"
|
||||
fi
|
||||
}
|
||||
|
||||
install_ovmf() {
|
||||
|
Reference in New Issue
Block a user