diff --git a/tools/osbuilder/Makefile b/tools/osbuilder/Makefile index ae7baf72054a..e172f7c160f8 100644 --- a/tools/osbuilder/Makefile +++ b/tools/osbuilder/Makefile @@ -9,6 +9,7 @@ ROOTFS_BUILDER := $(MK_DIR)/rootfs-builder/rootfs.sh INITRD_BUILDER := $(MK_DIR)/initrd-builder/initrd_builder.sh IMAGE_BUILDER := $(MK_DIR)/image-builder/image_builder.sh IGVM_BUILDER := $(MK_DIR)/igvm-builder/igvm_builder.sh +IGVM_SVN ?= 0 DISTRO ?= ubuntu BUILD_METHOD := distro @@ -165,7 +166,7 @@ $(DRACUT_OVERLAY_DIR): .PHONY: igvm igvm: $(TARGET_IMAGE) - $(IGVM_BUILDER) -o $(IGVM_BUILD_DEST) -s 0 + $(IGVM_BUILDER) -o $(IGVM_BUILD_DEST) -s $(IGVM_SVN) .PHONY: test test: diff --git a/tools/osbuilder/node-builder/azure-linux/README.md b/tools/osbuilder/node-builder/azure-linux/README.md index b03409424d47..357a8e2f2b59 100644 --- a/tools/osbuilder/node-builder/azure-linux/README.md +++ b/tools/osbuilder/node-builder/azure-linux/README.md @@ -145,6 +145,7 @@ The `all[-confpods]` target runs the targets `package[-confpods]` and `uvm[-conf Notes: - To retrieve more detailed build output, prefix the make commands with `DEBUG=1`. - To build for Azure Linux 3, prefix the make commands that build artifacts with `OS_VERSION=3.0` + - To build an IGVM file for CondPods with a non-default SVN of 0, prefix the `make uvm-confpods` command with `IGVM_SVN=` - For build and deployment of both Kata and Kata-CC artifacts, first run the `make all` and `make deploy` commands to build and install the Kata Containers for AKS components followed by `make clean`, and then run `make all-confpods` and `make deploy-confpods` to build and install the Confidential Containers for AKS components - or vice versa (using `make clean-confpods`). # Run Kata (Confidential) Containers diff --git a/tools/osbuilder/node-builder/azure-linux/uvm_build.sh b/tools/osbuilder/node-builder/azure-linux/uvm_build.sh index 3a6c2d066927..6774856ba469 100755 --- a/tools/osbuilder/node-builder/azure-linux/uvm_build.sh +++ b/tools/osbuilder/node-builder/azure-linux/uvm_build.sh @@ -11,6 +11,7 @@ set -o errtrace [ -n "$DEBUG" ] && set -x CONF_PODS=${CONF_PODS:-no} +IGVM_SVN=${IGVM_SVN:-0} script_dir="$(dirname $(readlink -f $0))" repo_dir="${script_dir}/../../../../" @@ -63,7 +64,7 @@ if [ "${CONF_PODS}" == "yes" ]; then echo "Building IGVM and UVM measurement files" pushd tools/osbuilder sudo chmod o+r root_hash.txt - sudo make igvm DISTRO=cbl-mariner + sudo make igvm DISTRO=cbl-mariner IGVM_SVN=${IGVM_SVN} popd else echo "Creating initrd based on rootfs"