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)
$(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
+++ /dev/null
---- 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;
--- 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,
.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,
" -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;
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;
__u64 is not available on FreeBSD, remove its usage.
-<malloc.h> has been replaced by <stdlib.h>
-
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
include/image.h | 2 ++
#include <stdbool.h>
/* Define this to avoid #ifdefs later on */
---- a/include/imx8image.h
-+++ b/include/imx8image.h
-@@ -11,7 +11,12 @@
- #include <image.h>
- #include <inttypes.h>
- #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
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 <malloc.h>
-+#include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <image.h>
+++ /dev/null
---- a/tools/imximage.c
-+++ b/tools/imximage.c
-@@ -11,7 +11,6 @@
- #include "imagetool.h"
- #include <image.h>
- #include "imximage.h"
--#include <generated/autoconf.h>
-
- #define UNDEFINED 0xFFFFFFFF
-
--- 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")