uboot-sunxi: update to version 2018.05
[openwrt/openwrt.git] / package / boot / uboot-sunxi / patches / 200-mkimage-check-environment-for-dtc-binary-location.patch
index d61895a3f97f48f5b21432b34996030ce629dc26..2c63ad322e592a3f3f57716f909f8399b31908d7 100644 (file)
@@ -1,7 +1,7 @@
-From 5b707cdadb35d896daafff52983416e1c617745b Mon Sep 17 00:00:00 2001
+From 637800493945ffed2f454756300437a4ec86e3b1 Mon Sep 17 00:00:00 2001
 From: Hauke Mehrtens <hauke@hauke-m.de>
 Date: Wed, 19 Jul 2017 22:23:15 +0200
-Subject: [PATCH] mkimage: check environment for dtc binary location
+Subject: mkimage: check environment for dtc binary location
 
 Currently mkimage assumes the dtc binary is in the path and fails
 otherwise. This patch makes it check the DTC environment variable first
@@ -17,7 +17,7 @@ Cc: Simon Glass <sjg@chromium.org>
 
 --- a/tools/fit_image.c
 +++ b/tools/fit_image.c
-@@ -647,9 +647,14 @@ static int fit_handle_file(struct image_
+@@ -649,9 +649,14 @@ static int fit_handle_file(struct image_
                }
                *cmd = '\0';
        } else if (params->datafile) {
@@ -26,10 +26,10 @@ Cc: Simon Glass <sjg@chromium.org>
 +              if (!dtc)
 +                      dtc = MKIMAGE_DTC;
 +
-               /* dtc -I dts -O dtb -p 500 datafile > tmpfile */
-               snprintf(cmd, sizeof(cmd), "%s %s %s > %s",
--                       MKIMAGE_DTC, params->dtc, params->datafile, tmpfile);
-+                       dtc, params->dtc, params->datafile, tmpfile);
+               /* dtc -I dts -O dtb -p 500 -o tmpfile datafile */
+               snprintf(cmd, sizeof(cmd), "%s %s -o \"%s\" \"%s\"",
+-                       MKIMAGE_DTC, params->dtc, tmpfile, params->datafile);
++                       dtc, params->dtc, tmpfile, params->datafile);
                debug("Trying to execute \"%s\"\n", cmd);
        } else {
-               snprintf(cmd, sizeof(cmd), "cp %s %s",
+               snprintf(cmd, sizeof(cmd), "cp \"%s\" \"%s\"",