From patchwork Fri Feb 16 15:30:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gylstorff Quirin X-Patchwork-Id: 13560221 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 5B054C48BC4 for ; Fri, 16 Feb 2024 15:30:31 +0000 (UTC) Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net [185.136.64.227]) by mx.groups.io with SMTP id smtpd.web11.21578.1708097428358512616 for ; Fri, 16 Feb 2024 07:30:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=Quirin.Gylstorff@siemens.com header.s=fm1 header.b=ibGbeXtp; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.64.227, mailfrom: fm-51332-20240216153025a0f68c8e247651b6eb-tjw5y0@rts-flowmailer.siemens.com) Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 20240216153025a0f68c8e247651b6eb for ; Fri, 16 Feb 2024 16:30:25 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=Quirin.Gylstorff@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:References:In-Reply-To; bh=gFHeFtwB7CJhWmJfJ3kyZu2Lsot7qoAWZqb2W8RYz6s=; b=ibGbeXtp+yji9LTTduNV5MlevZjSeHOEMlg89N9nVUfB8lI0ZLNtivZ5EWcYwobpNstxN1 cPncuNy7ll1Ua7rpot2tMHRDe/vOh5pA2+remxF8SVVwTKpHmtsuCMzim3kX2bueSP+eyUuQ FOW7CD3fHK2YJVyOboGDRDESBwjLo=; From: Quirin Gylstorff To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Subject: [cip-dev][isar-cip-core][PATCH v3 1/4] swupdate-config: move swupdate.cfg from customizations to own recipe Date: Fri, 16 Feb 2024 16:30:02 +0100 Message-ID: <20240216153024.260416-2-Quirin.Gylstorff@siemens.com> In-Reply-To: <20240216153024.260416-1-Quirin.Gylstorff@siemens.com> References: <20240216153024.260416-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-51332:519-21489:flowmailer 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 ; Fri, 16 Feb 2024 15:30:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/15014 From: Quirin Gylstorff This allows downstream customizations without including unwanted packages. It also adds the new variable `MACHINE_HW_VERSION` to check the compatibility between machine/image and the swupdate file. Signed-off-by: Quirin Gylstorff --- recipes-core/customizations/common.inc | 8 ++---- .../swupdate-config/files/hwrevision.tmpl | 1 + .../files/swupdate.cfg | 0 .../swupdate-config/swupdate-config_0.1.bb | 27 +++++++++++++++++++ 4 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 recipes-core/swupdate-config/files/hwrevision.tmpl rename recipes-core/{customizations => swupdate-config}/files/swupdate.cfg (100%) create mode 100644 recipes-core/swupdate-config/swupdate-config_0.1.bb diff --git a/recipes-core/customizations/common.inc b/recipes-core/customizations/common.inc index 79bf80d..37872c1 100644 --- a/recipes-core/customizations/common.inc +++ b/recipes-core/customizations/common.inc @@ -19,8 +19,6 @@ SRC_URI = " \ file://99-silent-printk.conf \ file://99-watchdog.conf" -SRC_URI:append:swupdate = " file://swupdate.cfg" - CUSTOM_HOSTNAME ??= "demo" WIRELESS_FIRMWARE_PACKAGE ?= "" INSTALL_WIRELESS_TOOLS ??= "0" @@ -29,12 +27,14 @@ TEMPLATE_FILES += "postinst.tmpl" TEMPLATE_VARS += "CUSTOM_HOSTNAME" DEPENDS += "sshd-regen-keys change-root-homedir" +RDEPENDS:append:swupdate = " swupdate-config" DEBIAN_DEPENDS = " \ ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys, \ change-root-homedir \ ${@(', iw, wireless-regdb, ' + d.getVar('WIRELESS_FIRMWARE_PACKAGE')) \ if d.getVar('INSTALL_WIRELESS_TOOLS') == '1' else ''}" +DEBIAN_DEPENDS:append:swupdate = ", swupdate-config" do_install() { install -v -d ${D}/etc/network/interfaces.d @@ -46,7 +46,3 @@ do_install() { install -v -d ${D}/etc/systemd/system.conf.d install -v -m 644 ${WORKDIR}/99-watchdog.conf ${D}/etc/systemd/system.conf.d/ } - -do_install:append:swupdate() { - install -v -m 644 ${WORKDIR}/swupdate.cfg ${D}/etc/ -} diff --git a/recipes-core/swupdate-config/files/hwrevision.tmpl b/recipes-core/swupdate-config/files/hwrevision.tmpl new file mode 100644 index 0000000..1eb0996 --- /dev/null +++ b/recipes-core/swupdate-config/files/hwrevision.tmpl @@ -0,0 +1 @@ +cip-${MACHINE} ${MACHINE_HW_VERSION} diff --git a/recipes-core/customizations/files/swupdate.cfg b/recipes-core/swupdate-config/files/swupdate.cfg similarity index 100% rename from recipes-core/customizations/files/swupdate.cfg rename to recipes-core/swupdate-config/files/swupdate.cfg diff --git a/recipes-core/swupdate-config/swupdate-config_0.1.bb b/recipes-core/swupdate-config/swupdate-config_0.1.bb new file mode 100644 index 0000000..6991321 --- /dev/null +++ b/recipes-core/swupdate-config/swupdate-config_0.1.bb @@ -0,0 +1,27 @@ +# +# CIP Core, generic profile +# +# Copyright (c) Siemens AG, 2024 +# +# Authors: +# Quirin Gylstorff +# +# SPDX-License-Identifier: MIT +# + +inherit dpkg-raw + +SRC_URI = "file://swupdate.cfg \ + file://hwrevision.tmpl" + +MACHINE_HW_VERSION ??= "" +TEMPLATE_FILES += "hwrevision.tmpl" +TEMPLATE_VARS += "MACHINE MACHINE_HW_VERSION" + +do_install[cleandirs] = "${D}/etc/" +do_install() { + install -v -m 644 "${WORKDIR}"/swupdate.cfg "${D}"/etc/ + if [ -n "${MACHINE_HW_VERSION}" ]; then + install -v -m 644 "${WORKDIR}"/hwrevision "${D}"/etc/ + fi +} From patchwork Fri Feb 16 15:30:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gylstorff Quirin X-Patchwork-Id: 13560222 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 73CB6C48BF5 for ; Fri, 16 Feb 2024 15:30:31 +0000 (UTC) Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net [185.136.64.226]) by mx.groups.io with SMTP id smtpd.web11.21580.1708097428440934586 for ; Fri, 16 Feb 2024 07:30:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=Quirin.Gylstorff@siemens.com header.s=fm1 header.b=M+0sJQ4U; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.64.226, mailfrom: fm-51332-2024021615302593321d63f6169249be-ah7dge@rts-flowmailer.siemens.com) Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 2024021615302593321d63f6169249be for ; Fri, 16 Feb 2024 16:30:25 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=Quirin.Gylstorff@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:References:In-Reply-To; bh=h/UUkxPeBoj8PnV8m4El1qVqZzFABfFpOqbTCK3KYpg=; b=M+0sJQ4U32e8+Pt7y5j6nBiEybUCQJ/6Ve4JhpI+afCV2iweIJWv/Pb+GS50fY169MJ7gj /kaLya5wh4Moetvga3lk5scx/hfVZMui8z1qErTZZUJ+eBazudiHjzhVeloowihtio403kVA mzRz6Jl3v8VPORDX45TwnJiwRbcZo=; From: Quirin Gylstorff To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Subject: [cip-dev][isar-cip-core][PATCH v3 2/4] swupdate: set SWU_HW_COMPAT Date: Fri, 16 Feb 2024 16:30:03 +0100 Message-ID: <20240216153024.260416-3-Quirin.Gylstorff@siemens.com> In-Reply-To: <20240216153024.260416-1-Quirin.Gylstorff@siemens.com> References: <20240216153024.260416-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-51332:519-21489:flowmailer 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 ; Fri, 16 Feb 2024 15:30:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/15016 From: Quirin Gylstorff With this item SWUpdate from Debian can be used in place of a build from isar-cip-core. Signed-off-by: Quirin Gylstorff --- recipes-core/images/swupdate.inc | 2 +- recipes-core/swupdate-config/swupdate-config_0.1.bb | 2 +- recipes-core/swupdate/swupdate.inc | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/recipes-core/images/swupdate.inc b/recipes-core/images/swupdate.inc index 213b97f..1d237f7 100644 --- a/recipes-core/images/swupdate.inc +++ b/recipes-core/images/swupdate.inc @@ -13,7 +13,7 @@ inherit image_uuid inherit read-only-rootfs SWU_SIGNED ?= "1" - +SWU_HW_COMPAT ?= "cip-core-1.0" IMAGE_INSTALL += " swupdate" IMAGE_INSTALL:remove:sid = "swupdate" diff --git a/recipes-core/swupdate-config/swupdate-config_0.1.bb b/recipes-core/swupdate-config/swupdate-config_0.1.bb index 6991321..260c0f1 100644 --- a/recipes-core/swupdate-config/swupdate-config_0.1.bb +++ b/recipes-core/swupdate-config/swupdate-config_0.1.bb @@ -14,7 +14,7 @@ inherit dpkg-raw SRC_URI = "file://swupdate.cfg \ file://hwrevision.tmpl" -MACHINE_HW_VERSION ??= "" +MACHINE_HW_VERSION ??= "cip-core-1.0" TEMPLATE_FILES += "hwrevision.tmpl" TEMPLATE_VARS += "MACHINE MACHINE_HW_VERSION" diff --git a/recipes-core/swupdate/swupdate.inc b/recipes-core/swupdate/swupdate.inc index cb1716b..818b431 100644 --- a/recipes-core/swupdate/swupdate.inc +++ b/recipes-core/swupdate/swupdate.inc @@ -34,9 +34,6 @@ DEPENDS += "${@bb.utils.contains('DEB_BUILD_PROFILES', 'mtd', 'mtd-utils', '', d DEB_BUILD_PROFILES += "${@'pkg.swupdate.nosigning' if not d.getVar('SWU_SIGNED') == '1' else ''}" -# deactivate hardware compability for simple a/b rootfs update -DEB_BUILD_PROFILES += "pkg.swupdate.nohwcompat" - # add cross build and deactivate testing for arm based builds DEB_BUILD_PROFILES += "cross nocheck" From patchwork Fri Feb 16 15:30:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gylstorff Quirin X-Patchwork-Id: 13560220 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 5E862C48BF6 for ; Fri, 16 Feb 2024 15:30:31 +0000 (UTC) Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net [185.136.64.228]) by mx.groups.io with SMTP id smtpd.web10.21541.1708097428180745841 for ; Fri, 16 Feb 2024 07:30:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=Quirin.Gylstorff@siemens.com header.s=fm1 header.b=LCVF8vtt; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.64.228, mailfrom: fm-51332-20240216153025ea84a3848d591eba8f-vhq5y0@rts-flowmailer.siemens.com) Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20240216153025ea84a3848d591eba8f for ; Fri, 16 Feb 2024 16:30:25 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=Quirin.Gylstorff@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:References:In-Reply-To; bh=14xxIJOFRbAunhBs3gz9ine5QuCF+qAL6VkVCmdw2QE=; b=LCVF8vttGaCiLAADs1rULqksmMAQtvemwoJXnDgU9nmj/UwpA7wXrpkQ2q6DfAQ0/DYGce VlpZmyBLnbSwuOwlfZzLjmHkV75ZjQp2sFq0j8N6PeYY20gAMxLDXccVgh0phkb0rn/332uZ wBrLmBWs3PZj85v3O5FWujrzgWB5c=; From: Quirin Gylstorff To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Subject: [cip-dev][isar-cip-core][PATCH v3 3/4] swupdate.bbclass: weak default assignment for SWU_HW_COMPAT Date: Fri, 16 Feb 2024 16:30:04 +0100 Message-ID: <20240216153024.260416-4-Quirin.Gylstorff@siemens.com> In-Reply-To: <20240216153024.260416-1-Quirin.Gylstorff@siemens.com> References: <20240216153024.260416-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-51332:519-21489:flowmailer 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 ; Fri, 16 Feb 2024 15:30:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/15018 From: Quirin Gylstorff This allows to set SWU_HW_COMPAT in recipe-core/images/swupdate.inc and in downstream layers. Signed-off-by: Quirin Gylstorff --- classes/swupdate.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass index 403bdef..20589f3 100644 --- a/classes/swupdate.bbclass +++ b/classes/swupdate.bbclass @@ -20,7 +20,7 @@ SWU_ROOTFS_PARTITION_NAME ?= "${SWU_ROOTFS_NAME}.${SWU_ROOTFS_TYPE}${@get_swu_co SWU_VERSION ?= "0.2" SWU_NAME ?= "cip software update" # space separated list of supported hw. Leave empty to leave out -SWU_HW_COMPAT ?= "" +SWU_HW_COMPAT ??= "" SWU_EBG_UPDATE ?= "" SWU_EFI_BOOT_DEVICE ?= "/dev/disk/by-uuid/4321-DCBA" From patchwork Fri Feb 16 15:30:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gylstorff Quirin X-Patchwork-Id: 13560219 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 5C467C48BEF for ; Fri, 16 Feb 2024 15:30:31 +0000 (UTC) Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net [185.136.64.227]) by mx.groups.io with SMTP id smtpd.web11.21579.1708097428383147988 for ; Fri, 16 Feb 2024 07:30:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=Quirin.Gylstorff@siemens.com header.s=fm1 header.b=pqiqGNqy; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.64.227, mailfrom: fm-51332-20240216153025e4f8b739bce10d687a-q438_1@rts-flowmailer.siemens.com) Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 20240216153025e4f8b739bce10d687a for ; Fri, 16 Feb 2024 16:30:26 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=Quirin.Gylstorff@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:References:In-Reply-To; bh=WBH+mA0lO2bYBGzGx8b/+Yg0QFg6FV7dfNSaLOCvKXA=; b=pqiqGNqyHDZTrNQpjOfvJh+vdLlugZYk9AK3teVlEePzvJHxJw6dKmRG3iLJJlaYcUmgGI B0+I5U0VftKp+5iSdP0uLLydlN8zzi0wGpasI7optP4Y7Ds/Y7fOjDrXK8be8Nj71czKiRWT I7vue1R6JTHi0LsUbNKlSnHv3Vsuo=; From: Quirin Gylstorff To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Subject: [cip-dev][isar-cip-core][PATCH v3 4/4] doc/README.swupdate.md: Add documentation for hardware compatibility Date: Fri, 16 Feb 2024 16:30:05 +0100 Message-ID: <20240216153024.260416-5-Quirin.Gylstorff@siemens.com> In-Reply-To: <20240216153024.260416-1-Quirin.Gylstorff@siemens.com> References: <20240216153024.260416-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-51332:519-21489:flowmailer 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 ; Fri, 16 Feb 2024 15:30:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/15017 From: Quirin Gylstorff Signed-off-by: Quirin Gylstorff --- doc/README.swupdate.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/README.swupdate.md b/doc/README.swupdate.md index 1c94699..0f179c4 100644 --- a/doc/README.swupdate.md +++ b/doc/README.swupdate.md @@ -21,6 +21,16 @@ window is still possible. If the variable `SWU_EBG_UPDATE` is set to `"1"` the update is also stored in the `*.swu` file. +## SWUpdate Hardware compatibility + +The variable `SWU_HW_COMPAT` contains a space separate list of +compatible hardware revisions. +SWUpdate checks the compatibility against `/etc/hwrevision`, see +[hardware-compatibility in the SWUpdate documentation.](https://sbabic.github.io/swupdate/sw-description.html#hardware-compatibility) + +For testing purpose the content of `/etc/hwrevision` can be set with +the variable `MACHINE_HW_VERSION`. + # Building and testing the CIP Core image Set up `kas-container` as described in the [top-level README](../README.md).