From: Shiji Yang Date: Fri, 10 Apr 2026 11:03:30 +0000 (+0800) Subject: uboot-tools: disable symbols via u-boot native scripts X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4e2b3c65d03382a757b694197d33170bf5bba31;p=thirdparty%2Fopenwrt.git uboot-tools: disable symbols via u-boot native scripts This is a safer way to operate the .config file. Signed-off-by: Shiji Yang Link: https://github.com/openwrt/openwrt/pull/22845 Signed-off-by: Nick Hainke --- diff --git a/package/boot/uboot-tools/Makefile b/package/boot/uboot-tools/Makefile index 9fd4dae977d..38cf4027d44 100644 --- a/package/boot/uboot-tools/Makefile +++ b/package/boot/uboot-tools/Makefile @@ -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 += \ diff --git a/package/boot/uboot-tools/patches/003-tools-dumpimage-fix-tools-compile.patch b/package/boot/uboot-tools/patches/003-tools-dumpimage-fix-tools-compile.patch index d5fcecff7f6..33c956d219d 100644 --- a/package/boot/uboot-tools/patches/003-tools-dumpimage-fix-tools-compile.patch +++ b/package/boot/uboot-tools/patches/003-tools-dumpimage-fix-tools-compile.patch @@ -44,27 +44,7 @@ Signed-off-by: Scott Mercer # 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 \