diff mbox series

uki.bbclass: handle undefined KERNEL_DEVICETREE variable

Message ID 20260402105450.2672139-1-pavel@loebl.cz
State Rejected
Headers show
Series uki.bbclass: handle undefined KERNEL_DEVICETREE variable | expand

Commit Message

Pavel Löbl April 2, 2026, 10:54 a.m. UTC
When kernel DTB is provided by firmware, KERNEL_DEVICETREE can be
undefined. This the case when U-Boot provides the devicetree (compiled
from it's own sources) via EFI configuration table.

Currently this case results in following error:

    do_uki: ERROR: cannot find
...build/tmp/deploy/images/machine/${KERNEL_DEVICETREE}

Therefore handle undefined variable as empty to skip DTB inclusion.

Signed-off-by: Pavel Löbl <pavel@loebl.cz>
---
 meta/classes-recipe/uki.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Purdie April 2, 2026, 11:19 a.m. UTC | #1
On Thu, 2026-04-02 at 12:54 +0200, Pavel Löbl via lists.openembedded.org wrote:
> When kernel DTB is provided by firmware, KERNEL_DEVICETREE can be
> undefined. This the case when U-Boot provides the devicetree (compiled
> from it's own sources) via EFI configuration table.
> 
> Currently this case results in following error:
> 
>     do_uki: ERROR: cannot find
> ...build/tmp/deploy/images/machine/${KERNEL_DEVICETREE}
> 
> Therefore handle undefined variable as empty to skip DTB inclusion.
> 
> Signed-off-by: Pavel Löbl <pavel@loebl.cz>
> ---
>  meta/classes-recipe/uki.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes-recipe/uki.bbclass b/meta/classes-recipe/uki.bbclass
> index 326697a06660..d16f3c95561e 100644
> --- a/meta/classes-recipe/uki.bbclass
> +++ b/meta/classes-recipe/uki.bbclass
> @@ -80,7 +80,7 @@ UKI_CONFIG_FILE ?= "${UNPACKDIR}/uki.conf"
>  UKI_FILENAME ?= "uki.efi"
>  UKI_KERNEL_FILENAME ?= "${KERNEL_IMAGETYPE}"
>  UKI_CMDLINE ?= "rootwait root=LABEL=root"
> -UKI_DEVICETREE ?= "${KERNEL_DEVICETREE}"
> +UKI_DEVICETREE ?= "${@d.getVar('KERNEL_DEVICETREE') or ''}"
>  # secure boot keys and cert, needs sbsign-tools-native (meta-secure-core)
>  #UKI_SB_KEY ?= ""
>  #UKI_SB_CERT ?= ""

A fix just merged for this:

https://git.openembedded.org/openembedded-core/commit/?id=c3ab994e4b1c1db5d967a93d5b3e999f26332f8a

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/classes-recipe/uki.bbclass b/meta/classes-recipe/uki.bbclass
index 326697a06660..d16f3c95561e 100644
--- a/meta/classes-recipe/uki.bbclass
+++ b/meta/classes-recipe/uki.bbclass
@@ -80,7 +80,7 @@  UKI_CONFIG_FILE ?= "${UNPACKDIR}/uki.conf"
 UKI_FILENAME ?= "uki.efi"
 UKI_KERNEL_FILENAME ?= "${KERNEL_IMAGETYPE}"
 UKI_CMDLINE ?= "rootwait root=LABEL=root"
-UKI_DEVICETREE ?= "${KERNEL_DEVICETREE}"
+UKI_DEVICETREE ?= "${@d.getVar('KERNEL_DEVICETREE') or ''}"
 # secure boot keys and cert, needs sbsign-tools-native (meta-secure-core)
 #UKI_SB_KEY ?= ""
 #UKI_SB_CERT ?= ""