Skip to content

Commit

Permalink
tools: Enable setting IGVM SVN
Browse files Browse the repository at this point in the history
- Allow setting SVN parameter for IGVM build scripting

Signed-off-by: Manuel Huber <[email protected]>
  • Loading branch information
ms-mahuber committed Aug 22, 2024
1 parent f20dbb9 commit 08333aa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tools/osbuilder/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions tools/osbuilder/node-builder/azure-linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<number>`
- 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
Expand Down
3 changes: 2 additions & 1 deletion tools/osbuilder/node-builder/azure-linux/uvm_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}/../../../../"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 08333aa

Please sign in to comment.