summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2013-05-05 20:11:04 +0000
committerLuka Perkov <luka@openwrt.org>2013-05-05 20:11:04 +0000
commitb693bfc710ef59f4b3564ea221f34a0317afefe3 (patch)
tree80214a074ea1e8d8bf03c60223329c8353373e8c /tools
parentc7c243669c324b6b2592d397153a258c86efed5c (diff)
downloadmtk-20170518-b693bfc710ef59f4b3564ea221f34a0317afefe3.zip
mtk-20170518-b693bfc710ef59f4b3564ea221f34a0317afefe3.tar.gz
mtk-20170518-b693bfc710ef59f4b3564ea221f34a0317afefe3.tar.bz2
mkimage: update to 2013.04
Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 36550
Diffstat (limited to 'tools')
-rw-r--r--tools/mkimage/Makefile4
-rw-r--r--tools/mkimage/patches/010-freebsd-ulong-fix.patch2
-rw-r--r--tools/mkimage/patches/020-openbsd_fixes.patch4
-rw-r--r--tools/mkimage/patches/030-allow-to-use-different-magic.patch10
-rw-r--r--tools/mkimage/patches/040-include_order.patch14
-rw-r--r--tools/mkimage/patches/100-dtc-binary.patch86
6 files changed, 96 insertions, 24 deletions
diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile
index 7bd7316..458cca8 100644
--- a/tools/mkimage/Makefile
+++ b/tools/mkimage/Makefile
@@ -7,11 +7,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mkimage
-PKG_VERSION:=2013.01.01
+PKG_VERSION:=2013.04
PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
-PKG_MD5SUM:=73939f78606f89a1775c7e9acb2ca617
+PKG_MD5SUM:=21bf962d69938ed4ed783b792b2b074e
PKG_CAT:=bzcat
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
diff --git a/tools/mkimage/patches/010-freebsd-ulong-fix.patch b/tools/mkimage/patches/010-freebsd-ulong-fix.patch
index 7372914..715755b 100644
--- a/tools/mkimage/patches/010-freebsd-ulong-fix.patch
+++ b/tools/mkimage/patches/010-freebsd-ulong-fix.patch
@@ -9,5 +9,5 @@
+#endif
+
#if defined(CONFIG_FIT)
- #include <fdt.h>
#include <libfdt.h>
+ #include <fdt_support.h>
diff --git a/tools/mkimage/patches/020-openbsd_fixes.patch b/tools/mkimage/patches/020-openbsd_fixes.patch
index 1723236..4c376ca 100644
--- a/tools/mkimage/patches/020-openbsd_fixes.patch
+++ b/tools/mkimage/patches/020-openbsd_fixes.patch
@@ -1,6 +1,6 @@
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
-@@ -464,6 +464,7 @@
+@@ -464,6 +464,7 @@ NXTARG: ;
#if defined(_POSIX_SYNCHRONIZED_IO) && \
!defined(__sun__) && \
!defined(__FreeBSD__) && \
@@ -8,7 +8,7 @@
!defined(__APPLE__)
(void) fdatasync (ifd);
#else
-@@ -507,6 +508,7 @@
+@@ -507,6 +508,7 @@ NXTARG: ;
#if defined(_POSIX_SYNCHRONIZED_IO) && \
!defined(__sun__) && \
!defined(__FreeBSD__) && \
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 305b834..1439796 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
-@@ -37,6 +37,7 @@
+@@ -37,6 +37,7 @@ struct mkimage_params params = {
.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 @@
+@@ -189,6 +190,16 @@ main (int argc, char **argv)
genimg_get_comp_id (*++argv)) < 0)
usage ();
goto NXTARG;
@@ -25,7 +25,7 @@
case 'D':
if (--argc <= 0)
usage ();
-@@ -613,12 +624,13 @@
+@@ -613,12 +624,13 @@ usage ()
fprintf (stderr, "Usage: %s -l image\n"
" -l ==> list image header information\n",
params.cmdname);
@@ -42,7 +42,7 @@
" -n ==> set image name to 'name'\n"
--- a/tools/mkimage.h
+++ b/tools/mkimage.h
-@@ -65,6 +65,7 @@
+@@ -65,6 +65,7 @@ struct mkimage_params {
int arch;
int type;
int comp;
@@ -52,7 +52,7 @@
unsigned int ep;
--- a/tools/default_image.c
+++ b/tools/default_image.c
-@@ -111,7 +111,7 @@
+@@ -111,7 +111,7 @@ static void image_set_header(void *ptr,
sbuf->st_size - sizeof(image_header_t));
/* Build new header */
diff --git a/tools/mkimage/patches/040-include_order.patch b/tools/mkimage/patches/040-include_order.patch
deleted file mode 100644
index f94e91d..0000000
--- a/tools/mkimage/patches/040-include_order.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/tools/Makefile
-+++ b/tools/Makefile
-@@ -162,9 +162,9 @@
- # Use native tools and options
- # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
- #
--HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
-+HOSTCPPFLAGS = -I $(SRCTREE)/include \
- -idirafter $(OBJTREE)/include2 \
-- -idirafter $(OBJTREE)/include \
-+ -I $(OBJTREE)/include \
- -I $(SRCTREE)/lib/libfdt \
- -I $(SRCTREE)/tools \
- -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
diff --git a/tools/mkimage/patches/100-dtc-binary.patch b/tools/mkimage/patches/100-dtc-binary.patch
new file mode 100644
index 0000000..5034119
--- /dev/null
+++ b/tools/mkimage/patches/100-dtc-binary.patch
@@ -0,0 +1,86 @@
+--- a/doc/mkimage.1
++++ b/doc/mkimage.1
+@@ -82,6 +82,10 @@
+ .B Create FIT image:
+
+ .TP
++.BI "\-B [" "dtc bin" "]"
++Set path to the device tree compiler binary.
++
++.TP
+ .BI "\-D [" "dtc options" "]"
+ Provide special options to the device tree compiler that is used to
+ create the image.
+--- a/tools/fit_image.c
++++ b/tools/fit_image.c
+@@ -82,7 +82,8 @@
+
+ /* dtc -I dts -O dtb -p 500 datafile > tmpfile */
+ sprintf (cmd, "%s %s %s > %s",
+- MKIMAGE_DTC, params->dtc, params->datafile, tmpfile);
++ params->dtc_bin, params->dtc_options, params->datafile,
++ tmpfile);
+ debug ("Trying to execute \"%s\"\n", cmd);
+ if (system (cmd) == -1) {
+ fprintf (stderr, "%s: system(%s) failed: %s\n",
+--- a/tools/mkimage.c
++++ b/tools/mkimage.c
+@@ -38,7 +38,8 @@
+ .type = IH_TYPE_KERNEL,
+ .comp = IH_COMP_GZIP,
+ .magic = IH_MAGIC,
+- .dtc = MKIMAGE_DEFAULT_DTC_OPTIONS,
++ .dtc_bin = MKIMAGE_DTC,
++ .dtc_options = MKIMAGE_DEFAULT_DTC_OPTIONS,
+ .imagename = "",
+ .imagename2 = "",
+ };
+@@ -200,10 +201,15 @@
+ params.cmdname, *argv);
+ }
+ goto NXTARG;
++ case 'B':
++ if (--argc <= 0)
++ usage ();
++ params.dtc_bin = *++argv;
++ goto NXTARG;
+ case 'D':
+ if (--argc <= 0)
+ usage ();
+- params.dtc = *++argv;
++ params.dtc_options = *++argv;
+ goto NXTARG;
+
+ case 'O':
+@@ -637,7 +643,9 @@
+ " -d ==> use image data from 'datafile'\n"
+ " -x ==> set XIP (execute in place)\n",
+ params.cmdname);
+- fprintf (stderr, " %s [-D dtc_options] -f fit-image.its fit-image\n",
++ fprintf (stderr, " %s [-B dtc_bin] [-D dtc_options] -f fit-image.its fit-image\n",
++ " -B ==> set path to the dtc binary\n",
++ " -D ==> set options that will be passed to dtc\n",
+ params.cmdname);
+ fprintf (stderr, " %s -V ==> print version information and exit\n",
+ params.cmdname);
+--- a/tools/mkimage.h
++++ b/tools/mkimage.h
+@@ -46,7 +46,7 @@
+ #define MKIMAGE_MAX_TMPFILE_LEN 256
+ #define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"
+ #define MKIMAGE_MAX_DTC_CMDLINE_LEN 512
+-#define MKIMAGE_DTC "dtc" /* assume dtc is in $PATH */
++#define MKIMAGE_DTC "dtc"
+
+ /*
+ * This structure defines all such variables those are initialized by
+@@ -66,7 +66,8 @@
+ int type;
+ int comp;
+ unsigned int magic;
+- char *dtc;
++ char *dtc_bin;
++ char *dtc_options;
+ unsigned int addr;
+ unsigned int ep;
+ char *imagename;