All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-rockchip][PATCH v2] KERNEL_DEVICETREE: 32-bit re-org
@ 2024-01-24  3:24 Trevor Woerner
  0 siblings, 0 replies; only message in thread
From: Trevor Woerner @ 2024-01-24  3:24 UTC (permalink / raw)
  To: yocto; +Cc: Stephen Chen

The upstream kernel reorganized the 32-bit arch/arm device-tree directory
structure to separate out the device-trees by manufacturer (similar to the
organization of the arch/arm64 device-trees). Update the references to
32-bit arm device-trees to match.

This patch can now be applied since all pre-6.5-rc1 kernels have been
removed from oe-core.

NOTE: trying to build a post-6.5-rc1 32-bit kernel with this patch applied
      will fail

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Stephen Chen <stephen@radxa.com>
---
 classes/rockchip-gpt-img.bbclass      | 2 +-
 conf/machine/firefly-rk3288.conf      | 2 +-
 conf/machine/include/rockchip-wic.inc | 6 +++++-
 conf/machine/marsboard-rk3066.conf    | 2 +-
 conf/machine/radxarock.conf           | 2 +-
 conf/machine/rock2-square.conf        | 2 +-
 conf/machine/tinker-board-s.conf      | 2 +-
 conf/machine/tinker-board.conf        | 2 +-
 conf/machine/vyasa-rk3288.conf        | 2 +-
 9 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/classes/rockchip-gpt-img.bbclass b/classes/rockchip-gpt-img.bbclass
index b698db0798ea..440dcac7874d 100644
--- a/classes/rockchip-gpt-img.bbclass
+++ b/classes/rockchip-gpt-img.bbclass
@@ -108,7 +108,7 @@ create_rk_image () {
 	mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::${KERNEL_IMAGETYPE}
 
 	DEVICETREE_DEFAULT=""
-	for DTS_FILE in ${KERNEL_DEVICETREE}; do
+	for DTS_FILE in $(echo ${KERNEL_DEVICETREE} | cut -d'/' -f2); do
 		[ -n "${DEVICETREE_DEFAULT}"] && DEVICETREE_DEFAULT="${DTS_FILE}"
 		mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${DEPLOY_DIR_IMAGE}/${DTS_FILE} ::${DTS_FILE}
 	done
diff --git a/conf/machine/firefly-rk3288.conf b/conf/machine/firefly-rk3288.conf
index 3270bb9f1657..6ff1be822008 100644
--- a/conf/machine/firefly-rk3288.conf
+++ b/conf/machine/firefly-rk3288.conf
@@ -9,5 +9,5 @@
 require conf/machine/include/rk3288.inc
 require conf/machine/include/rockchip-wic.inc
 
-KERNEL_DEVICETREE = "rk3288-firefly.dtb"
+KERNEL_DEVICETREE = "rockchip/rk3288-firefly.dtb"
 UBOOT_MACHINE = "firefly-rk3288_defconfig"
diff --git a/conf/machine/include/rockchip-wic.inc b/conf/machine/include/rockchip-wic.inc
index 635288ca4e98..b1ca27cdd0a2 100644
--- a/conf/machine/include/rockchip-wic.inc
+++ b/conf/machine/include/rockchip-wic.inc
@@ -11,9 +11,13 @@ WKS_FILE_DEPENDS ?= " \
 	virtual/bootloader \
 	virtual/kernel \
 	"
+# KERNEL_DEVICETREE follows the pattern of 'rockchip/${SOC_FAMILY}-${BOARD}.dtb'
+# but is placed in the deploy directory as simply '${SOC_FAMILY}-${BOARD}.dtb'
+# therefore we have to strip off the 'rockchip/' for IMAGE_BOOT_FILES
+NONFITDT="${@d.getVar('KERNEL_DEVICETREE').split('/')[1]}"
 IMAGE_BOOT_FILES = " \
 	${KERNEL_IMAGETYPE} \
-	${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${KERNEL_DEVICETREE}', d)} \
+	${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${NONFITDT}', d)} \
 	"
 
 # use the first-defined <baud>;<device> pair in SERIAL_CONSOLES
diff --git a/conf/machine/marsboard-rk3066.conf b/conf/machine/marsboard-rk3066.conf
index 52fd256a3445..36945e8e407b 100644
--- a/conf/machine/marsboard-rk3066.conf
+++ b/conf/machine/marsboard-rk3066.conf
@@ -8,4 +8,4 @@
 
 require conf/machine/include/rk3066.inc
 
-KERNEL_DEVICETREE = "rk3066a-marsboard.dtb"
+KERNEL_DEVICETREE = "rockchip/rk3066a-marsboard.dtb"
diff --git a/conf/machine/radxarock.conf b/conf/machine/radxarock.conf
index 42d8848e1d09..6ad8474669d0 100644
--- a/conf/machine/radxarock.conf
+++ b/conf/machine/radxarock.conf
@@ -9,4 +9,4 @@
 
 require conf/machine/include/rk3188.inc
 
-KERNEL_DEVICETREE = "rk3188-radxarock.dtb"
+KERNEL_DEVICETREE = "rockchip/rk3188-radxarock.dtb"
diff --git a/conf/machine/rock2-square.conf b/conf/machine/rock2-square.conf
index 46064eebcc67..9468b9a6b559 100644
--- a/conf/machine/rock2-square.conf
+++ b/conf/machine/rock2-square.conf
@@ -9,7 +9,7 @@
 require conf/machine/include/rk3288.inc
 
 SPL_BINARY = "u-boot-spl-dtb.bin"
-KERNEL_DEVICETREE = "rk3288-rock2-square.dtb"
+KERNEL_DEVICETREE = "rockchip/rk3288-rock2-square.dtb"
 UBOOT_MACHINE = "rock2_defconfig"
 
 # This board doesn't support the combined idbloader, so resort to the older
diff --git a/conf/machine/tinker-board-s.conf b/conf/machine/tinker-board-s.conf
index 870b9bcdf8c7..3a656136c554 100644
--- a/conf/machine/tinker-board-s.conf
+++ b/conf/machine/tinker-board-s.conf
@@ -7,5 +7,5 @@
 
 require conf/machine/include/tinker.inc
 
-KERNEL_DEVICETREE = "rk3288-tinker-s.dtb"
+KERNEL_DEVICETREE = "rockchip/rk3288-tinker-s.dtb"
 UBOOT_MACHINE = "tinker-s-rk3288_defconfig"
diff --git a/conf/machine/tinker-board.conf b/conf/machine/tinker-board.conf
index 8fe5f6305d70..ef1a1c1ac098 100644
--- a/conf/machine/tinker-board.conf
+++ b/conf/machine/tinker-board.conf
@@ -7,5 +7,5 @@
 
 require conf/machine/include/tinker.inc
 
-KERNEL_DEVICETREE = "rk3288-tinker.dtb"
+KERNEL_DEVICETREE = "rockchip/rk3288-tinker.dtb"
 UBOOT_MACHINE = "tinker-rk3288_defconfig"
diff --git a/conf/machine/vyasa-rk3288.conf b/conf/machine/vyasa-rk3288.conf
index 5b44257acec8..52b440100407 100644
--- a/conf/machine/vyasa-rk3288.conf
+++ b/conf/machine/vyasa-rk3288.conf
@@ -9,7 +9,7 @@ require conf/machine/include/rk3288.inc
 require conf/machine/include/rockchip-wic.inc
 
 KERNEL_IMAGETYPE = "uImage"
-KERNEL_DEVICETREE = "rk3288-vyasa.dtb"
+KERNEL_DEVICETREE = "rockchip/rk3288-vyasa.dtb"
 KERNEL_EXTRA_ARGS += "LOADADDR=0x02000000"
 
 UBOOT_MACHINE = "vyasa-rk3288_defconfig"
-- 
2.43.0.76.g1a87c842ece3



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-24  3:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-24  3:24 [meta-rockchip][PATCH v2] KERNEL_DEVICETREE: 32-bit re-org Trevor Woerner

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.