From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7142858516907163648 X-Received: by 2002:a05:6000:1541:b0:22a:3b77:6ef4 with SMTP id 1-20020a056000154100b0022a3b776ef4mr16211811wry.303.1663745662953; Wed, 21 Sep 2022 00:34:22 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:490a:0:b0:225:6559:3374 with SMTP id x10-20020a5d490a000000b0022565593374ls6240196wrq.2.-pod-prod-gmail; Wed, 21 Sep 2022 00:34:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4MWQZnq+S4buE6lpwA6b59zGEQQqzEFL0XqGxmc+RQg0iKPfJ2hd1Y7rLE5uqdjMSIcHM9 X-Received: by 2002:a05:6000:108f:b0:228:c680:47e4 with SMTP id y15-20020a056000108f00b00228c68047e4mr16870101wrw.593.1663745661600; Wed, 21 Sep 2022 00:34:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663745661; cv=none; d=google.com; s=arc-20160816; b=dYAH8THIdpOujcO2eAMWKP9l4A/dRqZmGcEbjlyXghD8etaPHK3730+gJTpADdXygr bBj7/dLexOeJdH/kUAdqkOhKFdfzN/fNlKTtZJLVO8zviXnxBqR8JjVqR4rZWTyJNjmb mJtbaPHlhVxWgBgjOlz0LQDY7cVOX4hAXnHvJTUdv/PG2kCJCqdu7d/+taZEE3wJAVkH a8gfKXfU+ecrvMXCe8TvzwcWQmFBtAG9aDBzQl4mGmAf4XSgt1MI+6LCv+hmPW4w2MJf Yl6gNOvG700MGZYB0ifUduA92ABbJQ70GqcPqyW0SffM2P7W8rHppzXczTWKbvecPFUU LKdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=qrWPim1PPHJFJ3lPEfvumdO6afTZ1+ouf6BW67Fh2rc=; b=BJIZsz56KjauVEgFYW8yE/10IEL2WFwWUm81FCIhufUCmjX8/IRgQZXH6b1y+tkCiF C58xNizPBq1xZkBiNxMBWiSpGjnqWM8rul+KVk7fq0uIGLnyIn64oCfASvQUm1wdGN3I Fq/C6dGh5aDe+682N5YdBx3giVMAuDgcvkrn6XgbHb5qB29GtNH3RTvm5srNsCT51jPb GM2XWVALp9FlC7lqS/WtPf2ve301YiePlTwXaA9v+McGiXXSmiv0fG1chMipZwGPvWrr vLmwPv/nOz25+04+zLxOo04iss0qJbZdeOICstJBz+sX1i6rLWhKM2MybTp5DFbb/8Dy vggg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=KI8VdZh8; spf=pass (google.com: domain of fm-72506-20220921073421b1d6b34f2304c4f4f3-voj7aj@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-72506-20220921073421b1d6b34f2304c4f4f3-VoJ7aj@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net. [185.136.64.226]) by gmr-mx.google.com with ESMTPS id az12-20020a05600c600c00b003b499f88f7esi102540wmb.1.2022.09.21.00.34.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Sep 2022 00:34:21 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-72506-20220921073421b1d6b34f2304c4f4f3-voj7aj@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) client-ip=185.136.64.226; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=KI8VdZh8; spf=pass (google.com: domain of fm-72506-20220921073421b1d6b34f2304c4f4f3-voj7aj@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-72506-20220921073421b1d6b34f2304c4f4f3-VoJ7aj@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 20220921073421b1d6b34f2304c4f4f3 for ; Wed, 21 Sep 2022 09:34:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=felix.moessbauer@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=qrWPim1PPHJFJ3lPEfvumdO6afTZ1+ouf6BW67Fh2rc=; b=KI8VdZh8Bc9VQ9LW3x5pjkRvToJvHKbeRsrIHF/bhm+EbJlYPEg6ZjNDjKUyJLKjdHCEPy yL6RVlrpxKEAMX5+DfUuKrYxOJ59LVBWEjFS/mRiM/+4RwVZ/du1gastg/1lZ9JOKURSTRqz C3fk/DaSSsRfoXW/Z+62G7vlTOekI=; From: Felix Moessbauer To: isar-users@googlegroups.com Cc: henning.schild@siemens.com, jan.kiszka@siemens.com, ibr@ilbers.de, amikan@ilbers.de, adriaan.schmidt@siemens.com, Felix Moessbauer Subject: [PATCH v6 4/6] add option to control deploy of raw wic partitions Date: Wed, 21 Sep 2022 09:33:46 +0200 Message-Id: <20220921073348.169965-5-felix.moessbauer@siemens.com> In-Reply-To: <20220921073348.169965-1-felix.moessbauer@siemens.com> References: <20220921073348.169965-1-felix.moessbauer@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-72506:519-21489:flowmailer X-TUID: 5Fy2RIduORK5 This patch adds the WIC_DEPLOY_PARTITIONS option to control if the raw partition files are deployed by wic. We also set the default to not deploy to be closer to OE and to optimize for the average case. In addition, this significantly reduces the disk size required to run the CI. An API changelog entry is added. Signed-off-by: Felix Moessbauer --- RECIPE-API-CHANGELOG.md | 9 +++++++++ meta-isar/conf/local.conf.sample | 3 +++ meta/classes/imagetypes_wic.bbclass | 9 +++++++++ 3 files changed, 21 insertions(+) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index 621d110e..a5f5abee 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -419,3 +419,12 @@ packages and will be lost after a given build session finishes. Any package build requirements for the rootfs should be satisfied in the Debian way via package dependencies. + +### Individual WIC partitions are no longer automatically deployed + +We used to copy all temporary WIC files, like the partitions, into the deploy directory. +That was intended actually only for compressed wic images where wic itself would do the compression. +It was never intended to also deploy those partitions, so that will also not be done (automatically) anymore. +To explicitly deploy the individual partition files (e.g. for swupdate), set `WIC_DEPLOY_PARTITIONS = "1"`. + +For compressed wic images `IMAGE_FSTYPES` should simply be extended with a compressed wic format, like "wic.xz". diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample index ce7b58ee..57d06202 100644 --- a/meta-isar/conf/local.conf.sample +++ b/meta-isar/conf/local.conf.sample @@ -246,6 +246,9 @@ USER_isar[flags] += "clear-text-password" # Uncomment the below line to debug WIC. # WIC_CREATE_EXTRA_ARGS += "-D" +# Uncomment this to also deploy each wic partition as separate file (e.g. for swupdate) +#WIC_DEPLOY_PARTITIONS = "1" + # Uncomment this to use ccache for custom packages #USE_CCACHE = "1" # Uncomment and set own top level ccache directory to share between builds diff --git a/meta/classes/imagetypes_wic.bbclass b/meta/classes/imagetypes_wic.bbclass index 81788faf..c0f3429a 100644 --- a/meta/classes/imagetypes_wic.bbclass +++ b/meta/classes/imagetypes_wic.bbclass @@ -98,6 +98,7 @@ RECIPE_SYSROOT_NATIVE ?= "/" BUILDCHROOT_DIR = "${BUILDCHROOT_TARGET_DIR}" WIC_CREATE_EXTRA_ARGS ?= "" +WIC_DEPLOY_PARTITIONS ?= "0" # taken from OE, do not touch directly WICVARS += "\ @@ -208,6 +209,14 @@ generate_wic_image() { sudo chown -R $(id -u):$(id -g) ${BUILDCHROOT_DIR}/${WICTMP} mv -f ${WIC_DIRECT} ${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.wic mv -f ${WIC_DIRECT}.bmap ${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.bmap + # deploy partition files if requested (ending with .p) + if [ "${WIC_DEPLOY_PARTITIONS}" -eq "1" ]; then + # locate *.direct.p partition files + find ${BUILDCHROOT_DIR}/${WICTMP} -type f -regextype sed -regex ".*\.direct.*\.p[0-9]\{1,\}" | while read f; do + suffix=$(basename $f | sed 's/.*\.direct\(.*\)/\1/') + mv -f ${f} ${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.wic${suffix} + done + fi rm -rf ${BUILDCHROOT_DIR}/${WICTMP} rm -rf ${IMAGE_ROOTFS}/../pseudo } -- 2.30.2