From 13316b7968144e5249e38431160a7c74c9fb8af8 Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Tue, 3 Oct 2023 00:19:41 -0400 Subject: [PATCH] KERNEL_DEVICETREE: 32-bit re-org 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 Signed-off-by: Stephen Chen --- 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 b698db0..440dcac 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 3270bb9..6ff1be8 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 635288c..b1ca27c 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 ; pair in SERIAL_CONSOLES diff --git a/conf/machine/marsboard-rk3066.conf b/conf/machine/marsboard-rk3066.conf index 52fd256..36945e8 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 42d8848..6ad8474 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 46064ee..9468b9a 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 870b9bc..3a65613 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 8fe5f63..ef1a1c1 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 5b44257..52b4401 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"