tools: mkimage: update to U-Boot release 2022.07
[openwrt/staging/dedeckeh.git] / tools / mkimage / patches / 030-allow-to-use-different-magic.patch
index 936113595a332abea418fac3317147d307970dcc..017f0b9b34452f8369d67dc02f2239f21cad63bd 100644 (file)
@@ -2,7 +2,7 @@ This patch makes it possible to set a custom image magic.
 
 --- a/tools/mkimage.c
 +++ b/tools/mkimage.c
-@@ -24,6 +24,7 @@ static struct image_tool_params params =
+@@ -25,6 +25,7 @@ static struct image_tool_params params =
        .arch = IH_ARCH_PPC,
        .type = IH_TYPE_KERNEL,
        .comp = IH_COMP_GZIP,
@@ -10,8 +10,8 @@ This patch makes it possible to set a custom image magic.
        .dtc = MKIMAGE_DEFAULT_DTC_OPTIONS,
        .imagename = "",
        .imagename2 = "",
-@@ -85,11 +86,12 @@ static void usage(const char *msg)
-                        "          -l ==> list image header information\n",
+@@ -88,11 +89,12 @@ static void usage(const char *msg)
+                        "          -q ==> quiet\n",
                params.cmdname);
        fprintf(stderr,
 -              "       %s [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image\n"
@@ -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"
-@@ -155,7 +157,7 @@ static void process_args(int argc, char
+@@ -163,7 +165,7 @@ static void process_args(int argc, char
        int opt;
  
        while ((opt = getopt(argc, argv,
--                 "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:ln:N:p:O:rR:qstT:vVx")) != -1) {
-+                 "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:lM:n:N:p:O:rR:qstT:vVx")) != -1) {
+-                 "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:ln:N:p:o:O:rR:qstT:vVx")) != -1) {
++                 "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:lM:n:N:p:o:O:rR:qstT:vVx")) != -1) {
                switch (opt) {
                case 'a':
                        params.addr = strtoull(optarg, &ptr, 16);
-@@ -245,6 +247,14 @@ static void process_args(int argc, char
+@@ -254,6 +256,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
-@@ -56,6 +56,7 @@ struct image_tool_params {
+@@ -59,6 +59,7 @@ struct image_tool_params {
        int arch;
        int type;
        int comp;