提交 63f881d4 编写于 作者: S Stefan Theil 提交者: Tom Rini

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: NStefan Theil <stefan.theil@mixed-mode.de>
Reviewed-by: NTom Rini <trini@konsulko.com>
上级 51be4716
......@@ -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\"",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册