* [cip-dev][isar-cip-core][PATCH] swupdate-config: add prefix to variables
@ 2021-04-30 12:20 Quirin Gylstorff
2021-04-30 12:32 ` Jan Kiszka
2021-04-30 13:01 ` [cip-dev][isar-cip-core][PATCH v2] " Quirin Gylstorff
0 siblings, 2 replies; 11+ messages in thread
From: Quirin Gylstorff @ 2021-04-30 12:20 UTC (permalink / raw)
To: Jan.Kiszka, cip-dev; +Cc: Quirin Gylstorff
[-- 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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [cip-dev][isar-cip-core][PATCH] swupdate-config: add prefix to variables
2021-04-30 12:20 [cip-dev][isar-cip-core][PATCH] swupdate-config: add prefix to variables Quirin Gylstorff
@ 2021-04-30 12:32 ` Jan Kiszka
2021-04-30 13:01 ` [cip-dev][isar-cip-core][PATCH v2] " Quirin Gylstorff
1 sibling, 0 replies; 11+ messages in thread
From: Jan Kiszka @ 2021-04-30 12:32 UTC (permalink / raw)
To: Q. Gylstorff, cip-dev
[-- Attachment #1: Type: text/plain, Size: 2973 bytes --]
On 30.04.21 14:20, Q. Gylstorff wrote:
> 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.
Does not fully parse to me. Do you mean
"The variables U_BOOT and BOOTLOADER are only used for swupdate.
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}"
This doesn't make sense. There is no generic variable "BOOTLOADER" in Isar.
> +SWUPDATE_U_BOOT ?= "${U_BOOT}"
That one as well. What is "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
>
Please also clean up kas/opt/ebg-swu.yml, switching to the SWUPDATE
prefixed var name.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
[-- Attachment #2: Type: text/plain, Size: 428 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6405): https://lists.cip-project.org/g/cip-dev/message/6405
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 11+ messages in thread
* [cip-dev][isar-cip-core][PATCH v2] swupdate-config: add prefix to variables
2021-04-30 12:20 [cip-dev][isar-cip-core][PATCH] swupdate-config: add prefix to variables Quirin Gylstorff
2021-04-30 12:32 ` Jan Kiszka
@ 2021-04-30 13:01 ` Quirin Gylstorff
2021-04-30 14:50 ` Jan Kiszka
1 sibling, 1 reply; 11+ messages in thread
From: Quirin Gylstorff @ 2021-04-30 13:01 UTC (permalink / raw)
To: jan.kiszka, cip-dev; +Cc: Quirin Gylstorff
[-- Attachment #1: Type: text/plain, Size: 3868 bytes --]
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
The variables U_BOOT and BOOTLOADER are only used for swupdate.
Add the prefix SWUPDATE to indicate the intended usage.
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
Changes in V2:
- fix typo in commit message
- use variable in kas/opt/*.yml
classes/swupdate-config.bbclass | 10 +++++-----
kas/opt/ebg-secure-boot-snakeoil.yml | 2 +-
kas/opt/ebg-swu.yml | 4 ++--
kas/opt/qemu-swupdate.yml | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/classes/swupdate-config.bbclass b/classes/swupdate-config.bbclass
index 9909113..0c1067a 100644
--- a/classes/swupdate-config.bbclass
+++ b/classes/swupdate-config.bbclass
@@ -51,13 +51,13 @@ 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 +68,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
diff --git a/kas/opt/ebg-secure-boot-snakeoil.yml b/kas/opt/ebg-secure-boot-snakeoil.yml
index 8a72084..c0ed1a2 100644
--- a/kas/opt/ebg-secure-boot-snakeoil.yml
+++ b/kas/opt/ebg-secure-boot-snakeoil.yml
@@ -20,7 +20,7 @@ local_conf_header:
# Add snakeoil and ovmf binaries for qemu
IMAGER_BUILD_DEPS += "ebg-secure-boot-snakeoil ovmf-binaries"
IMAGER_INSTALL += "ebg-secure-boot-snakeoil"
- WKS_FILE = "${MACHINE}-${BOOTLOADER}-secureboot.wks"
+ WKS_FILE = "${MACHINE}-efibootguard-secureboot.wks"
ovmf: |
# snakeoil certs are only part of backports
diff --git a/kas/opt/ebg-swu.yml b/kas/opt/ebg-swu.yml
index aa3aed1..63dda09 100644
--- a/kas/opt/ebg-swu.yml
+++ b/kas/opt/ebg-swu.yml
@@ -15,7 +15,7 @@ header:
local_conf_header:
swupdate: |
IMAGE_INSTALL_append = " swupdate efibootguard"
- BOOTLOADER = "efibootguard"
+ SWUPDATE_BOOTLOADER = "efibootguard"
efibootguard: |
WDOG_TIMEOUT = "0"
@@ -23,4 +23,4 @@ local_conf_header:
wic: |
IMAGE_TYPE = "wic-swu-img"
- WKS_FILE ?= "${MACHINE}-${BOOTLOADER}.wks"
+ WKS_FILE ?= "${MACHINE}-${SWUPDATE_BOOTLOADER}.wks"
diff --git a/kas/opt/qemu-swupdate.yml b/kas/opt/qemu-swupdate.yml
index 3f5fedf..daebd2c 100644
--- a/kas/opt/qemu-swupdate.yml
+++ b/kas/opt/qemu-swupdate.yml
@@ -16,4 +16,4 @@ header:
local_conf_header:
qemu-wic: |
IMAGE_TYPE ?= "wic-swu-img"
- WKS_FILE = "qemu-amd64-${BOOTLOADER}.wks"
+ WKS_FILE = "qemu-amd64-${SWUPDATE_BOOTLOADER}.wks"
--
2.20.1
[-- Attachment #2: Type: text/plain, Size: 428 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6406): https://lists.cip-project.org/g/cip-dev/message/6406
Mute This Topic: https://lists.cip-project.org/mt/82480672/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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [cip-dev][isar-cip-core][PATCH v2] swupdate-config: add prefix to variables
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
0 siblings, 1 reply; 11+ messages in thread
From: Jan Kiszka @ 2021-04-30 14:50 UTC (permalink / raw)
To: Q. Gylstorff, cip-dev
[-- Attachment #1: Type: text/plain, Size: 4273 bytes --]
On 30.04.21 15:01, Q. Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>
> The variables U_BOOT and BOOTLOADER are only used for swupdate.
> Add the prefix SWUPDATE to indicate the intended usage.
>
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
> Changes in V2:
> - fix typo in commit message
> - use variable in kas/opt/*.yml
>
> classes/swupdate-config.bbclass | 10 +++++-----
> kas/opt/ebg-secure-boot-snakeoil.yml | 2 +-
> kas/opt/ebg-swu.yml | 4 ++--
> kas/opt/qemu-swupdate.yml | 2 +-
> 4 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/classes/swupdate-config.bbclass b/classes/swupdate-config.bbclass
> index 9909113..0c1067a 100644
> --- a/classes/swupdate-config.bbclass
> +++ b/classes/swupdate-config.bbclass
> @@ -51,13 +51,13 @@ 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"
Still leaves me and probably other users clueless what SWUPDATE_U_BOOT
should be. Simply "u-boot-${MACHINE}"?
Jan
> 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 +68,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
> diff --git a/kas/opt/ebg-secure-boot-snakeoil.yml b/kas/opt/ebg-secure-boot-snakeoil.yml
> index 8a72084..c0ed1a2 100644
> --- a/kas/opt/ebg-secure-boot-snakeoil.yml
> +++ b/kas/opt/ebg-secure-boot-snakeoil.yml
> @@ -20,7 +20,7 @@ local_conf_header:
> # Add snakeoil and ovmf binaries for qemu
> IMAGER_BUILD_DEPS += "ebg-secure-boot-snakeoil ovmf-binaries"
> IMAGER_INSTALL += "ebg-secure-boot-snakeoil"
> - WKS_FILE = "${MACHINE}-${BOOTLOADER}-secureboot.wks"
> + WKS_FILE = "${MACHINE}-efibootguard-secureboot.wks"
>
> ovmf: |
> # snakeoil certs are only part of backports
> diff --git a/kas/opt/ebg-swu.yml b/kas/opt/ebg-swu.yml
> index aa3aed1..63dda09 100644
> --- a/kas/opt/ebg-swu.yml
> +++ b/kas/opt/ebg-swu.yml
> @@ -15,7 +15,7 @@ header:
> local_conf_header:
> swupdate: |
> IMAGE_INSTALL_append = " swupdate efibootguard"
> - BOOTLOADER = "efibootguard"
> + SWUPDATE_BOOTLOADER = "efibootguard"
>
> efibootguard: |
> WDOG_TIMEOUT = "0"
> @@ -23,4 +23,4 @@ local_conf_header:
>
> wic: |
> IMAGE_TYPE = "wic-swu-img"
> - WKS_FILE ?= "${MACHINE}-${BOOTLOADER}.wks"
> + WKS_FILE ?= "${MACHINE}-${SWUPDATE_BOOTLOADER}.wks"
> diff --git a/kas/opt/qemu-swupdate.yml b/kas/opt/qemu-swupdate.yml
> index 3f5fedf..daebd2c 100644
> --- a/kas/opt/qemu-swupdate.yml
> +++ b/kas/opt/qemu-swupdate.yml
> @@ -16,4 +16,4 @@ header:
> local_conf_header:
> qemu-wic: |
> IMAGE_TYPE ?= "wic-swu-img"
> - WKS_FILE = "qemu-amd64-${BOOTLOADER}.wks"
> + WKS_FILE = "qemu-amd64-${SWUPDATE_BOOTLOADER}.wks"
>
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
[-- Attachment #2: Type: text/plain, Size: 428 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6411): https://lists.cip-project.org/g/cip-dev/message/6411
Mute This Topic: https://lists.cip-project.org/mt/82480672/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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [cip-dev][isar-cip-core][PATCH v2] swupdate-config: add prefix to variables
2021-04-30 14:50 ` Jan Kiszka
@ 2021-05-03 11:28 ` Quirin Gylstorff
2021-05-03 11:44 ` Jan Kiszka
0 siblings, 1 reply; 11+ messages in thread
From: Quirin Gylstorff @ 2021-05-03 11:28 UTC (permalink / raw)
To: Jan Kiszka, cip-dev
[-- Attachment #1: Type: text/plain, Size: 4756 bytes --]
On 4/30/21 4:50 PM, Jan Kiszka wrote:
> On 30.04.21 15:01, Q. Gylstorff wrote:
>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>
>> The variables U_BOOT and BOOTLOADER are only used for swupdate.
>> Add the prefix SWUPDATE to indicate the intended usage.
>>
>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> ---
>> Changes in V2:
>> - fix typo in commit message
>> - use variable in kas/opt/*.yml
>>
>> classes/swupdate-config.bbclass | 10 +++++-----
>> kas/opt/ebg-secure-boot-snakeoil.yml | 2 +-
>> kas/opt/ebg-swu.yml | 4 ++--
>> kas/opt/qemu-swupdate.yml | 2 +-
>> 4 files changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/classes/swupdate-config.bbclass b/classes/swupdate-config.bbclass
>> index 9909113..0c1067a 100644
>> --- a/classes/swupdate-config.bbclass
>> +++ b/classes/swupdate-config.bbclass
>> @@ -51,13 +51,13 @@ 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"
>
> Still leaves me and probably other users clueless what SWUPDATE_U_BOOT
> should be. Simply "u-boot-${MACHINE}"?
>
> Jan
>
SWUPDATE_U_BOOT should be the name of the u-boot package.
In case the layer (e.g. isar-cip-core) supplies the u-boot binary,
`SWUPDATE_U_BOOT` should be defined as `u-boot-${MACHINE}`.
Debian provides some as package, e.g. [1].
I could add `u-boot-${MACHINE}` as default and a README section.
[1]: https://packages.debian.org/buster/u-boot-imx
Quirin
>> 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 +68,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
>> diff --git a/kas/opt/ebg-secure-boot-snakeoil.yml b/kas/opt/ebg-secure-boot-snakeoil.yml
>> index 8a72084..c0ed1a2 100644
>> --- a/kas/opt/ebg-secure-boot-snakeoil.yml
>> +++ b/kas/opt/ebg-secure-boot-snakeoil.yml
>> @@ -20,7 +20,7 @@ local_conf_header:
>> # Add snakeoil and ovmf binaries for qemu
>> IMAGER_BUILD_DEPS += "ebg-secure-boot-snakeoil ovmf-binaries"
>> IMAGER_INSTALL += "ebg-secure-boot-snakeoil"
>> - WKS_FILE = "${MACHINE}-${BOOTLOADER}-secureboot.wks"
>> + WKS_FILE = "${MACHINE}-efibootguard-secureboot.wks"
>>
>> ovmf: |
>> # snakeoil certs are only part of backports
>> diff --git a/kas/opt/ebg-swu.yml b/kas/opt/ebg-swu.yml
>> index aa3aed1..63dda09 100644
>> --- a/kas/opt/ebg-swu.yml
>> +++ b/kas/opt/ebg-swu.yml
>> @@ -15,7 +15,7 @@ header:
>> local_conf_header:
>> swupdate: |
>> IMAGE_INSTALL_append = " swupdate efibootguard"
>> - BOOTLOADER = "efibootguard"
>> + SWUPDATE_BOOTLOADER = "efibootguard"
>>
>> efibootguard: |
>> WDOG_TIMEOUT = "0"
>> @@ -23,4 +23,4 @@ local_conf_header:
>>
>> wic: |
>> IMAGE_TYPE = "wic-swu-img"
>> - WKS_FILE ?= "${MACHINE}-${BOOTLOADER}.wks"
>> + WKS_FILE ?= "${MACHINE}-${SWUPDATE_BOOTLOADER}.wks"
>> diff --git a/kas/opt/qemu-swupdate.yml b/kas/opt/qemu-swupdate.yml
>> index 3f5fedf..daebd2c 100644
>> --- a/kas/opt/qemu-swupdate.yml
>> +++ b/kas/opt/qemu-swupdate.yml
>> @@ -16,4 +16,4 @@ header:
>> local_conf_header:
>> qemu-wic: |
>> IMAGE_TYPE ?= "wic-swu-img"
>> - WKS_FILE = "qemu-amd64-${BOOTLOADER}.wks"
>> + WKS_FILE = "qemu-amd64-${SWUPDATE_BOOTLOADER}.wks"
>>
>
[-- Attachment #2: Type: text/plain, Size: 428 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6413): https://lists.cip-project.org/g/cip-dev/message/6413
Mute This Topic: https://lists.cip-project.org/mt/82480672/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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [cip-dev][isar-cip-core][PATCH v2] swupdate-config: add prefix to variables
2021-05-03 11:28 ` Quirin Gylstorff
@ 2021-05-03 11:44 ` Jan Kiszka
2021-05-03 15:45 ` Quirin Gylstorff
0 siblings, 1 reply; 11+ messages in thread
From: Jan Kiszka @ 2021-05-03 11:44 UTC (permalink / raw)
To: Gylstorff Quirin, cip-dev
[-- Attachment #1: Type: text/plain, Size: 2374 bytes --]
On 03.05.21 13:28, Gylstorff Quirin wrote:
>
>
> On 4/30/21 4:50 PM, Jan Kiszka wrote:
>> On 30.04.21 15:01, Q. Gylstorff wrote:
>>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>
>>> The variables U_BOOT and BOOTLOADER are only used for swupdate.
>>> Add the prefix SWUPDATE to indicate the intended usage.
>>>
>>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>> ---
>>> Changes in V2:
>>> - fix typo in commit message
>>> - use variable in kas/opt/*.yml
>>>
>>> classes/swupdate-config.bbclass | 10 +++++-----
>>> kas/opt/ebg-secure-boot-snakeoil.yml | 2 +-
>>> kas/opt/ebg-swu.yml | 4 ++--
>>> kas/opt/qemu-swupdate.yml | 2 +-
>>> 4 files changed, 9 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/classes/swupdate-config.bbclass
>>> b/classes/swupdate-config.bbclass
>>> index 9909113..0c1067a 100644
>>> --- a/classes/swupdate-config.bbclass
>>> +++ b/classes/swupdate-config.bbclass
>>> @@ -51,13 +51,13 @@ 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"
>>
>> Still leaves me and probably other users clueless what SWUPDATE_U_BOOT
>> should be. Simply "u-boot-${MACHINE}"?
>>
>> Jan
>>
>
> SWUPDATE_U_BOOT should be the name of the u-boot package.
>
> In case the layer (e.g. isar-cip-core) supplies the u-boot binary,
> `SWUPDATE_U_BOOT` should be defined as `u-boot-${MACHINE}`.
>
>
> Debian provides some as package, e.g. [1].
>
>
> I could add `u-boot-${MACHINE}` as default and a README section.
>
>
> [1]: https://packages.debian.org/buster/u-boot-imx
>
But does SWUpdate really depends on the U-Boot binary that is going to
be put on the device - or rather on u-boot-config? This looks fishy.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
[-- Attachment #2: Type: text/plain, Size: 428 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6414): https://lists.cip-project.org/g/cip-dev/message/6414
Mute This Topic: https://lists.cip-project.org/mt/82480672/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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [cip-dev][isar-cip-core][PATCH v2] swupdate-config: add prefix to variables
2021-05-03 11:44 ` Jan Kiszka
@ 2021-05-03 15:45 ` Quirin Gylstorff
2021-05-03 17:21 ` Jan Kiszka
0 siblings, 1 reply; 11+ messages in thread
From: Quirin Gylstorff @ 2021-05-03 15:45 UTC (permalink / raw)
To: Jan Kiszka, cip-dev
[-- Attachment #1: Type: text/plain, Size: 2924 bytes --]
On 5/3/21 1:44 PM, Jan Kiszka wrote:
> On 03.05.21 13:28, Gylstorff Quirin wrote:
>>
>>
>> On 4/30/21 4:50 PM, Jan Kiszka wrote:
>>> On 30.04.21 15:01, Q. Gylstorff wrote:
>>>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>>
>>>> The variables U_BOOT and BOOTLOADER are only used for swupdate.
>>>> Add the prefix SWUPDATE to indicate the intended usage.
>>>>
>>>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>> ---
>>>> Changes in V2:
>>>> - fix typo in commit message
>>>> - use variable in kas/opt/*.yml
>>>>
>>>> classes/swupdate-config.bbclass | 10 +++++-----
>>>> kas/opt/ebg-secure-boot-snakeoil.yml | 2 +-
>>>> kas/opt/ebg-swu.yml | 4 ++--
>>>> kas/opt/qemu-swupdate.yml | 2 +-
>>>> 4 files changed, 9 insertions(+), 9 deletions(-)
>>>>
>>>> diff --git a/classes/swupdate-config.bbclass
>>>> b/classes/swupdate-config.bbclass
>>>> index 9909113..0c1067a 100644
>>>> --- a/classes/swupdate-config.bbclass
>>>> +++ b/classes/swupdate-config.bbclass
>>>> @@ -51,13 +51,13 @@ 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"
>>>
>>> Still leaves me and probably other users clueless what SWUPDATE_U_BOOT
>>> should be. Simply "u-boot-${MACHINE}"?
>>>
>>> Jan
>>>
>>
>> SWUPDATE_U_BOOT should be the name of the u-boot package.
>>
>> In case the layer (e.g. isar-cip-core) supplies the u-boot binary,
>> `SWUPDATE_U_BOOT` should be defined as `u-boot-${MACHINE}`.
>>
>>
>> Debian provides some as package, e.g. [1].
>>
>>
>> I could add `u-boot-${MACHINE}` as default and a README section.
>>
>>
>> [1]: https://packages.debian.org/buster/u-boot-imx
>>
>
> But does SWUpdate really depends on the U-Boot binary that is going to
> be put on the device - or rather on u-boot-config? This looks fishy.
>
> Jan
>
SWUpdate does not depends on the u-boot-binary. SWUpdate needs
'fw_env.config'(u-boot-config) to interact with the u-boot environment.
As libubootenv does not request or provide 'fw_env.config' the code
above is necessary. SWUPDATE_U_BOOT is only used for creating a build
order.
Another way would be add u-boot-config as dependency to libubootenv in
isar upstream. This would also mean that we maintain that package build
instead of using the one provided by Debian bullseye and later.
Quirin
[-- Attachment #2: Type: text/plain, Size: 428 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6415): https://lists.cip-project.org/g/cip-dev/message/6415
Mute This Topic: https://lists.cip-project.org/mt/82480672/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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [cip-dev][isar-cip-core][PATCH v2] swupdate-config: add prefix to variables
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
0 siblings, 1 reply; 11+ messages in thread
From: Jan Kiszka @ 2021-05-03 17:21 UTC (permalink / raw)
To: Gylstorff Quirin, cip-dev
[-- Attachment #1: Type: text/plain, Size: 3976 bytes --]
On 03.05.21 17:45, Gylstorff Quirin wrote:
>
>
> On 5/3/21 1:44 PM, Jan Kiszka wrote:
>> On 03.05.21 13:28, Gylstorff Quirin wrote:
>>>
>>>
>>> On 4/30/21 4:50 PM, Jan Kiszka wrote:
>>>> On 30.04.21 15:01, Q. Gylstorff wrote:
>>>>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>>>
>>>>> The variables U_BOOT and BOOTLOADER are only used for swupdate.
>>>>> Add the prefix SWUPDATE to indicate the intended usage.
>>>>>
>>>>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>>> ---
>>>>> Changes in V2:
>>>>> - fix typo in commit message
>>>>> - use variable in kas/opt/*.yml
>>>>>
>>>>> classes/swupdate-config.bbclass | 10 +++++-----
>>>>> kas/opt/ebg-secure-boot-snakeoil.yml | 2 +-
>>>>> kas/opt/ebg-swu.yml | 4 ++--
>>>>> kas/opt/qemu-swupdate.yml | 2 +-
>>>>> 4 files changed, 9 insertions(+), 9 deletions(-)
>>>>>
>>>>> diff --git a/classes/swupdate-config.bbclass
>>>>> b/classes/swupdate-config.bbclass
>>>>> index 9909113..0c1067a 100644
>>>>> --- a/classes/swupdate-config.bbclass
>>>>> +++ b/classes/swupdate-config.bbclass
>>>>> @@ -51,13 +51,13 @@ 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"
>>>>
>>>> Still leaves me and probably other users clueless what SWUPDATE_U_BOOT
>>>> should be. Simply "u-boot-${MACHINE}"?
>>>>
>>>> Jan
>>>>
>>>
>>> SWUPDATE_U_BOOT should be the name of the u-boot package.
>>>
>>> In case the layer (e.g. isar-cip-core) supplies the u-boot binary,
>>> `SWUPDATE_U_BOOT` should be defined as `u-boot-${MACHINE}`.
>>>
>>>
>>> Debian provides some as package, e.g. [1].
>>>
>>>
>>> I could add `u-boot-${MACHINE}` as default and a README section.
>>>
>>>
>>> [1]: https://packages.debian.org/buster/u-boot-imx
>>>
>>
>> But does SWUpdate really depends on the U-Boot binary that is going to
>> be put on the device - or rather on u-boot-config? This looks fishy.
>>
>> Jan
>>
>
> SWUpdate does not depends on the u-boot-binary. SWUpdate needs
> 'fw_env.config'(u-boot-config) to interact with the u-boot environment.
And for that, it needs u-boot-config as package, not u-boot-<machine>.
> As libubootenv does not request or provide 'fw_env.config' the code
> above is necessary. SWUPDATE_U_BOOT is only used for creating a build
> order.
Build order is meaningless if you are not consuming the output - which I
assume is the case via fw_env.config from u-boot-config /
u-boot-<machine>-config.
>
> Another way would be add u-boot-config as dependency to libubootenv in
> isar upstream. This would also mean that we maintain that package build
> instead of using the one provided by Debian bullseye and later.
Is libubootenv useless without some u-boot-config package? If so, it
would also be Debian upstream bug, and both sides needed fixing.
But I still don't get the full picture: With self-built U-Boot, we
generate u-boot-<machine>-config, providing fw_env.config. That file is
required during runtime or build time by SWUpdate?
But who is providing that file if we wanted to use an upstream Debian
U-Boot? It's not packaged with any of those. So, depending on a Debian
U-Boot package seems totally pointless. In fact, using a Debian U-Boot
seems impossible with our SWUpdate requirements, no?
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
[-- Attachment #2: Type: text/plain, Size: 428 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6416): https://lists.cip-project.org/g/cip-dev/message/6416
Mute This Topic: https://lists.cip-project.org/mt/82480672/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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 11+ messages in thread
* [cip-dev][isar-cip-core][PATCH v3 0/2] swupdate-config: variables cleanup
2021-05-03 17:21 ` Jan Kiszka
@ 2021-05-05 8:05 ` 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
0 siblings, 2 replies; 11+ messages in thread
From: Quirin Gylstorff @ 2021-05-05 8:05 UTC (permalink / raw)
To: jan.kiszka, cip-dev; +Cc: Quirin Gylstorff
[-- Attachment #1: Type: text/plain, Size: 777 bytes --]
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
This patch removes the variable U_BOOT from the swupdate-config.bbclass.
It also adds the suffix `SWUPDATE` to the variable BOOTLOADER.
If a custom u-boot is used in concunction with swupdate it is
recommened to set `U_BOOT_CONFIG_PACKAGE` to '1'. This now adds
a dependency from SWupdate to u-boot-{MACHINE}-config for installing
fw_env.config.
Quirin Gylstorff (2):
swupdate-config: remove variable U_BOOT
swupdate-config: add prefix to variables
classes/swupdate-config.bbclass | 17 ++++++++++-------
kas/opt/ebg-secure-boot-snakeoil.yml | 2 +-
kas/opt/ebg-swu.yml | 4 ++--
kas/opt/qemu-swupdate.yml | 2 +-
4 files changed, 14 insertions(+), 11 deletions(-)
--
2.20.1
[-- Attachment #2: Type: text/plain, Size: 428 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6420): https://lists.cip-project.org/g/cip-dev/message/6420
Mute This Topic: https://lists.cip-project.org/mt/82599403/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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 11+ messages in thread
* [cip-dev][isar-cip-core][PATCH v3 1/2] swupdate-config: remove variable U_BOOT
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 ` Quirin Gylstorff
2021-05-05 8:05 ` [cip-dev][isar-cip-core][PATCH v3 2/2] swupdate-config: add prefix to variables Quirin Gylstorff
1 sibling, 0 replies; 11+ messages in thread
From: Quirin Gylstorff @ 2021-05-05 8:05 UTC (permalink / raw)
To: jan.kiszka, cip-dev; +Cc: Quirin Gylstorff
[-- Attachment #1: Type: text/plain, Size: 2106 bytes --]
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
The dependency to ${U_BOOT} is unnecessary for the
SWUPDATE build and the package deployment. The package
`u-boot-${MACHINE}-config` is requested for fw_env.config
from a custom u-boot build. SWUpdate uses fw_env.config
to read/write the u-boot environment.
If the Package `u-boot-${MACHINE}-config` is not activated during
the build, by setting `U_BOOT_CONFIG_PACKAGE` to '1',
then do not add `u-boot-${MACHINE}-config` to the
swupdate dependencies.
U-Boot build by Debian provides example configurations
for different boards with the package u-boot-tools.
If u-boot-tools are installed these examples can be found
at config /usr/share/doc/u-boot-tools/examples/.
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
classes/swupdate-config.bbclass | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/classes/swupdate-config.bbclass b/classes/swupdate-config.bbclass
index 9909113..5af4eba 100644
--- a/classes/swupdate-config.bbclass
+++ b/classes/swupdate-config.bbclass
@@ -45,13 +45,16 @@ KFEATURE_ubi[KCONFIG_SNIPPETS] = "file://swupdate_defconfig_ubi.snippet"
KFEATURE_DEPS[ubi] = "mtd"
-USE_U_BOOT_CONFIG ?= "true"
KFEATURE_u-boot = ""
KFEATURE_u-boot[BUILD_DEB_DEPENDS] = "libubootenv-dev"
+# we need u-boot-${MACHINE}-config for fw_env.config
+# only custom build u-boot provides this package
+# for u-boot provided by debian u-boot-tools provides
+# example configurations at /usr/share/doc/u-boot-tools/examples
KFEATURE_u-boot[DEBIAN_DEPENDS] = "${@ 'libubootenv0.1, u-boot-${MACHINE}-config' \
- if d.getVar("USE_U_BOOT_CONFIG", True) == "true" \
+ if d.getVar("U_BOOT_CONFIG_PACKAGE", True) == "1" \
else 'libubootenv0.1'}"
-KFEATURE_u-boot[DEPENDS] = "${U_BOOT} libubootenv"
+KFEATURE_u-boot[DEPENDS] = "libubootenv"
KFEATURE_u-boot[KCONFIG_SNIPPETS] = "file://swupdate_defconfig_u-boot.snippet"
SWUPDATE_LUASCRIPT ?= "swupdate_handlers.lua"
--
2.20.1
[-- Attachment #2: Type: text/plain, Size: 428 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6421): https://lists.cip-project.org/g/cip-dev/message/6421
Mute This Topic: https://lists.cip-project.org/mt/82599404/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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [cip-dev][isar-cip-core][PATCH v3 2/2] swupdate-config: add prefix to variables
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 ` Quirin Gylstorff
1 sibling, 0 replies; 11+ messages in thread
From: Quirin Gylstorff @ 2021-05-05 8:05 UTC (permalink / raw)
To: jan.kiszka, cip-dev; +Cc: Quirin Gylstorff
[-- Attachment #1: Type: text/plain, Size: 3364 bytes --]
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
The variables U_BOOT and BOOTLOADER are only used for swupdate.
Add the prefix SWUPDATE to indicate the intended usage.
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
classes/swupdate-config.bbclass | 8 ++++----
kas/opt/ebg-secure-boot-snakeoil.yml | 2 +-
kas/opt/ebg-swu.yml | 4 ++--
kas/opt/qemu-swupdate.yml | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/classes/swupdate-config.bbclass b/classes/swupdate-config.bbclass
index 5af4eba..4e46b37 100644
--- a/classes/swupdate-config.bbclass
+++ b/classes/swupdate-config.bbclass
@@ -60,7 +60,7 @@ 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":
@@ -71,11 +71,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
diff --git a/kas/opt/ebg-secure-boot-snakeoil.yml b/kas/opt/ebg-secure-boot-snakeoil.yml
index 8a72084..c0ed1a2 100644
--- a/kas/opt/ebg-secure-boot-snakeoil.yml
+++ b/kas/opt/ebg-secure-boot-snakeoil.yml
@@ -20,7 +20,7 @@ local_conf_header:
# Add snakeoil and ovmf binaries for qemu
IMAGER_BUILD_DEPS += "ebg-secure-boot-snakeoil ovmf-binaries"
IMAGER_INSTALL += "ebg-secure-boot-snakeoil"
- WKS_FILE = "${MACHINE}-${BOOTLOADER}-secureboot.wks"
+ WKS_FILE = "${MACHINE}-efibootguard-secureboot.wks"
ovmf: |
# snakeoil certs are only part of backports
diff --git a/kas/opt/ebg-swu.yml b/kas/opt/ebg-swu.yml
index aa3aed1..63dda09 100644
--- a/kas/opt/ebg-swu.yml
+++ b/kas/opt/ebg-swu.yml
@@ -15,7 +15,7 @@ header:
local_conf_header:
swupdate: |
IMAGE_INSTALL_append = " swupdate efibootguard"
- BOOTLOADER = "efibootguard"
+ SWUPDATE_BOOTLOADER = "efibootguard"
efibootguard: |
WDOG_TIMEOUT = "0"
@@ -23,4 +23,4 @@ local_conf_header:
wic: |
IMAGE_TYPE = "wic-swu-img"
- WKS_FILE ?= "${MACHINE}-${BOOTLOADER}.wks"
+ WKS_FILE ?= "${MACHINE}-${SWUPDATE_BOOTLOADER}.wks"
diff --git a/kas/opt/qemu-swupdate.yml b/kas/opt/qemu-swupdate.yml
index 3f5fedf..daebd2c 100644
--- a/kas/opt/qemu-swupdate.yml
+++ b/kas/opt/qemu-swupdate.yml
@@ -16,4 +16,4 @@ header:
local_conf_header:
qemu-wic: |
IMAGE_TYPE ?= "wic-swu-img"
- WKS_FILE = "qemu-amd64-${BOOTLOADER}.wks"
+ WKS_FILE = "qemu-amd64-${SWUPDATE_BOOTLOADER}.wks"
--
2.20.1
[-- Attachment #2: Type: text/plain, Size: 428 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6422): https://lists.cip-project.org/g/cip-dev/message/6422
Mute This Topic: https://lists.cip-project.org/mt/82599502/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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-05-05 8:12 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 12:20 [cip-dev][isar-cip-core][PATCH] swupdate-config: add prefix to variables Quirin Gylstorff
2021-04-30 12:32 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).