[tools] mkimage: update to 2014.04
authorLuka Perkov <luka@openwrt.org>
Wed, 21 May 2014 09:42:33 +0000 (09:42 +0000)
committerLuka Perkov <luka@openwrt.org>
Wed, 21 May 2014 09:42:33 +0000 (09:42 +0000)
Signed-off-by: Luka Perkov <luka@openwrt.org>
SVN-Revision: 40807

tools/mkimage/Makefile
tools/mkimage/patches/010-freebsd-ulong-fix.patch
tools/mkimage/patches/020-openbsd_fixes.patch
tools/mkimage/patches/030-allow-to-use-different-magic.patch
tools/mkimage/patches/040-include_order.patch
tools/mkimage/patches/050-image_h_portability.patch
tools/mkimage/patches/060-remove_kernel_includes.patch
tools/mkimage/patches/070-avoid_ENOMEDIUM.patch [deleted file]

index d2efd62d2357d782575cdf64f0a88e70e569f0b3..47e918a5a22d2936562f7801251cb6f1a6a2b1c4 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2013 OpenWrt.org
+# Copyright (C) 2006-2014 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,11 +7,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mkimage
-PKG_VERSION:=2013.07-rc1
+PKG_VERSION:=2014.04
 
 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
-PKG_MD5SUM:=9b14d9a8981ce2e429956af7cc96996e
+PKG_MD5SUM:=6d2116d1385a66e9a59742caa9d62a54
 PKG_CAT:=bzcat
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
@@ -24,11 +24,14 @@ define Host/Prepare
                $(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
 endef
 
 define Host/Compile
-       $(MAKE) -C $(HOST_BUILD_DIR) BUILD_DIR= BIN_FILES-y="mkimage" HOSTLDFLAGS="$(HOST_STATIC_LINKING)" tools
+       $(MAKE) -C $(HOST_BUILD_DIR) \
+               HOSTLDFLAGS="$(HOST_STATIC_LINKING)" \
+               tools-only
 endef
 
 define Host/Install
index b4951b0e25331ed0b1337ef3b5fc8e49ef685550..154346d8be80d39e9911b17b58bdaf97a1b5cdd9 100644 (file)
@@ -1,6 +1,6 @@
 --- a/include/image.h
 +++ b/include/image.h
-@@ -61,6 +61,10 @@
+@@ -44,6 +44,10 @@
  
  #endif /* USE_HOSTCC */
  
index 17232360d2c2594f89bd2da453041b0f7f616560..7a762d91f7843106a7763c89af8e3de98e521f6b 100644 (file)
@@ -1,6 +1,6 @@
 --- a/tools/mkimage.c
 +++ b/tools/mkimage.c
-@@ -464,6 +464,7 @@
+@@ -458,6 +458,7 @@
  #if defined(_POSIX_SYNCHRONIZED_IO) && \
     !defined(__sun__) && \
     !defined(__FreeBSD__) && \
@@ -8,7 +8,7 @@
     !defined(__APPLE__)
        (void) fdatasync (ifd);
  #else
-@@ -507,6 +508,7 @@
+@@ -501,6 +502,7 @@
  #if defined(_POSIX_SYNCHRONIZED_IO) && \
     !defined(__sun__) && \
     !defined(__FreeBSD__) && \
index afc3f21a81e64d8ede42ec1d3497584e75b61337..d5afdd35b291b209e5b2f6e4e358f70a83e22f81 100644 (file)
@@ -1,6 +1,6 @@
 --- a/tools/mkimage.c
 +++ b/tools/mkimage.c
-@@ -37,6 +37,7 @@
+@@ -24,6 +24,7 @@
        .arch = IH_ARCH_PPC,
        .type = IH_TYPE_KERNEL,
        .comp = IH_COMP_GZIP,
@@ -8,7 +8,7 @@
        .dtc = MKIMAGE_DEFAULT_DTC_OPTIONS,
        .imagename = "",
        .imagename2 = "",
-@@ -189,6 +190,16 @@
+@@ -168,6 +169,16 @@
                                        genimg_get_comp_id (*++argv)) < 0)
                                        usage ();
                                goto NXTARG;
@@ -25,7 +25,7 @@
                        case 'D':
                                if (--argc <= 0)
                                        usage ();
-@@ -613,12 +624,13 @@
+@@ -623,12 +634,13 @@
        fprintf (stderr, "Usage: %s -l image\n"
                         "          -l ==> list image header information\n",
                params.cmdname);
                         "          -a ==> set load address to 'addr' (hex)\n"
                         "          -e ==> set entry point to 'ep' (hex)\n"
                         "          -n ==> set image name to 'name'\n"
---- a/tools/mkimage.h
-+++ b/tools/mkimage.h
-@@ -79,6 +79,7 @@
-       int arch;
-       int type;
-       int comp;
-+      unsigned int magic;
-       char *dtc;
-       unsigned int addr;
-       unsigned int ep;
 --- a/tools/default_image.c
 +++ b/tools/default_image.c
-@@ -111,7 +111,7 @@
+@@ -98,7 +98,7 @@
                        sbuf->st_size - sizeof(image_header_t));
  
        /* Build new header */
        image_set_time(hdr, sbuf->st_mtime);
        image_set_size(hdr, sbuf->st_size - sizeof(image_header_t));
        image_set_load(hdr, params->addr);
+--- a/tools/imagetool.h
++++ b/tools/imagetool.h
+@@ -44,6 +44,7 @@
+       int arch;
+       int type;
+       int comp;
++      unsigned int magic;
+       char *dtc;
+       unsigned int addr;
+       unsigned int ep;
index e4dc78ef27427e6b601a5891909079cd784c4524..f4fbbaf7578d1db1e3ee4137d3dedb1ea5e5c6cd 100644 (file)
@@ -1,14 +1,11 @@
 --- a/tools/Makefile
 +++ b/tools/Makefile
-@@ -160,9 +160,9 @@
- # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
+@@ -173,7 +173,7 @@
+ # Define _GNU_SOURCE to obtain the getline prototype from stdio.h
  #
- HOSTCPPFLAGS =        -include $(SRCTREE)/include/libfdt_env.h \
--              -idirafter $(SRCTREE)/include \
-+              -I $(SRCTREE)/include \
-               -idirafter $(OBJTREE)/include2 \
--              -idirafter $(OBJTREE)/include \
-+              -I $(OBJTREE)/include \
-               -I $(SRCTREE)/lib/libfdt \
-               -I $(SRCTREE)/tools \
+ HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
+-              $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \
++              -I$(srctree)/include \
+               -I$(srctree)/lib/libfdt \
+               -I$(srctree)/tools \
                -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
index 86d5226982b860d66a91503784620559f8e5cb49..767a8b8713c41de64d2ec4b403ffbd78307c48d9 100644 (file)
@@ -1,6 +1,6 @@
 --- a/include/image.h
 +++ b/include/image.h
-@@ -34,7 +34,6 @@
+@@ -17,7 +17,6 @@
  #define __IMAGE_H__
  
  #include "compiler.h"
@@ -8,7 +8,7 @@
  
  /* Define this to avoid #ifdefs later on */
  struct lmb;
-@@ -254,13 +253,13 @@
+@@ -240,13 +239,13 @@
   * all data in network byte order (aka natural aka bigendian).
   */
  typedef struct image_header {
index b408bb10f2f81a92073ae9a42cee0aaba1267b09..9462ca6aa8da79ed4211b3539529985b6c126ad2 100644 (file)
@@ -25,8 +25,8 @@
  #endif /* _LINUX_POSIX_TYPES_H */
 --- a/include/linux/types.h
 +++ b/include/linux/types.h
-@@ -6,7 +6,6 @@
- #endif
+@@ -2,7 +2,6 @@
+ #define _LINUX_TYPES_H
  
  #include <linux/posix_types.h>
 -#include <asm/types.h>
diff --git a/tools/mkimage/patches/070-avoid_ENOMEDIUM.patch b/tools/mkimage/patches/070-avoid_ENOMEDIUM.patch
deleted file mode 100644 (file)
index 53b3aa6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/common/image-fit.c
-+++ b/common/image-fit.c
-@@ -1557,7 +1557,7 @@ int fit_image_load(bootm_headers_t *imag
-       if (fit_image_get_data(fit, noffset, &buf, &size)) {
-               printf("Could not find %s subimage data!\n", prop_name);
-               bootstage_error(bootstage_id + BOOTSTAGE_SUB_GET_DATA);
--              return -ENOMEDIUM;
-+              return -EIO;
-       }
-       len = (ulong)size;