summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/bootm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/bootm.c b/common/bootm.c
index f7e4f9a1b7..6b2c2a6a7b 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -26,6 +26,19 @@ int register_image_handler(struct image_handler *handler)
return 0;
}
+unsigned long long getenv_loadaddr(const char *name)
+{
+ const char *valstr = getenv(name);
+
+ if (!valstr)
+ return UIMAGE_SOME_ADDRESS;
+
+ if (valstr[0] == '\0')
+ return UIMAGE_SOME_ADDRESS;
+
+ return simple_strtoull(valstr, NULL, 0);
+}
+
static struct image_handler *bootm_find_handler(enum filetype filetype,
struct image_data *data)
{