Refactor tar.gz image option
PATCH v2 1/1 Refactor tar.gz image option
From: Jan Kiszka <[email protected]>
We have wic-targz.img, we have targz-img - that'c confusion. What we need is a way to say "generate (also) tarball of the image" so that we can feed LAVA specifically. If the normal target image is wic or already a raw partition (simple QEMU targets) should not matter.
So, consolidate the kas options and the kconfig menu. Furthermore, simplify the CI options so that tarballs are by default on and turn it off actively in case that format has no user or cannot work in the first place.
Signed-off-by Jan Kiszka <[email protected]>
---
Changes in v2:
- fix kconfig menu, making targz now depend on the absence of swupdate
.gitlab-ci.yml | 40 +++++++---------------------
Kconfig | 27 +++++++------------
kas/opt/{targz-img.yml => targz.yml} | 4 +--
kas/opt/wic-targz-img.yml | 20 --------------
4 files changed, 21 insertions(+), 70 deletions(-)
rename kas/opt/{targz-img.yml => targz.yml} (71%)
delete mode 100644 kas/opt/wic-targz-img.yml.gitlab-ci.yml +10 -30
@@ -20,8 +20,7 @@ variables: extension: none use_rt: enable encrypt: disable - wic_targz: enable - targz: disable + targz: enable dtb: none deploy: enable deploy_kernelci: disable
@@ -58,8 +57,7 @@ default: script: - if [ "${use_rt}" = "enable" ]; then base_yaml="${base_yaml}:kas/opt/rt.yml"; fi - if [ "${extension}" != "none" ]; then base_yaml="${base_yaml}:kas/opt/${extension}.yml"; fi - - if [ "${wic_targz}" = "enable" ]; then base_yaml="${base_yaml}:kas/opt/wic-targz-img.yml"; fi - - if [ "${targz}" = "enable" ]; then base_yaml="${base_yaml}:kas/opt/targz-img.yml"; fi + - if [ "${targz}" = "enable" ]; then base_yaml="${base_yaml}:kas/opt/targz.yml"; fi - if [ "${release}" = "buster" ]; then base_yaml="${base_yaml}:kas/opt/buster.yml"; fi - if [ "${release}" = "bullseye" ]; then base_yaml="${base_yaml}:kas/opt/bullseye.yml"; fi - if [ "${release}" = "bookworm" ]; then base_yaml="${base_yaml}:kas/opt/bookworm.yml"; fi
@@ -111,8 +109,6 @@ build:qemu-amd64-base: target: qemu-amd64 extension: security use_rt: disable - wic_targz: disable - targz: enable build_swu_v2: enable build:qemu-amd64-base-kernelci:
@@ -122,8 +118,6 @@ build:qemu-amd64-base-kernelci: target: qemu-amd64 extension: kernelci use_rt: disable - wic_targz: disable - targz: enable deploy: disable deploy_kernelci: enable
@@ -134,8 +128,6 @@ build:qemu-arm64-base: target: qemu-arm64 extension: security use_rt: disable - wic_targz: disable - targz: enable build_swu_v2: enable build:qemu-arm64-base-kernelci:
@@ -145,8 +137,6 @@ build:qemu-arm64-base-kernelci: target: qemu-arm64 extension: kernelci use_rt: disable - wic_targz: disable - targz: enable deploy: disable deploy_kernelci: enable
@@ -157,8 +147,6 @@ build:qemu-arm-base: target: qemu-arm extension: security use_rt: disable - wic_targz: disable - targz: enable build_swu_v2: enable build:qemu-arm-base-kernelci:
@@ -168,8 +156,6 @@ build:qemu-arm-base-kernelci: target: qemu-arm extension: kernelci use_rt: disable - wic_targz: disable - targz: enable deploy: disable deploy_kernelci: enable
@@ -211,8 +197,6 @@ build:qemu-amd64-test: variables: target: qemu-amd64 extension: test - wic_targz: disable - targz: enable build:qemu-arm64-test: extends:
@@ -220,8 +204,6 @@ build:qemu-arm64-test: variables: target: qemu-arm64 extension: test - wic_targz: disable - targz: enable build:qemu-arm-test: extends:
@@ -229,8 +211,6 @@ build:qemu-arm-test: variables: target: qemu-arm extension: test - wic_targz: disable - targz: enable # secure boot images build:qemu-amd64-secure-boot:
@@ -240,7 +220,7 @@ build:qemu-amd64-secure-boot: target: qemu-amd64 extension: ebg-secure-boot-snakeoil use_rt: disable - wic_targz: disable + targz: disable deploy: disable build:qemu-amd64-secure-boot-encrypt:
@@ -250,7 +230,7 @@ build:qemu-amd64-secure-boot-encrypt: target: qemu-amd64 extension: ebg-secure-boot-snakeoil use_rt: disable - wic_targz: disable + targz: disable deploy: disable encrypt: enable
@@ -261,7 +241,7 @@ build:qemu-amd64-swupdate: target: qemu-amd64 extension: ebg-swu use_rt: disable - wic_targz: disable + targz: disable deploy: disable # secure boot images arm64
@@ -272,7 +252,7 @@ build:qemu-arm64-secure-boot: target: qemu-arm64 extension: ebg-secure-boot-snakeoil use_rt: disable - wic_targz: disable + targz: disable deploy: disable # secure boot images arm
@@ -283,7 +263,7 @@ build:qemu-arm-secure-boot: target: qemu-arm extension: ebg-secure-boot-snakeoil use_rt: disable - wic_targz: disable + targz: disable deploy: disable # bullseye images
@@ -312,7 +292,7 @@ build:qemu-amd64-secure-boot-bullseye: target: qemu-amd64 extension: ebg-secure-boot-snakeoil use_rt: disable - wic_targz: disable + targz: disable deploy: disable swupdate_version: "2022.12"
@@ -342,7 +322,7 @@ build:qemu-amd64-secure-boot-buster: target: qemu-amd64 extension: ebg-secure-boot-snakeoil use_rt: disable - wic_targz: disable + targz: disable deploy: disable encrypt: enable
@@ -354,7 +334,7 @@ build:qemu-riscv64: target: qemu-riscv64 release: sid use_rt: disable - wic_targz: disable + targz: disable deploy: disable cve-checks:
Kconfig +9 -18
@@ -151,23 +151,6 @@ config KAS_INCLUDE_DEBIAN comment "Image features" -choice - prompt "Image formats" - default IMAGE_FLASH - -config IMAGE_FLASH - bool "Flashable image" - -config IMAGE_ARTIFACTS - bool "Separate artifacts for NFS boot" - -endchoice - -config KAS_INCLUDE_IMAGE_FORMAT - string - default "kas/opt/targz-img.yml" if IMAGE_ARTIFACTS && (TARGET_QEMU_AMD64 || TARGET_QEMU_ARM64 || TARGET_QEMU_ARM) - default "kas/opt/wic-targz-img.yml" if IMAGE_ARTIFACTS && !(TARGET_QEMU_AMD64 || TARGET_QEMU_ARM64 || TARGET_QEMU_ARM) - config IMAGE_SECURITY bool "Security extensions" select IMAGE_DATA_ENCRYPTION
@@ -186,7 +169,7 @@ config KAS_INCLUDE_TESTING string default "kas/opt/test.yml" if IMAGE_TESTING -if IMAGE_FLASH && !KERNEL_4_4 && !KERNEL_4_19 +if !KERNEL_4_4 && !KERNEL_4_19 config IMAGE_SWUPDATE bool "SWUpdate support for root partition"
@@ -242,3 +225,11 @@ config KAS_INCLUDE_FULL_ENCRYPTION default "kas/opt/encrypt-all.yml" if IMAGE_FULL_ENCRYPTION endif + +config IMAGE_TAR_FORMAT + bool "Separate artifacts for NFS boot" + depends on !IMAGE_SWUPDATE + +config KAS_INCLUDE_TAR_FORMAT + string + default "kas/opt/targz.yml" if IMAGE_TAR_FORMAT
kas/opt/targz.yml renamed from kas/opt/targz-img.yml +2 -2
@@ -1,7 +1,7 @@ # # CIP Core, generic profile # -# Copyright (c) Siemens AG, 2019 +# Copyright (c) Siemens AG, 2019-2024 # # Authors: # Quirin Gylstorff <[email protected]>
@@ -14,4 +14,4 @@ header: local_conf_header: image-type: | - IMAGE_FSTYPES = "tar.gz" + IMAGE_FSTYPES:append = " tar.gz"
kas/opt/wic-targz-img.yml deleted +0 -20
@@ -1,20 +0,0 @@ -# -# CIP Core, generic profile -# -# Copyright (c) Siemens AG, 2019 -# -# Authors: -# Quirin Gylstorff <[email protected]> -# -# SPDX-License-Identifier: MIT -# - -header: - version: 14 - -# lava uses nfs to deploy the image. For this we need a tarball instead of -# full image - -local_conf_header: - image-type: | - IMAGE_FSTYPES = "wic tar.gz"
Signature · 1 line
2.35.3