]> git.sur5r.net Git - u-boot/blobdiff - common/cmd_ximg.c
mvebu: Introduce kconfig symbols for SoC variants
[u-boot] / common / cmd_ximg.c
index ae2714d3728021bdc0d262f2bbe3b4cb54fcfe52..d033c15b629cf2a88823bde658110dde23da2903 100644 (file)
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <command.h>
 #include <image.h>
+#include <mapmem.h>
 #include <watchdog.h>
 #if defined(CONFIG_BZIP2)
 #include <bzlib.h>
@@ -87,7 +88,8 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
                image_print_contents(hdr);
 #endif
 
-               if (!image_check_type(hdr, IH_TYPE_MULTI)) {
+               if (!image_check_type(hdr, IH_TYPE_MULTI) &&
+                   !image_check_type(hdr, IH_TYPE_SCRIPT)) {
                        printf("Wrong Image Type for %s command\n",
                                        cmdtp->name);
                        return 1;
@@ -247,6 +249,8 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
                puts("OK\n");
        }
 
+       flush_cache(dest, len);
+
        setenv_hex("fileaddr", data);
        setenv_hex("filesize", len);