summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStefan Theil <stefan.theil@mixed-mode.de>2018-03-08 09:00:13 +0100
committerTom Rini <trini@konsulko.com>2018-03-09 12:31:07 -0500
commit63f881d46a9745139235be9d8cb892ada6159ea1 (patch)
treea6275a773b7a9ec03c0746da84f2f1fc34e04518 /tools
parent51be47166319dfbf68828182cb57889bae4dc20b (diff)
tools/mkimage: Use proper output parameter in dtc-system call
The system call used by mkimage to run dtc redirects stdout to a temporary file. This can cause problems on Windows (with a MinGW cross-compiled version). Using the "-o" dtc parameter avoids this problem. Signed-off-by: Stefan Theil <stefan.theil@mixed-mode.de> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/fit_image.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/fit_image.c b/tools/fit_image.c
index 1db44f47a1..3f5cc20e49 100644
--- a/tools/fit_image.c
+++ b/tools/fit_image.c
@@ -650,9 +650,9 @@ static int fit_handle_file(struct image_tool_params *params)
}
*cmd = '\0';
} else if (params->datafile) {
- /* 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 -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);
debug("Trying to execute \"%s\"\n", cmd);
} else {
snprintf(cmd, sizeof(cmd), "cp \"%s\" \"%s\"",