summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2021-04-01 21:25:27 +0300
committerTom Rini <trini@konsulko.com>2021-04-14 23:02:43 +0300
commit2eaae17bc90ec524dbddc52a85ff3705727d7c5a (patch)
treead659ca05ecb95e1112a7357d4cfc56ab848b6d7 /common
parent18fd663c630729695caba060aca394d8a910c573 (diff)
downloadu-boot-2eaae17bc90ec524dbddc52a85ff3705727d7c5a.tar.xz
spl: LOAD_FIT_FULL: Do not hard-code os to IH_OS_U_BOOT
The information on the OS should be contained in the FIT, as the self-explanatory "os" property of a node under /images. Hard-coding this to U_BOOT might send us down the wrong path later in the boot process. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 33119e95b8..85fccb5de4 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -221,8 +221,9 @@ static int spl_load_fit_image(struct spl_image_info *spl_image,
spl_image->size = fw_len;
spl_image->entry_point = fw_data;
spl_image->load_addr = fw_data;
- spl_image->os = IH_OS_U_BOOT;
- spl_image->name = "U-Boot";
+ if (fit_image_get_os(header, ret, &spl_image->os))
+ spl_image->os = IH_OS_INVALID;
+ spl_image->name = genimg_get_os_name(spl_image->os);
debug(SPL_TPL_PROMPT "payload image: %32s load addr: 0x%lx size: %d\n",
spl_image->name, spl_image->load_addr, spl_image->size);