kata-deploy: Add MEASURED_ROOTFS check

- Check MEASURED_ROOTFS is set before adding the cc_rootfs_verity
config

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman 2023-06-19 17:16:37 +01:00
parent 6350f49baf
commit a7fce537c7

View File

@ -389,6 +389,7 @@ install_cc_shimv2() {
export RUST_VERSION
export REMOVE_VMM_CONFIGS="acrn fc"
if [ "${MEASURED_ROOTFS}" == "yes" ]; then
extra_opts="DEFSERVICEOFFLOAD=true"
if [ -f "${repo_root_dir}/tools/osbuilder/root_hash_vanilla.txt" ]; then
root_hash=$(sudo sed -e 's/Root hash:\s*//g;t;d' "${repo_root_dir}/tools/osbuilder/root_hash_vanilla.txt")
@ -404,6 +405,9 @@ install_cc_shimv2() {
info "extra_opts: ${extra_opts}"
DESTDIR="${destdir}" PREFIX="${cc_prefix}" EXTRA_OPTS="${extra_opts}" "${shimv2_builder}"
else
DESTDIR="${destdir}" PREFIX="${cc_prefix}" "${shimv2_builder}"
fi
}
# Install static CC virtiofsd asset