loff_t actread;
char *splash_file;
- splash_file = getenv("splashfile");
+ splash_file = env_get("splashfile");
if (!splash_file)
splash_file = SPLASH_SOURCE_DEFAULT_FILE_NAME;
if (!locations || size == 0)
return NULL;
- env_splashsource = getenv("splashsource");
+ env_splashsource = env_get("splashsource");
if (env_splashsource == NULL)
return &locations[0];
return res;
img_header = (struct image_header *)bmp_load_addr;
+ if (image_get_magic(img_header) != FDT_MAGIC) {
+ printf("Could not find FDT magic\n");
+ return -EINVAL;
+ }
+
fit_size = fdt_totalsize(img_header);
/* Read in entire FIT */
char *env_splashimage_value;
u32 bmp_load_addr;
- env_splashimage_value = getenv("splashimage");
+ env_splashimage_value = env_get("splashimage");
if (env_splashimage_value == NULL)
return -ENOENT;