]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
uboot-tools: disable symbols via u-boot native scripts 22845/head
authorShiji Yang <yangshiji66@outlook.com>
Fri, 10 Apr 2026 11:03:30 +0000 (19:03 +0800)
committerNick Hainke <vincent@systemli.org>
Sun, 12 Apr 2026 08:23:53 +0000 (10:23 +0200)
This is a safer way to operate the .config file.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22845
Signed-off-by: Nick Hainke <vincent@systemli.org>
package/boot/uboot-tools/Makefile
package/boot/uboot-tools/patches/003-tools-dumpimage-fix-tools-compile.patch

index 9fd4dae977d75e40e560fc9b440ac52284db9133..38cf4027d44df4304415f537e7bb62125c5ce1e8 100644 (file)
@@ -70,8 +70,12 @@ endef
 
 define Build/Configure
        $(call Build/Compile/Default,tools-only_defconfig)
-       $(SED) 's/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/' $(PKG_BUILD_DIR)/.config
-       $(SED) 's/CONFIG_TOOLS_KWBIMAGE=y/# CONFIG_TOOLS_KWBIMAGE is not set/' $(PKG_BUILD_DIR)/.config
+
+       $(PKG_BUILD_DIR)/scripts/config \
+               --file $(PKG_BUILD_DIR)/.config \
+               --disable TOOLS_KWBIMAGE \
+               --disable TOOLS_LIBCRYPTO \
+               --disable TOOLS_MKEFICAPSULE
 endef
 
 MAKE_FLAGS += \
index d5fcecff7f68b2d06e43f410b04f9460363208b0..33c956d219df61d7d544859f232eab24b6785d8e 100644 (file)
@@ -44,27 +44,7 @@ Signed-off-by: Scott Mercer <TheRootEd24@gmail.com>
  # Enable all the config-independent tools
  ifneq ($(HOST_TOOLS_ALL),)
  CONFIG_ARCH_KIRKWOOD = y
-@@ -262,15 +282,10 @@ hostprogs-always-$(CONFIG_MIPS) += mips-
- hostprogs-always-$(CONFIG_ASN1_COMPILER)      += asn1_compiler
- HOSTCFLAGS_asn1_compiler.o = -idirafter $(srctree)/include
--HOSTCFLAGS_mkeficapsule.o += \
--      $(shell pkg-config --cflags gnutls 2> /dev/null || echo "")
--HOSTLDLIBS_mkeficapsule += \
--      $(shell pkg-config --libs gnutls 2> /dev/null || echo "-lgnutls")
--mkeficapsule-objs := generated/lib/uuid.o \
--      generated/lib/sha1.o \
--      $(LIBFDT_OBJS) \
--      mkeficapsule.o
--hostprogs-always-$(CONFIG_TOOLS_MKEFICAPSULE) += mkeficapsule
-+HOSTCFLAGS_mkeficapsule.o +=
-+HOSTLDLIBS_mkeficapsule +=
-+mkeficapsule-objs :=
-+hostprogs-always-$(CONFIG_TOOLS_MKEFICAPSULE) +=
- mkfwumdata-objs := mkfwumdata.o generated/lib/crc32.o
- HOSTLDLIBS_mkfwumdata += -luuid
-@@ -329,8 +344,7 @@ HOST_EXTRACFLAGS += -include $(srctree)/
+@@ -329,8 +349,7 @@ HOST_EXTRACFLAGS += -include $(srctree)/
                -I$(srctree)/scripts/dtc/libfdt \
                -I$(srctree)/tools \
                -DUSE_HOSTCC \