Hi Anthony,

On 9/26/23 06:36, Anthony Davies via lists.yoctoproject.org wrote:
[You don't often get email from 
anthony.t.davies=gmail....@lists.yoctoproject.org. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

From: Anthony Davies <anthony.t.dav...@gmail.com>

Apologies, this is the correct patch

Updated inc files to allow overriding KERNEL_IMAGETYPE in local.conf

Fixed bug where dtb couldnt be found when generating KERNEL_IMAGETYPE
other then fitImage image due to KERNEL_DEVICETREE containing the dtb
directory which is not available in the DEPLOY_DIR_IMAGE directory
---
  conf/machine/include/px30.inc         | 2 +-
  conf/machine/include/rk3066.inc       | 2 +-
  conf/machine/include/rk3188.inc       | 2 +-
  conf/machine/include/rk3288.inc       | 2 +-
  conf/machine/include/rk3328.inc       | 2 +-
  conf/machine/include/rk3399.inc       | 2 +-
  conf/machine/include/rockchip-wic.inc | 5 ++++-
  7 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/conf/machine/include/px30.inc b/conf/machine/include/px30.inc
index a3727fb..badcbcd 100644
--- a/conf/machine/include/px30.inc
+++ b/conf/machine/include/px30.inc
@@ -12,7 +12,7 @@ require conf/machine/include/rockchip-wic.inc

  KBUILD_DEFCONFIG ?= "defconfig"
  KERNEL_CLASSES = "kernel-fitimage"
-KERNEL_IMAGETYPE = "fitImage"
+KERNEL_IMAGETYPE ?= "fitImage"

  TFA_PLATFORM = "px30"
  TFA_BUILD_TARGET = "bl31"
diff --git a/conf/machine/include/rk3066.inc b/conf/machine/include/rk3066.inc
index fa97906..3510df2 100644
--- a/conf/machine/include/rk3066.inc
+++ b/conf/machine/include/rk3066.inc
@@ -11,4 +11,4 @@ SERIAL_CONSOLES = "115200;ttyS2"

  KBUILD_DEFCONFIG = "multi_v7_defconfig"
  KERNEL_FEATURES:append:rk3066 = " 
bsp/rockchip/remove-non-rockchip-arch-arm.scc"
-KERNEL_IMAGETYPE = "zImage"
+KERNEL_IMAGETYPE ?= "zImage"
diff --git a/conf/machine/include/rk3188.inc b/conf/machine/include/rk3188.inc
index bc96a0c..830f908 100644
--- a/conf/machine/include/rk3188.inc
+++ b/conf/machine/include/rk3188.inc
@@ -11,4 +11,4 @@ SERIAL_CONSOLES = "115200;ttyFIQ0"

  KBUILD_DEFCONFIG = "multi_v7_defconfig"
  KERNEL_FEATURES:append:rk3188 = " 
bsp/rockchip/remove-non-rockchip-arch-arm.scc"
-KERNEL_IMAGETYPE = "zImage"
+KERNEL_IMAGETYPE ?= "zImage"
diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
index b4c559d..e682c0b 100644
--- a/conf/machine/include/rk3288.inc
+++ b/conf/machine/include/rk3288.inc
@@ -11,6 +11,6 @@ SERIAL_CONSOLES = "115200;ttyS2"

  KBUILD_DEFCONFIG ?= "multi_v7_defconfig"
  KERNEL_FEATURES:append:rk3288 = " 
bsp/rockchip/remove-non-rockchip-arch-arm.scc"
-KERNEL_IMAGETYPE = "zImage"
+KERNEL_IMAGETYPE ?= "zImage"

  UBOOT_SUFFIX ?= "bin"
diff --git a/conf/machine/include/rk3328.inc b/conf/machine/include/rk3328.inc
index f9f8792..6be777c 100644
--- a/conf/machine/include/rk3328.inc
+++ b/conf/machine/include/rk3328.inc
@@ -13,7 +13,7 @@ require conf/machine/include/rockchip-wic.inc
  KBUILD_DEFCONFIG ?= "defconfig"
  KERNEL_FEATURES:append:rk3328 = " 
bsp/rockchip/remove-non-rockchip-arch-arm64.scc"
  KERNEL_CLASSES = "kernel-fitimage"
-KERNEL_IMAGETYPE = "fitImage"
+KERNEL_IMAGETYPE ?= "fitImage"

  TFA_PLATFORM = "rk3328"
  TFA_BUILD_TARGET = "bl31"
diff --git a/conf/machine/include/rk3399.inc b/conf/machine/include/rk3399.inc
index 88c87af..5a3f439 100644
--- a/conf/machine/include/rk3399.inc
+++ b/conf/machine/include/rk3399.inc
@@ -13,7 +13,7 @@ require conf/machine/include/rockchip-wic.inc
  KBUILD_DEFCONFIG ?= "defconfig"
  KERNEL_FEATURES:append:rk3399 = " 
bsp/rockchip/remove-non-rockchip-arch-arm64.scc"
  KERNEL_CLASSES = "kernel-fitimage"
-KERNEL_IMAGETYPE = "fitImage"
+KERNEL_IMAGETYPE ?= "fitImage"

  TFA_PLATFORM = "rk3399"
  TFA_BUILD_TARGET = "bl31"
diff --git a/conf/machine/include/rockchip-wic.inc 
b/conf/machine/include/rockchip-wic.inc
index 635288c..8ff6066 100644
--- a/conf/machine/include/rockchip-wic.inc
+++ b/conf/machine/include/rockchip-wic.inc
@@ -11,9 +11,12 @@ WKS_FILE_DEPENDS ?= " \
         virtual/bootloader \
         virtual/kernel \
         "
+
+KERNEL_DEVICETREE_BASENAME = "${@os.path.basename('${KERNEL_DEVICETREE}')}"
+

KERNEL_DEVICETREE is a space-separated list so we need to handle it this way I think?

Something like:
"""
${@os.path.basename(x) for x in (d.getVar("KERNEL_DEVICETREE") or "").split()
"""

but which is valid Python :) (not tested).

Otherwise, I guess this could be added to oe-core directly no? What do you think?

Cheers,
Quentin

  IMAGE_BOOT_FILES = " \
         ${KERNEL_IMAGETYPE} \
-       ${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', 
'${KERNEL_DEVICETREE}', d)} \
+       ${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', 
'${KERNEL_DEVICETREE_BASENAME}', d)} \
         "

  # use the first-defined <baud>;<device> pair in SERIAL_CONSOLES
--
2.34.1





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61127): https://lists.yoctoproject.org/g/yocto/message/61127
Mute This Topic: https://lists.yoctoproject.org/mt/101589776/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to