Skip to contentSkip to conversation

uki.bbclass: fix UKI_DEVICETREE usage

PATCH In review Mikko Rapeli 2 participants 2 messages Mar 30

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 uki.bbclass: fix UKI_DEVICETREE usage

Set KERNEL_DEVICETREE to empty string with weakest assignment if machine does not set this. This changes UKI_DEVICETREE to an empty string by default and fixes genericarm64 uki image builds:

ERROR: ERROR: cannot find /home/builder/src/core/build/tmp/deploy/images/genericarm64/${KERNEL_DEVICETREE}.

Also remove UKI_DEVICETREE setting in wic and uki oeqa selftests since the class now handles it correctly.

---
 meta/classes-recipe/uki.bbclass     | 1 +
 meta/lib/oeqa/selftest/cases/uki.py | 3 ---
 meta/lib/oeqa/selftest/cases/wic.py | 4 ----
 3 files changed, 1 insertion(+), 7 deletions(-)

v2: weakly set KERNEL_DEVICETREE to empty as suggested by Richard,
remove setting of UKI_DEVICETREE in uki and wic selftests as suggested by Jon

v1: https://lists.openembedded.org/g/openembedded-core/message/233870

meta/classes-recipe/uki.bbclass +1 -0
index 326697a06660..938f0f80614b 100644
@@ -80,6 +80,7 @@ UKI_CONFIG_FILE ?= "${UNPACKDIR}/uki.conf"
 UKI_FILENAME ?= "uki.efi"
 UKI_KERNEL_FILENAME ?= "${KERNEL_IMAGETYPE}"
 UKI_CMDLINE ?= "rootwait root=LABEL=root"
+KERNEL_DEVICETREE ??= ""
 UKI_DEVICETREE ?= "${KERNEL_DEVICETREE}"
 # secure boot keys and cert, needs sbsign-tools-native (meta-secure-core)
 #UKI_SB_KEY ?= ""
meta/lib/oeqa/selftest/cases/uki.py +0 -3
index 4265a40e9e11..fc31fb767a64 100644
@@ -47,9 +47,6 @@ QB_DEFAULT_KERNEL = "none"
 # boot command line provided via uki, not via bootloader
 UKI_CMDLINE = "rootwait root=LABEL=root console=${KERNEL_CONSOLE}"
 
-# qemu provides the devicetree at boot, do not embed a dtb in the uki for selftests
-UKI_DEVICETREE = ""
-
 # disable kvm, breaks boot
 QEMU_USE_KVM = ""
 
meta/lib/oeqa/selftest/cases/wic.py +0 -4
index 644247684576..3b61c3295e0d 100644
@@ -1580,10 +1580,6 @@ QB_DEFAULT_KERNEL = "none"
 
 # boot command line provided via uki, not via bootloader
 UKI_CMDLINE = "rootwait root=LABEL=root console=${KERNEL_CONSOLE}"
-
-# qemu provides the devicetree at boot, do not embed a dtb in the uki for selftests
-UKI_DEVICETREE = ""
-
 """
         self.append_config(config)
         bitbake('core-image-base ovmf')
Signature · 1 line
2.34.1
#1 lore raw
Quoted 11 lines · Mikko Rapeli via lists.openembedded.org

Set KERNEL_DEVICETREE to empty string with weakest assignment if machine does not set this. This changes UKI_DEVICETREE to an empty string by default and fixes genericarm64 uki image builds:

ERROR: ERROR: cannot find /home/builder/src/core/build/tmp/deploy/images/genericarm64/${KERNEL_DEVICETREE}.

Also remove UKI_DEVICETREE setting in wic and uki oeqa selftests since the class now handles it correctly.

Sanity tested this patch on top of the master branch with the meta-arm qemuarm64-secureboot and uefi-secureboot (and testimage), and everything was happy. I did not test the selftest to verify that part works.

Thanks,
Jon

Quoted 66 lines
---
 meta/classes-recipe/uki.bbclass     | 1 +
 meta/lib/oeqa/selftest/cases/uki.py | 3 ---
 meta/lib/oeqa/selftest/cases/wic.py | 4 ----
 3 files changed, 1 insertion(+), 7 deletions(-)

v2: weakly set KERNEL_DEVICETREE to empty as suggested by Richard,
remove setting of UKI_DEVICETREE in uki and wic selftests as suggested by Jon

v1: https://lists.openembedded.org/g/openembedded-core/message/233870

meta/classes-recipe/uki.bbclass +1 -0
index 326697a06660..938f0f80614b 100644
@@ -80,6 +80,7 @@ UKI_CONFIG_FILE ?= "${UNPACKDIR}/uki.conf"
 UKI_FILENAME ?= "uki.efi"
 UKI_KERNEL_FILENAME ?= "${KERNEL_IMAGETYPE}"
 UKI_CMDLINE ?= "rootwait root=LABEL=root"
+KERNEL_DEVICETREE ??= ""
 UKI_DEVICETREE ?= "${KERNEL_DEVICETREE}"
 # secure boot keys and cert, needs sbsign-tools-native (meta-secure-core)
 #UKI_SB_KEY ?= ""
meta/lib/oeqa/selftest/cases/uki.py +0 -3
index 4265a40e9e11..fc31fb767a64 100644
@@ -47,9 +47,6 @@ QB_DEFAULT_KERNEL = "none"
 # boot command line provided via uki, not via bootloader
 UKI_CMDLINE = "rootwait root=LABEL=root console=${KERNEL_CONSOLE}"
 
-# qemu provides the devicetree at boot, do not embed a dtb in the uki for selftests
-UKI_DEVICETREE = ""
-
 # disable kvm, breaks boot
 QEMU_USE_KVM = ""
 
meta/lib/oeqa/selftest/cases/wic.py +0 -5
index 644247684576..3b61c3295e0d 100644
@@ -1580,10 +1580,6 @@ QB_DEFAULT_KERNEL = "none"
 
 # boot command line provided via uki, not via bootloader
 UKI_CMDLINE = "rootwait root=LABEL=root console=${KERNEL_CONSOLE}"
-
-# qemu provides the devicetree at boot, do not embed a dtb in the uki for selftests
-UKI_DEVICETREE = ""
-
 """
         self.append_config(config)
         bitbake('core-image-base ovmf')
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#234224): https://lists.openembedded.org/g/openembedded-core/message/234224
Mute This Topic: https://lists.openembedded.org/mt/118576361/3616920
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-