]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/image.h
SPARC: added SPARC support for new uimage in common code.
[karo-tx-uboot.git] / include / image.h
index 681c753d1d14b8d7c5ee34e2f58eab88c7d279cb..c1a6cbb481e05eac54c2205a9948aa8119a544af 100644 (file)
 #include <linux/string.h>
 #include <asm/u-boot.h>
 
-/* new uImage format support enabled on target
- * To be moved to board configuration file */
-#define CONFIG_FIT             1
-#define CONFIG_OF_LIBFDT       1
-#define CONFIG_FIT_VERBOSE     1 /* enable fit_format_{error,warning}() */
-
 #else
 
 /* new uImage format support enabled on host */
@@ -64,6 +58,7 @@
 #include <fdt.h>
 #include <libfdt.h>
 #include <fdt_support.h>
+#define CONFIG_MD5             /* FIT images need MD5 support */
 #endif
 
 /*
@@ -206,20 +201,26 @@ typedef struct bootm_headers {
        ulong           legacy_hdr_valid;
 
 #if defined(CONFIG_FIT)
+       const char      *fit_uname_cfg; /* configuration node unit name */
+
        void            *fit_hdr_os;    /* os FIT image header */
        const char      *fit_uname_os;  /* os subimage node unit name */
+       int             fit_noffset_os; /* os subimage node offset */
 
        void            *fit_hdr_rd;    /* init ramdisk FIT image header */
-       const char      *fit_uname_rd;  /* init ramdisk node unit name */
+       const char      *fit_uname_rd;  /* init ramdisk subimage node unit name */
+       int             fit_noffset_rd; /* init ramdisk subimage node offset */
 
 #if defined(CONFIG_PPC)
        void            *fit_hdr_fdt;   /* FDT blob FIT image header */
-       const char      *fit_uname_fdt; /* FDT blob node unit name */
+       const char      *fit_uname_fdt; /* FDT blob subimage node unit name */
+       int             fit_noffset_fdt;/* FDT blob subimage node offset */
+#endif
 #endif
+
        int             verify;         /* getenv("verify")[0] != 'n' */
        int             autostart;      /* getenv("autostart")[0] != 'n' */
        struct lmb      *lmb;           /* for memory mgmt */
-#endif
 } bootm_headers_t;
 
 /*
@@ -248,11 +249,11 @@ int genimg_get_comp_id (const char *name);
 #define IMAGE_FORMAT_FIT       0x02    /* new, libfdt based format */
 
 int genimg_get_format (void *img_addr);
+int genimg_has_config (bootm_headers_t *images);
 ulong genimg_get_image (ulong img_addr);
 
-int boot_get_ramdisk (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
-               bootm_headers_t *images, uint8_t arch,
-               ulong *rd_start, ulong *rd_end);
+int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images,
+               uint8_t arch, ulong *rd_start, ulong *rd_end);
 
 #if defined(CONFIG_PPC) || defined(CONFIG_M68K)
 int boot_ramdisk_high (struct lmb *lmb, ulong rd_data, ulong rd_len,
@@ -418,6 +419,8 @@ static inline int image_check_target_arch (image_header_t *hdr)
        if (!image_check_arch (hdr, IH_ARCH_PPC))
 #elif defined(__sh__)
        if (!image_check_arch (hdr, IH_ARCH_SH))
+#elif defined(__sparc__)
+       if (!image_check_arch (hdr, IH_ARCH_SPARC))
 #else
 # error Unknown CPU type
 #endif
@@ -570,6 +573,8 @@ static inline int fit_image_check_target_arch (const void *fdt, int node)
        if (!fit_image_check_arch (fdt, node, IH_ARCH_PPC))
 #elif defined(__sh__)
        if (!fit_image_check_arch (fdt, node, IH_ARCH_SH))
+#elif defined(__sparc__)
+       if (!fit_image_check_arch (fdt, node, IH_ARCH_SPARC))
 #else
 # error Unknown CPU type
 #endif