Re: [LEDE-DEV] [PATCH] tools/mkimage: update to version 2018.03

2018-04-15 Thread Felix Fietkau
On 2018-04-15 00:21, Hauke Mehrtens wrote:
> This activates support for fit images and some other new mkimage
> features. Some of the patches were applied upstream and could be
> removed.
> 
> Signed-off-by: Hauke Mehrtens 
> ---
> 
> Could someone please test this with MacOSX.
Works for me.

- Felix

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] tools/mkimage: update to version 2018.03

2018-04-14 Thread Hauke Mehrtens
This activates support for fit images and some other new mkimage
features. Some of the patches were applied upstream and could be
removed.

Signed-off-by: Hauke Mehrtens 
---

Could someone please test this with MacOSX.
There are still some patches to fix problems on FreeBSD in this package.

 tools/mkimage/Makefile |  21 +-
 tools/mkimage/patches/010-freebsd-ulong-fix.patch  |   6 +-
 .../patches/030-allow-to-use-different-magic.patch |  78 +--
 tools/mkimage/patches/040-include_order.patch  |  11 -
 .../mkimage/patches/050-image_h_portability.patch  |   2 +-
 .../patches/060-remove_kernel_includes.patch   |   2 +-
 .../patches/070-socfpgaimage_portability.patch |  52 --
 .../patches/080-remove_compiler_check.patch|  14 +-
 .../090-reproducible-SOURCE_DATE_EPOCH.patch   |  82 ---
 tools/mkimage/patches/100-freebsd-compat.patch |   2 +-
 tools/mkimage/patches/110-fix_musl_build.patch |  67 --
 tools/mkimage/patches/200-compiler-support.patch   | 702 -
 .../200-rsa-sign-add-support-for-libressl.patch|  68 ++
 .../patches/210-link-libcrypto-static.patch|  14 +
 .../mkimage/patches/210-openssl-1.1.x-compat.patch |  97 ---
 15 files changed, 147 insertions(+), 1071 deletions(-)
 delete mode 100644 tools/mkimage/patches/040-include_order.patch
 delete mode 100644 tools/mkimage/patches/070-socfpgaimage_portability.patch
 delete mode 100644 
tools/mkimage/patches/090-reproducible-SOURCE_DATE_EPOCH.patch
 delete mode 100644 tools/mkimage/patches/110-fix_musl_build.patch
 delete mode 100644 tools/mkimage/patches/200-compiler-support.patch
 create mode 100644 
tools/mkimage/patches/200-rsa-sign-add-support-for-libressl.patch
 create mode 100644 tools/mkimage/patches/210-link-libcrypto-static.patch
 delete mode 100644 tools/mkimage/patches/210-openssl-1.1.x-compat.patch

diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile
index 00f85ae272..c7e1dfd672 100644
--- a/tools/mkimage/Makefile
+++ b/tools/mkimage/Makefile
@@ -7,14 +7,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mkimage
-PKG_VERSION:=2014.10
+PKG_VERSION:=2018.03
 
 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=\
http://mirror2.openwrt.org/sources \
ftp://ftp.denx.de/pub/u-boot
-PKG_HASH:=d3b132a7a9b3f3182b7aad71c2dfbd4fc15bea83e12c76134eb3ffefc07d1c71
-PKG_CAT:=bzcat
+PKG_HASH:=7e7477534409d5368eb1371ffde6820f0f79780a1a1f676161c48442cb303dfd
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
 
@@ -22,17 +21,17 @@ include $(INCLUDE_DIR)/host-build.mk
 
 define Host/Prepare
$(Host/Prepare/Default)
-   rm -f \
-   $(HOST_BUILD_DIR)/include/errno.h \
-   $(HOST_BUILD_DIR)/include/malloc.h \
-   $(HOST_BUILD_DIR)/tools/.depend
-   touch $(HOST_BUILD_DIR)/include/config.mk
-   touch $(HOST_BUILD_DIR)/include/config.h
+   mkdir -p $(HOST_BUILD_DIR)/include/config
+   touch $(HOST_BUILD_DIR)/include/config/auto.conf
 endef
 
 define Host/Compile
-   $(MAKE) -C $(HOST_BUILD_DIR) defconfig   HOSTCFLAGS="$(HOST_CPPFLAGS) 
$(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)" HOST_LOADLIBES="(pkg-config 
--static --libs libcrypto)"
-   $(MAKE) -C $(HOST_BUILD_DIR) tools-only  HOSTCFLAGS="$(HOST_CPPFLAGS) 
$(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)" HOST_LOADLIBES="(pkg-config 
--static --libs libcrypto)"
+   $(MAKE) -C $(HOST_BUILD_DIR) \
+   HOSTCFLAGS="$(HOST_CFLAGS)" \
+   HOSTLDFLAGS="$(HOST_LDFLAGS)" \
+   no-dot-config-targets=tools-only \
+   CONFIG_FIT_SIGNATURE=y \
+   tools-only
 endef
 
 define Host/Install
diff --git a/tools/mkimage/patches/010-freebsd-ulong-fix.patch 
b/tools/mkimage/patches/010-freebsd-ulong-fix.patch
index 1101e72d15..7d891657f8 100644
--- a/tools/mkimage/patches/010-freebsd-ulong-fix.patch
+++ b/tools/mkimage/patches/010-freebsd-ulong-fix.patch
@@ -1,6 +1,6 @@
 --- a/include/image.h
 +++ b/include/image.h
-@@ -44,6 +44,10 @@ struct lmb;
+@@ -51,6 +51,10 @@ struct lmb;
  
  #endif /* USE_HOSTCC */
  
@@ -8,6 +8,6 @@
 +#define ulong unsigned long
 +#endif
 +
- #if defined(CONFIG_FIT)
+ #if IMAGE_ENABLE_FIT
  #include 
- #include 
+ #include 
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 dcab48894c..c6de9a0aaf 100644
--- a/tools/mkimage/patches/030-allow-to-use-different-magic.patch
+++ b/tools/mkimage/patches/030-allow-to-use-different-magic.patch
@@ -1,6 +1,6 @@
 --- a/tools/mkimage.c
 +++ b/tools/mkimage.c
-@@ -24,6 +24,7 @@ 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,
@@ -8,52 +8,58 @@
.dtc = MKIMAGE_DEFAULT_DTC_OPTIONS,
.imagename = "",
.imagename2 = "",
-@@ -168,6 +169,16 @@ main (int