summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2021-04-01 21:25:29 +0300
committerTom Rini <trini@konsulko.com>2021-04-14 23:02:43 +0300
commit51d3a8b54f2cd1bd8278d0611db4ff2d17235229 (patch)
tree735337c714c21e45f9ee1226cb03f8e787ee4012 /common
parent60138aa87cb3281dafebf25125d546718beb3969 (diff)
downloadu-boot-51d3a8b54f2cd1bd8278d0611db4ff2d17235229.tar.xz
spl: LOAD_FIT_FULL: Support 'kernel' and 'firmware' properties
The 'firmware' property of a config node takes precedence over the 'kernel' property. 'standalone' is deprecated. However, give users a couple of releases where 'standalone' still works, but warns loudly. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 8941cbf596..8c4cd933cf 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -215,7 +215,24 @@ static int spl_load_fit_image(struct spl_image_info *spl_image,
ret = fit_image_load(&images, (ulong)header,
NULL, &fit_uname_config,
IH_ARCH_DEFAULT, IH_TYPE_STANDALONE, -1,
- FIT_LOAD_REQUIRED, &fw_data, &fw_len);
+ FIT_LOAD_OPTIONAL, &fw_data, &fw_len);
+ if (ret >= 0) {
+ printf("DEPRECATED: 'standalone = ' property.");
+ printf("Please use either 'firmware =' or 'kernel ='\n");
+ } else {
+ ret = fit_image_load(&images, (ulong)header, NULL,
+ &fit_uname_config, IH_ARCH_DEFAULT,
+ IH_TYPE_FIRMWARE, -1, FIT_LOAD_OPTIONAL,
+ &fw_data, &fw_len);
+ }
+
+ if (ret < 0) {
+ ret = fit_image_load(&images, (ulong)header, NULL,
+ &fit_uname_config, IH_ARCH_DEFAULT,
+ IH_TYPE_KERNEL, -1, FIT_LOAD_OPTIONAL,
+ &fw_data, &fw_len);
+ }
+
if (ret < 0)
return ret;