Skip to contentSkip to conversation

u-boot-tools: Add capability of building from out-of-tree

PATCH New Daisuke Yamane 1 participant 2 messages Jan 23, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/2 u-boot-tools: Add capability of building from out-of-tree

This patch also helps to build with EXTERNALSRC.

---
 meta/recipes-bsp/u-boot/u-boot-tools_2020.01.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-bsp/u-boot/u-boot-tools_2020.01.bb +3 -3
index bede984..414ee33 100644
@@ -25,14 +25,14 @@ SED_CONFIG_EFI_armeb = ''
 SED_CONFIG_EFI_aarch64 = ''
 
 do_compile () {
-	oe_runmake sandbox_defconfig
+	oe_runmake -C ${S} sandbox_defconfig O=${B}
 
 	# Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
 	# generating it requires bin2header tool, which for target build
 	# is built with target tools and thus cannot be executed on host.
-	sed -i -e "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" ${SED_CONFIG_EFI} .config
+	sed -i -e "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" ${SED_CONFIG_EFI} ${B}/.config
 
-	oe_runmake cross_tools NO_SDL=1
+	oe_runmake -C ${S} cross_tools NO_SDL=1 O=${B}
 }
 
 do_install () {
Signature · 1 line
2.7.4
#1 lore raw

PATCH v5 2/2 u-boot: Move B from u-boot.inc to u-boot-common.inc

Use the same value of B between u-boot and u-boot-tools. This patch also enable the out-of-tree builds of u-boot-tools actually.

---
 meta/recipes-bsp/u-boot/u-boot-common.inc | 2 ++
 meta/recipes-bsp/u-boot/u-boot.inc        | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-bsp/u-boot/u-boot-common.inc +2 -0
index ce07055..edd0004 100644
@@ -18,3 +18,5 @@ SRC_URI = "git://git.denx.de/u-boot.git \
           "
 
 S = "${WORKDIR}/git"
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
meta/recipes-bsp/u-boot/u-boot.inc +0 -2
index 55d8b47..ec77762 100644
@@ -1,8 +1,6 @@
 SUMMARY = "Universal Boot Loader for embedded devices"
 PROVIDES = "virtual/bootloader"
 
-B = "${WORKDIR}/build"
-
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 DEPENDS += "kern-tools-native"
Signature · 1 line
2.7.4