#include <common.h>
#include <command.h>
+#include <env.h>
#include <image.h>
#include <malloc.h>
#include <mapmem.h>
}
#endif
-int
-source (ulong addr, const char *fit_uname)
+int image_source_script(ulong addr, const char *fit_uname)
{
ulong len;
-#if defined(CONFIG_IMAGE_FORMAT_LEGACY)
+#if defined(CONFIG_LEGACY_IMAGE_FORMAT)
const image_header_t *hdr;
#endif
u32 *data;
buf = map_sysmem(addr, 0);
switch (genimg_get_format(buf)) {
-#if defined(CONFIG_IMAGE_FORMAT_LEGACY)
+#if defined(CONFIG_LEGACY_IMAGE_FORMAT)
case IMAGE_FORMAT_LEGACY:
hdr = buf;
addr = CONFIG_SYS_LOAD_ADDR;
debug ("* source: default load address = 0x%08lx\n", addr);
#if defined(CONFIG_FIT)
- } else if (fit_parse_subimage (argv[1], load_addr, &addr, &fit_uname)) {
+ } else if (fit_parse_subimage(argv[1], image_load_addr, &addr,
+ &fit_uname)) {
debug ("* source: subimage '%s' from FIT image at 0x%08lx\n",
fit_uname, addr);
#endif
}
printf ("## Executing script at %08lx\n", addr);
- rcode = source (addr, fit_uname);
+ rcode = image_source_script(addr, fit_uname);
return rcode;
}