All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Quirin Gylstorff" <quirin.gylstorff@siemens.com>
To: Jan.Kiszka@siemens.com, cip-dev@lists.cip-project.org
Cc: Quirin Gylstorff <quirin.gylstorff@siemens.com>
Subject: [cip-dev][isar-cip-core][PATCH] swupdate-config: add prefix to variables
Date: Fri, 30 Apr 2021 14:20:20 +0200	[thread overview]
Message-ID: <20210430122020.13407-1-Quirin.Gylstorff@siemens.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2386 bytes --]

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

The variables U_BOOT and BOOTLOADER are only used for swupdate
mark add the prefix SWUPDATE to indicate the intended usage.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 classes/swupdate-config.bbclass | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/classes/swupdate-config.bbclass b/classes/swupdate-config.bbclass
index 9909113..8ec1104 100644
--- a/classes/swupdate-config.bbclass
+++ b/classes/swupdate-config.bbclass
@@ -45,19 +45,23 @@ KFEATURE_ubi[KCONFIG_SNIPPETS] = "file://swupdate_defconfig_ubi.snippet"
 
 KFEATURE_DEPS[ubi] = "mtd"
 
+
+SWUPDATE_BOOTLOADER ?= "${BOOTLOADER}"
+SWUPDATE_U_BOOT ?= "${U_BOOT}"
 USE_U_BOOT_CONFIG ?= "true"
+
 KFEATURE_u-boot = ""
 KFEATURE_u-boot[BUILD_DEB_DEPENDS] = "libubootenv-dev"
 KFEATURE_u-boot[DEBIAN_DEPENDS] = "${@ 'libubootenv0.1, u-boot-${MACHINE}-config' \
                                           if d.getVar("USE_U_BOOT_CONFIG", True) == "true" \
                                           else 'libubootenv0.1'}"
-KFEATURE_u-boot[DEPENDS] = "${U_BOOT} libubootenv"
+KFEATURE_u-boot[DEPENDS] = "${SWUPDATE_U_BOOT} libubootenv"
 KFEATURE_u-boot[KCONFIG_SNIPPETS] = "file://swupdate_defconfig_u-boot.snippet"
 
 SWUPDATE_LUASCRIPT ?= "swupdate_handlers.lua"
 
 def get_bootloader_featureset(d):
-    bootloader = d.getVar("BOOTLOADER", True) or ""
+    bootloader = d.getVar("SWUPDATE_BOOTLOADER", True) or ""
     if bootloader == "efibootguard":
         return "efibootguard"
     if bootloader == "u-boot":
@@ -68,11 +72,11 @@ SWUPDATE_KFEATURES ??= ""
 KFEATURES = "${SWUPDATE_KFEATURES}"
 KFEATURES += "${@get_bootloader_featureset(d)}"
 
-# Astonishingly, as an anonymous python function, BOOTLOADER is always None
+# Astonishingly, as an anonymous python function, SWUPDATE_BOOTLOADER is always None
 # one time before it gets set. So the following must be a task.
 python do_check_bootloader () {
-    bootloader = d.getVar("BOOTLOADER", True) or "None"
+    bootloader = d.getVar("SWUPDATE_BOOTLOADER", True) or "None"
     if not bootloader in ["efibootguard", "u-boot"]:
-        bb.warn("swupdate: BOOTLOADER set to incompatible value: " + bootloader)
+        bb.warn("swupdate: SWUPDATE_BOOTLOADER set to incompatible value: " + bootloader)
 }
 addtask check_bootloader before do_fetch
-- 
2.20.1


[-- Attachment #2: Type: text/plain, Size: 428 bytes --]


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6402): https://lists.cip-project.org/g/cip-dev/message/6402
Mute This Topic: https://lists.cip-project.org/mt/82479643/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/4520388/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-


             reply	other threads:[~2021-04-30 12:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 12:20 Quirin Gylstorff [this message]
2021-04-30 12:32 ` [cip-dev][isar-cip-core][PATCH] swupdate-config: add prefix to variables Jan Kiszka
2021-04-30 13:01 ` [cip-dev][isar-cip-core][PATCH v2] " Quirin Gylstorff
2021-04-30 14:50   ` Jan Kiszka
2021-05-03 11:28     ` Quirin Gylstorff
2021-05-03 11:44       ` Jan Kiszka
2021-05-03 15:45         ` Quirin Gylstorff
2021-05-03 17:21           ` Jan Kiszka
2021-05-05  8:05             ` [cip-dev][isar-cip-core][PATCH v3 0/2] swupdate-config: variables cleanup Quirin Gylstorff
2021-05-05  8:05               ` [cip-dev][isar-cip-core][PATCH v3 1/2] swupdate-config: remove variable U_BOOT Quirin Gylstorff
2021-05-05  8:05               ` [cip-dev][isar-cip-core][PATCH v3 2/2] swupdate-config: add prefix to variables Quirin Gylstorff

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=20210430122020.13407-1-Quirin.Gylstorff@siemens.com \
    --to=quirin.gylstorff@siemens.com \
    --cc=Jan.Kiszka@siemens.com \
    --cc=cip-dev@lists.cip-project.org \
    /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.