From patchwork Wed Jul 3 12:17:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudius Heine X-Patchwork-Id: 13722173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A40DDC2BD09 for ; Wed, 3 Jul 2024 12:18:05 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by mx.groups.io with SMTP id smtpd.web11.49604.1720009080512115595 for ; Wed, 03 Jul 2024 05:18:00 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@denx.de header.s=phobos-20191101 header.b=O68k2ckS; spf=pass (domain: denx.de, ip: 85.214.62.61, mailfrom: ch@denx.de) Received: from localhost (dslb-002-207-026-217.002.207.pools.vodafone-ip.de [2.207.26.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: ch@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 5834C88224; Wed, 3 Jul 2024 14:17:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1720009078; bh=anEDFKkZ939xwJJXjvZi233tgrGt3uF8nGLYHbdq5Vc=; h=From:To:Cc:Subject:Date:From; b=O68k2ckSfk5aTGvmHk9v5SVSMDong6cV15WT8MnuWUTp9WCFyIhXCDfHNIUZQwu/d BbhTlaEf0Wk/R4ilkNKZKHXYYwjXgh03dpuiKZcYhRT4ij1X3pbjc2dVGtM9T7XrNq 6Xzgp3IO3IFEYwVOhdz/8JAGcqkdAsRsNFRtf+huoYL/tC7lR947mOuOv3zH8A4Ngm V25v2hRbewYstc6vJUyCbL5VgLDI3v2PoF2hssrxrWnNoNXBLTvTkqVJYYknARz2+4 KrA5KLbvBOBdRAHw1+gCGBOQWxk7qkOzAFRjg/SXBG1wtVmuspqb4pgurADCFDGW3D 1nJgytBCuYzNQ== From: Claudius Heine To: cip-dev@lists.cip-project.org Cc: Claudius Heine Subject: [PATCH] swupdate.bbclass: add SWU_BOOTLOADER='none' support Date: Wed, 3 Jul 2024 14:17:56 +0200 Message-ID: <20240703121756.2164672-1-ch@denx.de> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 03 Jul 2024 12:18:05 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/16368 On some systems the update process and bootloader integration is more complex and custom, thus integrated into handler and wrapper scripts. Bootloader support on swupdate and the default cip-core update structure will not function correctly and need to be deactivated. This change implements a `none` setting for SWU_BOOTLOADER which allows to deactive any `SWU_DESCRIPITION_FILE_BOOTLOADER` handling. Signed-off-by: Claudius Heine --- classes/swupdate.bbclass | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass index e91238d..aa0af00 100644 --- a/classes/swupdate.bbclass +++ b/classes/swupdate.bbclass @@ -52,9 +52,11 @@ IMAGE_INSTALL += "${@'swupdate-certificates' if bb.utils.to_boolean(d.getVar('SW IMAGE_SRC_URI:swu = "file://${SWU_DESCRIPTION_FILE}.tmpl" -IMAGE_SRC_URI:swu += "file://${SWU_DESCRIPITION_FILE_BOOTLOADER}.tmpl" +IMAGE_SRC_URI:swu += "${'file://${SWU_DESCRIPITION_FILE_BOOTLOADER}.tmpl' \ + if d.getVar('SWU_BOOTLOADER') not in ['', 'none'] else ''}" IMAGE_TEMPLATE_FILES:swu = "${SWU_DESCRIPTION_FILE}.tmpl" -IMAGE_TEMPLATE_FILES:swu += "${SWU_DESCRIPITION_FILE_BOOTLOADER}.tmpl" +IMAGE_TEMPLATE_FILES:swu += "${'${SWU_DESCRIPITION_FILE_BOOTLOADER}.tmpl' \ + if d.getVar('SWU_BOOTLOADER') not in ['', 'none'] else ''}" IMAGE_TEMPLATE_VARS:swu = " \ SWU_ROOTFS_ARTIFACT_NAME \ TARGET_IMAGE_UUID \ @@ -192,7 +194,9 @@ FILESEXTRAPATHS:append = ":${LAYERDIR_cip-core}/recipes-core/images/swu" do_image_swu[depends] += "${PN}:do_transform_template" do_image_swu[stamp-extra-info] = "${DISTRO}-${MACHINE}" -do_image_swu[cleandirs] += "${WORKDIR}/swu ${WORKDIR}/swu-${SWU_BOOTLOADER}" +do_image_swu[cleandirs] += "${WORKDIR}/swu" +do_image_swu[cleandirs] += "${@'${WORKDIR}/swu-${SWU_BOOTLOADER}' \ + if d.getVar('SWU_BOOTLOADER') not in ['', 'none'] else ''}" do_image_swu[prefuncs] = "do_extend_sw_description" IMAGE_CMD:swu() { rm -f '${DEPLOY_DIR_IMAGE}/${SWU_IMAGE_FILE}'*.swu