summaryrefslogtreecommitdiffstats
path: root/common/bootm.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-01-12 13:42:42 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-01-18 13:54:08 +0100
commitbc0851db17676c3b79e7be1da14b28c679b87565 (patch)
treef8de263b4b4ba3ebb79663d2f519c6049e20c6a2 /common/bootm.c
parentee8e839569db30fc1d1a7fb712c4a81f6c0089b7 (diff)
downloadbarebox-bc0851db17676c3b79e7be1da14b28c679b87565.tar.gz
FIT: export fit_open_configuration() and fit_open_image()
Currently only fit_open() is exported which only opens the predefined images "kernel", "dtb" and "ramdisk". To make the FIT code more usable for other code which may want to open other images export fit_open_configuration() and fit_open_image(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/bootm.c')
-rw-r--r--common/bootm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/common/bootm.c b/common/bootm.c
index c23898b..05314a0 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -568,7 +568,7 @@ int bootm_boot(struct bootm_data *bootm_data)
if (IS_ENABLED(CONFIG_FITIMAGE) && os_type == filetype_oftree) {
struct fit_handle *fit;
- fit = fit_open(data->os_file, data->os_part, data->verbose, data->verify);
+ fit = fit_open(data->os_file, data->verbose, data->verify);
if (IS_ERR(fit)) {
printf("Loading FIT image %s failed with: %s\n", data->os_file,
strerrorp(fit));
@@ -577,6 +577,13 @@ int bootm_boot(struct bootm_data *bootm_data)
}
data->os_fit = fit;
+
+ ret = fit_open_configuration(data->os_fit, data->os_part);
+ if (ret) {
+ printf("Cannot open FIT image configuration '%s'\n",
+ data->os_part ? data->os_part : "default");
+ goto err_out;
+ }
}
if (os_type == filetype_uimage) {