bootm: be more informative with oftrees
- print error message when the specified oftree cannot be opened - move verbose info to top of function so that the information is printed before something else fails. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
38a07fb8a9
commit
ff879a2d4c
|
@ -154,9 +154,14 @@ static int bootm_open_oftree(struct image_data *data, char *oftree, int num)
|
||||||
int ret;
|
int ret;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
|
if (bootm_verbose(data))
|
||||||
|
printf("Loading oftree from '%s'\n", oftree);
|
||||||
|
|
||||||
ft = file_name_detect_type(oftree);
|
ft = file_name_detect_type(oftree);
|
||||||
if ((int)ft < 0)
|
if ((int)ft < 0) {
|
||||||
|
printf("failed to open %s: %s\n", oftree, strerror(-(int)ft));
|
||||||
return ft;
|
return ft;
|
||||||
|
}
|
||||||
|
|
||||||
if (ft == filetype_uimage) {
|
if (ft == filetype_uimage) {
|
||||||
#ifdef CONFIG_CMD_BOOTM_OFTREE_UIMAGE
|
#ifdef CONFIG_CMD_BOOTM_OFTREE_UIMAGE
|
||||||
|
@ -196,9 +201,6 @@ static int bootm_open_oftree(struct image_data *data, char *oftree, int num)
|
||||||
file_type_to_string(ft));
|
file_type_to_string(ft));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bootm_verbose(data))
|
|
||||||
printf("Loading oftree from '%s'\n", oftree);
|
|
||||||
|
|
||||||
fdt = xrealloc(fdt, size + 0x8000);
|
fdt = xrealloc(fdt, size + 0x8000);
|
||||||
fdt_open_into(fdt, fdt, size + 0x8000);
|
fdt_open_into(fdt, fdt, size + 0x8000);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue