[openwrt/openwrt] uboot-tools: dont build tools unconditionally

LEDE Commits lede-commits at lists.infradead.org
Mon Mar 24 10:43:49 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/293d5f1366e099cc343a3fc8a6f936ab27bcad6a

commit 293d5f1366e099cc343a3fc8a6f936ab27bcad6a
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sun Mar 23 10:29:28 2025 +0100

    uboot-tools: dont build tools unconditionally
    
    Currently, both envtools and the rest of U-Boot tools are being built
    regardless if the dumpimage package has been selected.
    
    This will fail if only envtools are selected since the rest of tools
    require OpenSSL while envtools do not require them.
    
    So, only build tools if dumpimage is selected.
    
    Fixes: 46e376c93514 ("uboot-tools: migrate uboot-envtools to uboot-tools")
    Fixes: #18327
    Tested-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
    Link: https://github.com/openwrt/openwrt/pull/18329
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/boot/uboot-tools/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/package/boot/uboot-tools/Makefile b/package/boot/uboot-tools/Makefile
index 54b4647d24..dd43c65e5c 100644
--- a/package/boot/uboot-tools/Makefile
+++ b/package/boot/uboot-tools/Makefile
@@ -59,8 +59,8 @@ define Package/uboot-envtools/conffiles
 endef
 
 define Build/Configure
-	$(MAKE) -C $(PKG_BUILD_DIR) tools-only_defconfig
-	$(MAKE) -C $(PKG_BUILD_DIR) syncconfig
+	$(call Build/Compile/Default,tools-only_defconfig)
+	$(call Build/Compile/Default,syncconfig)
 	$(SED) 's/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/' $(PKG_BUILD_DIR)/.config
 endef
 
@@ -71,8 +71,14 @@ MAKE_FLAGS += \
 	NO_PYTHON=1
 
 define Build/Compile
+
+ifneq ($(CONFIG_PACKAGE_uboot-envtools),)
 	$(call Build/Compile/Default,envtools)
+endif
+ifneq ($(CONFIG_PACKAGE_dumpimage),)
 	$(call Build/Compile/Default,cross_tools)
+endif
+
 endef
 
 define Package/dumpimage/install




More information about the lede-commits mailing list