diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile index fd5dad0cd8..a7c98e755e 100644 --- a/tools/mkimage/Makefile +++ b/tools/mkimage/Makefile @@ -7,26 +7,36 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mkimage -PKG_VERSION:=2022.01 +PKG_VERSION:=2022.07 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ https://mirror.cyberbits.eu/u-boot \ https://ftp.denx.de/pub/u-boot \ ftp://ftp.denx.de/pub/u-boot -PKG_HASH:=81b4543227db228c03f8a1bf5ddbc813b0bb8f6555ce46064ef721a6fc680413 +PKG_HASH:=92b08eb49c24da14c1adbf70a71ae8f37cc53eeb4230e859ad8b6733d13dcf5e HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION) include $(INCLUDE_DIR)/host-build.mk +define Host/Configure + $(MAKE) -C $(HOST_BUILD_DIR) \ + HOSTCFLAGS="$(HOST_CFLAGS)" \ + HOSTLDFLAGS="$(HOST_LDFLAGS)" \ + PKG_CONFIG_EXTRAARGS="--static" \ + V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1) \ + tools-only_config + + sed -i 's/CONFIG_TOOLS_MKEFICAPSULE=y/# CONFIG_TOOLS_MKEFICAPSULE is not set/' $(HOST_BUILD_DIR)/.config +endef + define Host/Compile $(MAKE) -C $(HOST_BUILD_DIR) \ HOSTCFLAGS="$(HOST_CFLAGS)" \ HOSTLDFLAGS="$(HOST_LDFLAGS)" \ PKG_CONFIG_EXTRAARGS="--static" \ V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1) \ - tools-only_config \ tools-only endef diff --git a/tools/mkimage/patches/030-allow-to-use-different-magic.patch b/tools/mkimage/patches/030-allow-to-use-different-magic.patch index 936113595a..017f0b9b34 100644 --- a/tools/mkimage/patches/030-allow-to-use-different-magic.patch +++ b/tools/mkimage/patches/030-allow-to-use-different-magic.patch @@ -2,7 +2,7 @@ This patch makes it possible to set a custom image magic. --- a/tools/mkimage.c +++ b/tools/mkimage.c -@@ -24,6 +24,7 @@ static struct image_tool_params params = +@@ -25,6 +25,7 @@ static struct image_tool_params params = .arch = IH_ARCH_PPC, .type = IH_TYPE_KERNEL, .comp = IH_COMP_GZIP, @@ -10,8 +10,8 @@ This patch makes it possible to set a custom image magic. .dtc = MKIMAGE_DEFAULT_DTC_OPTIONS, .imagename = "", .imagename2 = "", -@@ -85,11 +86,12 @@ static void usage(const char *msg) - " -l ==> list image header information\n", +@@ -88,11 +89,12 @@ static void usage(const char *msg) + " -q ==> quiet\n", params.cmdname); fprintf(stderr, - " %s [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image\n" @@ -24,16 +24,16 @@ This patch makes it possible to set a custom image magic. " -a ==> set load address to 'addr' (hex)\n" " -e ==> set entry point to 'ep' (hex)\n" " -n ==> set image name to 'name'\n" -@@ -155,7 +157,7 @@ static void process_args(int argc, char +@@ -163,7 +165,7 @@ static void process_args(int argc, char int opt; while ((opt = getopt(argc, argv, -- "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:ln:N:p:O:rR:qstT:vVx")) != -1) { -+ "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:lM:n:N:p:O:rR:qstT:vVx")) != -1) { +- "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:ln:N:p:o:O:rR:qstT:vVx")) != -1) { ++ "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:lM:n:N:p:o:O:rR:qstT:vVx")) != -1) { switch (opt) { case 'a': params.addr = strtoull(optarg, &ptr, 16); -@@ -245,6 +247,14 @@ static void process_args(int argc, char +@@ -254,6 +256,14 @@ static void process_args(int argc, char case 'l': params.lflag = 1; break; @@ -61,7 +61,7 @@ This patch makes it possible to set a custom image magic. image_set_load(hdr, addr); --- a/tools/imagetool.h +++ b/tools/imagetool.h -@@ -56,6 +56,7 @@ struct image_tool_params { +@@ -59,6 +59,7 @@ struct image_tool_params { int arch; int type; int comp; diff --git a/tools/mkimage/patches/090-macos-arm64-builing-fix.patch b/tools/mkimage/patches/090-macos-arm64-builing-fix.patch deleted file mode 100644 index 9f842146f7..0000000000 --- a/tools/mkimage/patches/090-macos-arm64-builing-fix.patch +++ /dev/null @@ -1,21 +0,0 @@ -This patch fixes compilation issues on MacOS arm64. -Based on discussion -https://github.com/u-boot/u-boot/commit/3b142045e8a7f0ab17b6099e9226296af45967d0 - ---- a/tools/imagetool.h -+++ b/tools/imagetool.h -@@ -272,11 +272,14 @@ int rockchip_copy_image(int fd, struct i - * b) we need a API call to get the respective section symbols */ - #if defined(__MACH__) - #include -+#include - - #define INIT_SECTION(name) do { \ - unsigned long name ## _len; \ - char *__cat(pstart_, name) = getsectdata("__DATA", \ - #name, &__cat(name, _len)); \ -+ __cat(pstart_, name) += \ -+ _dyld_get_image_vmaddr_slide(0); \ - char *__cat(pstop_, name) = __cat(pstart_, name) + \ - __cat(name, _len); \ - __cat(__start_, name) = (void *)__cat(pstart_, name); \ diff --git a/tools/mkimage/patches/100-increase-tmpfile-name-length-limit.patch b/tools/mkimage/patches/100-increase-tmpfile-name-length-limit.patch index d375f40f61..aae8935601 100644 --- a/tools/mkimage/patches/100-increase-tmpfile-name-length-limit.patch +++ b/tools/mkimage/patches/100-increase-tmpfile-name-length-limit.patch @@ -1,7 +1,7 @@ --- a/tools/mkimage.h +++ b/tools/mkimage.h -@@ -42,7 +42,7 @@ static inline ulong map_to_sysmem(void * - } +@@ -44,7 +44,7 @@ static inline ulong map_to_sysmem(void * + #define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) type name[size] #define MKIMAGE_TMPFILE_SUFFIX ".tmp" -#define MKIMAGE_MAX_TMPFILE_LEN 256