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

Signed-off-by: Daisuke Yamane <[email protected]>
---
 ...sure-tools-directory-exists-in-output-pri.patch | 34 ++++++++++++++++++++++
 meta/recipes-bsp/u-boot/u-boot-fw-utils_2020.01.bb |  5 +++-
 2 files changed, 38 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..b4cadec
--- /dev/null
+++ 
b/meta/recipes-bsp/u-boot/files/0001-Makefile-Ensure-tools-directory-exists-in-output-pri.patch
@@ -0,0 +1,34 @@
+From fb013eee68d08403572ef3c579f6688bbe33fd47 Mon Sep 17 00:00:00 2001
+From: Tom Rini <[email protected]>
+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 <[email protected]>
+Tested-by: Peter Robinson <[email protected]>
+Fixes: 4d90f6cd9813 ("tools: Avoid creating symbolic links for 
tools/version.h")
+Signed-off-by: Tom Rini <[email protected]>
+Reviewed-by: Bin Meng <[email protected]>
+Reviewed-by: Simon Glass <[email protected]>
+---
+ 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

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to