openwrt/package/boot/uboot-tools/patches/003-tools-dumpimage-fix-tools-compile.patch
Stefan Kalscheuer 6796bace3e uboot-tools: update to version 2026.01
Update package to the latest stable version.

Patches manually refreshed:
* 003-tools-dumpimage-fix-tools-compile.patch

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/21674
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-27 01:29:57 +01:00

77 lines
2.3 KiB
Diff

From 1ceffec2523888b4701405b7cf1710489e17011a Mon Sep 17 00:00:00 2001
From: Scott Mercer <TheRootEd24@gmail.com>
Date: Wed, 19 Mar 2025 06:31:44 -0400
Subject: [PATCH] ipq50xx: packages: dumpimage: fix compile patch
This patch is to fix compilation for uboot-tool V2025.01 in openwrt.
* same "compile for enviroment patch" to makefile, that is used
in uboot-envtools.
* remove mkeficapsule from build to avoid gnulib dependencies
Signed-off-by: Scott Mercer <TheRootEd24@gmail.com>
---
tools/Makefile | 38 ++++++++++++++++++++++++++------------
1 file changed, 26 insertions(+), 12 deletions(-)
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -22,6 +22,26 @@
# That's as long as the features of those tools aren't modified.
#
+override HOSTCC = $(CC)
+
+ifneq ($(TARGET_CFLAGS),)
+KBUILD_HOSTCFLAGS = $(TARGET_CFLAGS)
+endif
+ifneq ($(TARGET_LDFLAGS),)
+KBUILD_HOSTLDFLAGS = $(TARGET_LDFLAGS)
+endif
+
+# Compile for a hosted environment on the target
+HOST_EXTRACFLAGS = -I$(srctree)/tools \
+ $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \
+ -idirafter $(srctree)/tools/env \
+ -DUSE_HOSTCC \
+ -DTEXT_BASE=$(TEXT_BASE)
+
+ifeq ($(MTD_VERSION),old)
+HOST_EXTRACFLAGS += -DMTD_OLD
+endif
+
# Enable all the config-independent tools
ifneq ($(HOST_TOOLS_ALL),)
CONFIG_ARCH_KIRKWOOD = y
@@ -261,15 +281,10 @@ hostprogs-$(CONFIG_MIPS) += mips-relocs
hostprogs-$(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-$(CONFIG_TOOLS_MKEFICAPSULE) += mkeficapsule
+HOSTCFLAGS_mkeficapsule.o +=
+HOSTLDLIBS_mkeficapsule +=
+mkeficapsule-objs :=
+hostprogs-$(CONFIG_TOOLS_MKEFICAPSULE) +=
mkfwumdata-objs := mkfwumdata.o generated/lib/crc32.o
HOSTLDLIBS_mkfwumdata += -luuid
@@ -330,8 +345,7 @@ HOST_EXTRACFLAGS += -include $(srctree)/
-I$(srctree)/scripts/dtc/libfdt \
-I$(srctree)/tools \
-DUSE_HOSTCC \
- -D__KERNEL_STRICT_NAMES \
- -D_GNU_SOURCE
+ -D__KERNEL_STRICT_NAMES
ifeq ($(CROSS_BUILD_TOOLS),)
__build: $(LOGO-y)