All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Quirin Gylstorff <Quirin.Gylstorff@siemens.com>,
	felix.moessbauer@siemens.com, cip-dev@lists.cip-project.org
Subject: Re: [cip-dev][isar-cip-core][PATCH v2 1/3] swupdate-config: move swupdate.cfg from customizations to own recipe
Date: Mon, 12 Feb 2024 19:46:00 +0100	[thread overview]
Message-ID: <8a1453fa-9290-472d-93ef-041d7b632fc4@siemens.com> (raw)
In-Reply-To: <20240207134505.3286003-2-Quirin.Gylstorff@siemens.com>

On 07.02.24 14:44, Quirin Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> This allows downstream customizations without including unwanted
> packages.
> 
> It also adds the possibilty to set the SWU_HW_COMPAT

You likely mean MACHINE_HW_VERSION.

This "HW" in SWU_SW_COMPAT and MACHINE_HW_VERSION confuses me, and both
variables are not documented. What does the HW stand for, and can we
please fix the documentation?

Jan

> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
>  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..ec1d667
> --- /dev/null
> +++ b/recipes-core/swupdate-config/files/hwrevision.tmpl
> @@ -0,0 +1 @@
> +cip-${MACHINE} ${IMAGE_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 <quirin.gylstorff@siemens.com>
> +#
> +# 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
> +}

-- 
Siemens AG, Technology
Linux Expert Center



  reply	other threads:[~2024-02-12 18:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 13:44 [cip-dev][isar-cip-core][PATCH v2 0/3] Reduce difference to debian Quirin Gylstorff
2024-02-07 13:44 ` [cip-dev][isar-cip-core][PATCH v2 1/3] swupdate-config: move swupdate.cfg from customizations to own recipe Quirin Gylstorff
2024-02-12 18:46   ` Jan Kiszka [this message]
2024-02-07 13:44 ` [cip-dev][isar-cip-core][PATCH v2 2/3] swupdate: set SWU_HW_COMPAT Quirin Gylstorff
2024-02-12 18:46   ` Jan Kiszka
2024-02-07 13:44 ` [cip-dev][isar-cip-core][PATCH v2 3/3] swupdate.bbclass: weak default assignment for SWU_HW_COMPAT Quirin Gylstorff
2024-02-12 18:41 ` [cip-dev][isar-cip-core][PATCH v2 0/3] Reduce difference to debian Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a1453fa-9290-472d-93ef-041d7b632fc4@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=Quirin.Gylstorff@siemens.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=felix.moessbauer@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.