From bc0851db17676c3b79e7be1da14b28c679b87565 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 12 Jan 2018 13:42:42 +0100 Subject: 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 --- common/bootm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'common/bootm.c') diff --git a/common/bootm.c b/common/bootm.c index c23898bea7..05314a0a10 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) { -- cgit v1.2.3