diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile index 90ecdaaa6e..6901d921cf 100644 --- a/tools/mkimage/Makefile +++ b/tools/mkimage/Makefile @@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mkimage -PKG_VERSION:=2020.04 +PKG_VERSION:=2021.01 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:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 +PKG_HASH:=b407e1510a74e863b8b5cb42a24625344f0e0c2fc7582d8c866bd899367d0454 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION) @@ -24,6 +24,8 @@ define Host/Prepare $(Host/Prepare/Default) mkdir -p $(HOST_BUILD_DIR)/include/config touch $(HOST_BUILD_DIR)/include/config/auto.conf + mkdir -p $(HOST_BUILD_DIR)/include/generated/ + touch $(HOST_BUILD_DIR)/include/generated/autoconf.h endef define Host/Compile diff --git a/tools/mkimage/patches/020-fix-file-creation-perms.patch b/tools/mkimage/patches/020-fix-file-creation-perms.patch deleted file mode 100644 index 80cda288ab..0000000000 --- a/tools/mkimage/patches/020-fix-file-creation-perms.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/tools/fit_image.c -+++ b/tools/fit_image.c -@@ -642,7 +642,7 @@ static int copyfile(const char *src, con - goto out; - } - -- fd_dst = open(dst, O_WRONLY | O_CREAT, 0700); -+ fd_dst = open(dst, O_WRONLY | O_CREAT, 0744); - if (fd_dst < 0) { - printf("Can't open file %s (%s)\n", dst, strerror(errno)); - goto out; 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 8d79de2992..3a1677d54d 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 -@@ -20,6 +20,7 @@ static struct image_tool_params params = +@@ -21,6 +21,7 @@ static struct image_tool_params params = .arch = IH_ARCH_PPC, .type = IH_TYPE_KERNEL, .comp = IH_COMP_GZIP, @@ -10,7 +10,7 @@ This patch makes it possible to set a custom image magic. .dtc = MKIMAGE_DEFAULT_DTC_OPTIONS, .imagename = "", .imagename2 = "", -@@ -76,11 +77,12 @@ static void usage(const char *msg) +@@ -82,11 +83,12 @@ static void usage(const char *msg) " -l ==> list image header information\n", params.cmdname); fprintf(stderr, @@ -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" -@@ -143,7 +145,7 @@ static void process_args(int argc, char +@@ -150,7 +152,7 @@ static void process_args(int argc, char int opt; while ((opt = getopt(argc, argv, -- "a:A:b:c:C:d:D:e:Ef:Fk:i:K:ln:N:p:O:rR:qsT:vVx")) != -1) { -+ "a:A:b:c:C:d:D:e:Ef:Fk:i:K:lM:n:N:p:O:rR:qsT:vVx")) != -1) { +- "a:A:b:B:c:C:d:D:e:Ef:Fk:i:K:ln:N:p:O:rR:qstT:vVx")) != -1) { ++ "a:A:b:B:c:C:d:D:e:Ef:Fk:i:K:lM:n:N:p:O:rR:qstT:vVx")) != -1) { switch (opt) { case 'a': params.addr = strtoull(optarg, &ptr, 16); -@@ -221,6 +223,14 @@ static void process_args(int argc, char +@@ -237,6 +239,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 -@@ -53,6 +53,7 @@ struct image_tool_params { +@@ -56,6 +56,7 @@ struct image_tool_params { int arch; int type; int comp; diff --git a/tools/mkimage/patches/050-Add-compatibility-with-non-Linux-hosts.patch b/tools/mkimage/patches/050-Add-compatibility-with-non-Linux-hosts.patch index ea2e8e3da3..5b87a259db 100644 --- a/tools/mkimage/patches/050-Add-compatibility-with-non-Linux-hosts.patch +++ b/tools/mkimage/patches/050-Add-compatibility-with-non-Linux-hosts.patch @@ -12,8 +12,6 @@ parts for these header files manually or remove the usage too. __u64 is not available on FreeBSD, remove its usage. - has been replaced by - Signed-off-by: Hauke Mehrtens --- include/image.h | 2 ++ @@ -35,21 +33,6 @@ Signed-off-by: Hauke Mehrtens #include /* Define this to avoid #ifdefs later on */ ---- a/include/imx8image.h -+++ b/include/imx8image.h -@@ -11,7 +11,12 @@ - #include - #include - #include "imagetool.h" -+#ifdef linux - #include "linux/kernel.h" -+#else -+#define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1) -+#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) -+#endif - - #define __packed __attribute__((packed)) - --- a/include/linux/posix_types.h +++ b/include/linux/posix_types.h @@ -43,6 +43,8 @@ typedef void (*__kernel_sighandler_t)(in @@ -82,14 +65,3 @@ Signed-off-by: Hauke Mehrtens typedef __u64 __bitwise __le64; typedef __u64 __bitwise __be64; #endif ---- a/lib/rsa/rsa-sign.c -+++ b/lib/rsa/rsa-sign.c -@@ -4,7 +4,7 @@ - */ - - #include "mkimage.h" --#include -+#include - #include - #include - #include diff --git a/tools/mkimage/patches/070-remove_generated_autoconf.patch b/tools/mkimage/patches/070-remove_generated_autoconf.patch deleted file mode 100644 index 7dcc8b64c1..0000000000 --- a/tools/mkimage/patches/070-remove_generated_autoconf.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/tools/imximage.c -+++ b/tools/imximage.c -@@ -11,7 +11,6 @@ - #include "imagetool.h" - #include - #include "imximage.h" --#include - - #define UNDEFINED 0xFFFFFFFF - diff --git a/tools/mkimage/patches/210-link-libcrypto-static.patch b/tools/mkimage/patches/210-link-libcrypto-static.patch index c609912be9..87a425bd94 100644 --- a/tools/mkimage/patches/210-link-libcrypto-static.patch +++ b/tools/mkimage/patches/210-link-libcrypto-static.patch @@ -3,10 +3,10 @@ needed dependencies are added too. --- a/tools/Makefile +++ b/tools/Makefile -@@ -162,7 +162,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON +@@ -158,7 +158,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON HOSTCFLAGS_kwbimage.o += \ $(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "") - HOSTLOADLIBES_mkimage += \ + HOSTLDLIBS_mkimage += \ - $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto") + $(shell pkg-config --libs --static libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto")