@@ -6,9 +6,12 @@
# Authors:
# Christian Storm <christian.storm@siemens.com>
# Quirin Gylstorff <quirin.gylstorff@siemens.com>
+# Felix Moessbauer <felix.moessbauer@siemens.com>
#
# SPDX-License-Identifier: MIT
-ROOTFS_PARTITION_NAME ?= "${IMAGE_FULLNAME}.wic.p4.gz"
+SWU_ROOTFS_TYPE ?= "squashfs"
+SWU_ROOTFS_NAME ?= "${IMAGE_FULLNAME}"
+ROOTFS_PARTITION_NAME ?= "${SWU_ROOTFS_NAME}.${SWU_ROOTFS_TYPE}.gz"
SWU_IMAGE_FILE ?= "${DEPLOY_DIR_IMAGE}/${PN}-${DISTRO}-${MACHINE}.swu"
SWU_DESCRIPTION_FILE ?= "sw-description"
@@ -19,8 +22,7 @@ SWU_SIGNATURE_TYPE ?= "rsa"
BUILDCHROOT_IMAGE_FILE ?= "${PP_DEPLOY}/${@os.path.basename(d.getVar('SWU_IMAGE_FILE'))}"
-IMAGE_TYPEDEP:wic += "squashfs"
-IMAGE_TYPEDEP:swu = "wic"
+IMAGE_TYPEDEP:swu = "wic ${SWU_ROOTFS_TYPE}.gz"
IMAGER_INSTALL:swu += "cpio ${@'openssl' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}"
IMAGE_SRC_URI:swu = "file://${SWU_DESCRIPTION_FILE}.tmpl"
@@ -19,6 +19,7 @@ local_conf_header:
IMAGE_CLASSES += "verity"
IMAGE_FSTYPES = "wic"
IMAGE_TYPEDEP:wic += "verity"
+ SWU_ROOTFS_TYPE = "verity"
WKS_FILE = "${MACHINE}-efibootguard-secureboot.wks.in"
INITRAMFS_INSTALL:append = " initramfs-verity-hook"
# abrootfs cannot be installed together with verity
@@ -19,6 +19,7 @@ local_conf_header:
CIP_IMAGE_OPTIONS:append = " swupdate.inc"
wic-swu: |
+ IMAGE_TYPEDEP:wic += "squashfs"
IMAGE_FSTYPES += "swu"
WKS_FILE ?= "${MACHINE}-${SWUPDATE_BOOTLOADER}.wks.in"
INITRAMFS_INSTALL:append = " initramfs-squashfs-hook"
This patch reworks the generation of the swu file. Instead of using the rootfs partition created by wic, we directly use the squashfs rootfs as default. By that, we do not have to deploy the WIC partitions and also always select the correct rootfs independent of the partition number. This is especially relevant for embedded boards, where the first partitions contain the u-boot-spl and firmware. For use-cases with other fs formats (like verity), we support to overwrite the SWU_ROOTFS_NAME and SWU_ROOTFS_TYPE. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> --- classes/swupdate.bbclass | 8 +++++--- kas/opt/ebg-secure-boot-snakeoil.yml | 1 + kas/opt/swupdate.yml | 1 + 3 files changed, 7 insertions(+), 3 deletions(-)