#include <lmb.h>
#include <linux/string.h>
#include <asm/u-boot.h>
-#endif /* USE_HOSTCC */
-/* new uImage format support enabled by default */
+/* 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
-/* enable fit_format_error(), fit_format_warning() */
-#define CONFIG_FIT_VERBOSE 1
+/* new uImage format support enabled on host */
+#define CONFIG_FIT 1
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */
+
+#endif /* USE_HOSTCC */
#if defined(CONFIG_FIT) && !defined(CONFIG_OF_LIBFDT)
#error "CONFIG_OF_LIBFDT not enabled, required by CONFIG_FIT!"
#include <fdt.h>
#include <libfdt.h>
#include <fdt_support.h>
+#define CONFIG_MD5 /* FIT images need MD5 support */
#endif
/*
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;
/*
#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,