X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Ffit_image.c;h=e55a8943e764f6e32e740455d5ab1ae2fea6b122;hb=2cd01285b53f376e439e4cbdbce808ca8231ef84;hp=6dcc88bae00f7f149ed741b84ed5d8812ce61c1a;hpb=a6e9810495bc929b6beafb88f557cdaadf87fc83;p=u-boot diff --git a/tools/fit_image.c b/tools/fit_image.c index 6dcc88bae0..e55a8943e7 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2008 Semihalf * @@ -10,8 +11,6 @@ * some functions added to address abstraction * * All rights reserved. - * - * SPDX-License-Identifier: GPL-2.0+ */ #include "imagetool.h" @@ -185,7 +184,7 @@ static void get_basename(char *str, int size, const char *fname) * fit_write_images() - Write out a list of images to the FIT * * We always include the main image (params->datafile). If there are device - * tree files, we include an fdt@ node for each of those too. + * tree files, we include an fdt- node for each of those too. */ static int fit_write_images(struct image_tool_params *params, char *fdt) { @@ -199,7 +198,7 @@ static int fit_write_images(struct image_tool_params *params, char *fdt) /* First the main image */ typename = genimg_get_type_short_name(params->fit_image_type); - snprintf(str, sizeof(str), "%s@1", typename); + snprintf(str, sizeof(str), "%s-1", typename); fdt_begin_node(fdt, str); fdt_property_string(fdt, "description", params->imagename); fdt_property_string(fdt, "type", typename); @@ -225,7 +224,7 @@ static int fit_write_images(struct image_tool_params *params, char *fdt) for (cont = params->content_head; cont; cont = cont->next) { if (cont->type != IH_TYPE_FLATDT) continue; - snprintf(str, sizeof(str), "%s@%d", FIT_FDT_PROP, ++upto); + snprintf(str, sizeof(str), "%s-%d", FIT_FDT_PROP, ++upto); fdt_begin_node(fdt, str); get_basename(str, sizeof(str), cont->fname); @@ -243,7 +242,7 @@ static int fit_write_images(struct image_tool_params *params, char *fdt) /* And a ramdisk file if available */ if (params->fit_ramdisk) { - fdt_begin_node(fdt, FIT_RAMDISK_PROP "@1"); + fdt_begin_node(fdt, FIT_RAMDISK_PROP "-1"); fdt_property_string(fdt, "type", FIT_RAMDISK_PROP); fdt_property_string(fdt, "os", genimg_get_os_short_name(params->os)); @@ -277,41 +276,41 @@ static void fit_write_configs(struct image_tool_params *params, char *fdt) int upto; fdt_begin_node(fdt, "configurations"); - fdt_property_string(fdt, "default", "conf@1"); + fdt_property_string(fdt, "default", "conf-1"); upto = 0; for (cont = params->content_head; cont; cont = cont->next) { if (cont->type != IH_TYPE_FLATDT) continue; typename = genimg_get_type_short_name(cont->type); - snprintf(str, sizeof(str), "conf@%d", ++upto); + snprintf(str, sizeof(str), "conf-%d", ++upto); fdt_begin_node(fdt, str); get_basename(str, sizeof(str), cont->fname); fdt_property_string(fdt, "description", str); typename = genimg_get_type_short_name(params->fit_image_type); - snprintf(str, sizeof(str), "%s@1", typename); + snprintf(str, sizeof(str), "%s-1", typename); fdt_property_string(fdt, typename, str); if (params->fit_ramdisk) fdt_property_string(fdt, FIT_RAMDISK_PROP, - FIT_RAMDISK_PROP "@1"); + FIT_RAMDISK_PROP "-1"); - snprintf(str, sizeof(str), FIT_FDT_PROP "@%d", upto); + snprintf(str, sizeof(str), FIT_FDT_PROP "-%d", upto); fdt_property_string(fdt, FIT_FDT_PROP, str); fdt_end_node(fdt); } if (!upto) { - fdt_begin_node(fdt, "conf@1"); + fdt_begin_node(fdt, "conf-1"); typename = genimg_get_type_short_name(params->fit_image_type); - snprintf(str, sizeof(str), "%s@1", typename); + snprintf(str, sizeof(str), "%s-1", typename); fdt_property_string(fdt, typename, str); if (params->fit_ramdisk) fdt_property_string(fdt, FIT_RAMDISK_PROP, - FIT_RAMDISK_PROP "@1"); + FIT_RAMDISK_PROP "-1"); fdt_end_node(fdt); } @@ -650,9 +649,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\"",