Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v3 1/3] u-boot-fw-utils: Backport a patch for out-of-tree builds
@ 2019-12-18  9:57 Daisuke Yamane
  2019-12-18  9:57 ` [PATCH v3 2/3] u-boot-tools: Add capability of building from out-of-tree Daisuke Yamane
  2019-12-18  9:57 ` [PATCH v3 3/3] u-boot: Move B from u-boot.inc to u-boot-common.inc Daisuke Yamane
  0 siblings, 2 replies; 4+ messages in thread
From: Daisuke Yamane @ 2019-12-18  9:57 UTC (permalink / raw)
  To: openembedded-core

This patch fixs the following error of u-boot-fw-utils when ${S} != ${B}:
| cp: cannot create regular file 'tools/version.h': No such file or directory

Signed-off-by: Daisuke Yamane <yamane07ynct@gmail.com>
---
 ...sure-tools-directory-exists-in-output-pri.patch | 41 ++++++++++++++++++++++
 meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb |  5 ++-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-bsp/u-boot/files/0001-Makefile-Ensure-tools-directory-exists-in-output-pri.patch

diff --git a/meta/recipes-bsp/u-boot/files/0001-Makefile-Ensure-tools-directory-exists-in-output-pri.patch b/meta/recipes-bsp/u-boot/files/0001-Makefile-Ensure-tools-directory-exists-in-output-pri.patch
new file mode 100644
index 0000000..217c500
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/files/0001-Makefile-Ensure-tools-directory-exists-in-output-pri.patch
@@ -0,0 +1,41 @@
+Upstream-Status: Backport [https://gitlab.denx.de/u-boot/u-boot/commit/fb013eee68d08403572ef3c579f6688bbe33fd47]
+
+This patch fixs the following error of u-boot-fw-utils when ${S} != ${B}:
+| cp: cannot create regular file 'tools/version.h': No such file or directory
+
+Signed-off-by: Daisuke Yamane <yamane07ynct@gmail.com>
+
+From fb013eee68d08403572ef3c579f6688bbe33fd47 Mon Sep 17 00:00:00 2001
+From: Tom Rini <trini@konsulko.com>
+Date: Wed, 4 Dec 2019 18:54:30 -0500
+Subject: [PATCH] Makefile: Ensure tools directory exists in output prior to
+ use
+
+With the change to make tools/version.h a file we need to make sure that
+the output directory exists first otherwise we will get a build failure.
+
+Reported-by: Peter Robinson <pbrobinson@gmail.com>
+Tested-by: Peter Robinson <pbrobinson@gmail.com>
+Fixes: 4d90f6cd9813 ("tools: Avoid creating symbolic links for tools/version.h")
+Signed-off-by: Tom Rini <trini@konsulko.com>
+Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
+Reviewed-by: Simon Glass <sjg@chromium.org>
+---
+ Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile b/Makefile
+index b6a091a..0766f78 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1889,6 +1889,7 @@ checkarmreloc: u-boot
+ 	fi
+ 
+ tools/version.h: include/version.h
++	$(Q)mkdir -p $(dir $@)
+ 	$(call if_changed,copy)
+ 
+ envtools: scripts_basic $(version_h) $(timestamp_h) tools/version.h
+-- 
+2.7.4
+
diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb
index 7de91ff..c30c490 100644
--- a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb
+++ b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb
@@ -3,7 +3,10 @@ require u-boot-common.inc
 SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
 DEPENDS += "mtd-utils"
 
-SRC_URI += "file://0001-include-env.h-Ensure-ulong-is-defined.patch"
+SRC_URI += " \
+	file://0001-include-env.h-Ensure-ulong-is-defined.patch \
+	file://0001-Makefile-Ensure-tools-directory-exists-in-output-pri.patch \
+	"
 
 INSANE_SKIP_${PN} = "already-stripped"
 EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v3 2/3] u-boot-tools: Add capability of building from out-of-tree
  2019-12-18  9:57 [PATCH v3 1/3] u-boot-fw-utils: Backport a patch for out-of-tree builds Daisuke Yamane
@ 2019-12-18  9:57 ` Daisuke Yamane
  2019-12-18  9:57 ` [PATCH v3 3/3] u-boot: Move B from u-boot.inc to u-boot-common.inc Daisuke Yamane
  1 sibling, 0 replies; 4+ messages in thread
From: Daisuke Yamane @ 2019-12-18  9:57 UTC (permalink / raw)
  To: openembedded-core

This patch also helps to build with EXTERNALSRC.

Signed-off-by: Daisuke Yamane <yamane07ynct@gmail.com>
---
 meta/recipes-bsp/u-boot/u-boot-tools_2020.01.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot-tools_2020.01.bb b/meta/recipes-bsp/u-boot/u-boot-tools_2020.01.bb
index bede984..414ee33 100644
--- a/meta/recipes-bsp/u-boot/u-boot-tools_2020.01.bb
+++ b/meta/recipes-bsp/u-boot/u-boot-tools_2020.01.bb
@@ -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 () {
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v3 3/3] u-boot: Move B from u-boot.inc to u-boot-common.inc
  2019-12-18  9:57 [PATCH v3 1/3] u-boot-fw-utils: Backport a patch for out-of-tree builds Daisuke Yamane
  2019-12-18  9:57 ` [PATCH v3 2/3] u-boot-tools: Add capability of building from out-of-tree Daisuke Yamane
@ 2019-12-18  9:57 ` Daisuke Yamane
  2019-12-18 12:42   ` Ross Burton
  1 sibling, 1 reply; 4+ messages in thread
From: Daisuke Yamane @ 2019-12-18  9:57 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Daisuke Yamane <yamane07ynct@gmail.com>
---
 meta/recipes-bsp/u-boot/u-boot-common.inc | 1 +
 meta/recipes-bsp/u-boot/u-boot.inc        | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc
index a0f9c41..48402e4 100644
--- a/meta/recipes-bsp/u-boot/u-boot-common.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-common.inc
@@ -21,3 +21,4 @@ SRC_URI = "git://git.denx.de/u-boot.git \
           "
 
 S = "${WORKDIR}/git"
+B = "${WORKDIR}/build"
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 55d8b47..ec77762 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -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"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 3/3] u-boot: Move B from u-boot.inc to u-boot-common.inc
  2019-12-18  9:57 ` [PATCH v3 3/3] u-boot: Move B from u-boot.inc to u-boot-common.inc Daisuke Yamane
@ 2019-12-18 12:42   ` Ross Burton
  0 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2019-12-18 12:42 UTC (permalink / raw)
  To: openembedded-core

On 18/12/2019 09:57, Daisuke Yamane wrote:
> Use the same value of B between u-boot, u-boot-fw-utils and u-boot-tools.
> This patch also enable the out-of-tree builds of u-boot-fw-utils and
> u-boot-tools actually.

If you're doing out of tree builds you need to ensure that ${B} is empty.

After setting ${B}, add:

do_configure[cleandirs] = "${B}"

Ross


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-18 12:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-18  9:57 [PATCH v3 1/3] u-boot-fw-utils: Backport a patch for out-of-tree builds Daisuke Yamane
2019-12-18  9:57 ` [PATCH v3 2/3] u-boot-tools: Add capability of building from out-of-tree Daisuke Yamane
2019-12-18  9:57 ` [PATCH v3 3/3] u-boot: Move B from u-boot.inc to u-boot-common.inc Daisuke Yamane
2019-12-18 12:42   ` Ross Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox