mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-17 14:58:16 +00:00
kernel: measured rootfs as argument to build-kernel.sh
By convention the caller of tools/packaging/kernel/build-kernel.sh changes the script behavior by passing arguments, whereas, for measured rootfs it has used an environment variable (MEASURED_ROOTFS). This refactor the script so that the caller now must pass the "-m" argument to enable the build of the kernel with measured rootfs support. Fixes #6674 Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This commit is contained in:
@@ -300,7 +300,7 @@ install_cached_kernel_tarball_component() {
|
||||
install_kernel_helper() {
|
||||
local kernel_version_yaml_path="${1}"
|
||||
local kernel_name="${2}"
|
||||
local extra_cmd=${3}
|
||||
local extra_cmd="${3:-}"
|
||||
|
||||
export kernel_version="$(get_from_kata_deps ${kernel_version_yaml_path})"
|
||||
export kernel_kata_config_version="$(cat ${repo_root_dir}/tools/packaging/kernel/kata_config_version)"
|
||||
@@ -317,6 +317,9 @@ install_kernel_helper() {
|
||||
if [ "${MEASURED_ROOTFS}" == "yes" ]; then
|
||||
info "build initramfs for cc kernel"
|
||||
"${initramfs_builder}"
|
||||
# Turn on the flag to build the kernel with support to
|
||||
# measured rootfs.
|
||||
extra_cmd+=" -m"
|
||||
fi
|
||||
|
||||
info "build ${kernel_name}"
|
||||
|
Reference in New Issue
Block a user