[OE-core] [PATCH v3 1/3] u-boot-fw-utils: Backport a patch for out-of-tree builds

Daisuke Yamane yamane07ynct at gmail.com
Wed Dec 18 09:57:48 UTC 2019


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 at 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 at gmail.com>
+
+From fb013eee68d08403572ef3c579f6688bbe33fd47 Mon Sep 17 00:00:00 2001
+From: Tom Rini <trini at 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 at gmail.com>
+Tested-by: Peter Robinson <pbrobinson at gmail.com>
+Fixes: 4d90f6cd9813 ("tools: Avoid creating symbolic links for tools/version.h")
+Signed-off-by: Tom Rini <trini at konsulko.com>
+Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
+Reviewed-by: Simon Glass <sjg at 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



More information about the Openembedded-core mailing list