]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
u-boot: Map arm64 into map for u-boot dts installation
authorPavel Zhukov <pavel@zhukoff.net>
Wed, 22 Feb 2023 21:33:41 +0000 (22:33 +0100)
committerSteve Sakoman <steve@sakoman.com>
Fri, 10 Mar 2023 15:54:34 +0000 (05:54 -1000)
While arm64 is a valid UBOOT_ARCH (according to mkimage -A) u-boot
keeps arm64 specific dts under 'arch/arm' directory.
As the result the recipe tries to install arch/arm64 (if UBOOT_DTB
was specified) and fails with [1]. Remapping "arm64" to "arm" to fix this
issue.

[1]
| install: cannot stat '.../u-boot/1_2023.01-r0/build/arch/arm64/dts/u-boot.dtb': No such file or directory

Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3ca99403d5f320c6d7ae59b107f3b3bf183b4089)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-bsp/u-boot/u-boot.inc

index 5705e5835b2135c5127e2d800bd4cf938cf2d351..4a8d93f70a004ee95e88922ed277d3a7b8dca042 100644 (file)
@@ -32,7 +32,7 @@ do_savedefconfig() {
 }
 do_savedefconfig[nostamp] = "1"
 addtask savedefconfig after do_configure
-
+UBOOT_ARCH_DIR = "${@'arm' if d.getVar('UBOOT_ARCH').startswith('arm') else d.getVar('UBOOT_ARCH')}"
 do_compile () {
     if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
         sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk
@@ -336,7 +336,7 @@ do_deploy () {
 
     if [ -n "${UBOOT_DTB}" ]
     then
-        install -m 644 ${B}/arch/${UBOOT_ARCH}/dts/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/
+        install -m 644 ${B}/arch/${UBOOT_ARCH_DIR}/dts/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/
     fi
 }