kata-deploy: Add Makefile

Add makefile to document possible options to run.

e.g
Default: Create a kata tarball, it will build assets concurrently.
```
$ make

```

Create a tarball build for cloud-hypervisor.
```
$ make cloud-hypervisor
```

Signed-off-by: Carlos Venegas <jos.c.venegas.munoz@intel.com>
This commit is contained in:
Carlos Venegas 2021-06-29 15:13:27 +00:00
parent b9d2eea39b
commit 85987c6d79
2 changed files with 60 additions and 1 deletions

View File

@ -33,4 +33,10 @@ generate-protocols:
static-checks: build
bash ci/static-checks.sh
.PHONY: all default static-checks
binary-tarball:
make -f ./tools/packaging/kata-deploy/local-build/Makefile
install-binary-tarball:
make -f ./tools/packaging/kata-deploy/local-build/Makefile install
.PHONY: all default static-checks binary-tarball install-binary-tarball

View File

@ -0,0 +1,53 @@
# Copyright (c) 2021 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
MK_DIR := $(dir $(MK_PATH))
# Verbose build
V ?=
ifneq ($(V),)
SILENT_BUILD_FLAG =
else
SILENT_BUILD_FLAG = -s
endif
define BUILD
$(MK_DIR)/kata-deploy-binaries-in-docker.sh $(SILENT_BUILD_FLAG) --build=$1
endef
kata-tarball: | all-parallel merge-builds
all-parallel:
make -f $(MK_PATH) all -j$$(( $$(nproc) - 1 )) NO_TTY="true"
all: cloud-hypervisor firecracker kernel qemu rootfs-image rootfs-initrd shim-v2
cloud-hypervisor:
$(call BUILD,$@)
firecracker:
$(call BUILD,$@)
kernel:
$(call BUILD,$@)
qemu:
$(call BUILD,$@)
rootfs-image:
$(call BUILD,$@)
rootfs-initrd:
$(call BUILD,$@)
shim-v2:
$(call BUILD,$@)
merge-builds:
$(MK_DIR)/kata-deploy-merge-builds.sh build
install:
tar -xvf ./kata-static.tar.xz -C /