[Buildroot] [PATCH 2/2] package/uboot-tools: env/script generation need BINARIES_DIR

Matt Weber matthew.weber at rockwellcollins.com
Mon Jan 25 14:57:42 UTC 2021


From: Kalpesh Panchal <kalpesh.panchal at rockwellcollins.com>

The host build of uboot-tools can occur early in the build process and may
require the creation of BINARIES_DIR before generation of an enabled envimage
and/or boot script binary.

Signed-off-by: Kalpesh Panchal <kalpesh.panchal at rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber at rockwellcollins.com>
---
 package/uboot-tools/uboot-tools.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk
index 10cbd1cdd9..f9ff170266 100644
--- a/package/uboot-tools/uboot-tools.mk
+++ b/package/uboot-tools/uboot-tools.mk
@@ -128,6 +128,7 @@ endif
 
 define HOST_UBOOT_TOOLS_GENERATE_ENV_IMAGE
 	$(HOST_UBOOT_TOOLS_GENERATE_ENV_DEFAULTS)
+	mkdir -p $(BINARIES_DIR)
 	$(HOST_DIR)/bin/mkenvimage -s $(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE) \
 		$(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_REDUNDANT),-r) \
 		$(if $(filter "BIG",$(BR2_ENDIAN)),-b) \
@@ -164,6 +165,7 @@ define HOST_UBOOT_TOOLS_INSTALL_CMDS
 	$(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(HOST_DIR)/bin/dumpimage
 	$(HOST_UBOOT_TOOLS_GENERATE_ENV_IMAGE)
 	$(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT),
+		mkdir -p $(BINARIES_DIR); \
 		$(MKIMAGE) -C none -A $(MKIMAGE_ARCH) -T script \
 			-d $(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE)) \
 			$(BINARIES_DIR)/boot.scr)
-- 
2.17.1



More information about the buildroot mailing list