summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/cray/L1/L1.c7
-rw-r--r--board/esd/common/auto_update.c19
-rw-r--r--board/mcc200/auto_update.c19
-rw-r--r--board/mpl/common/common_util.c7
-rw-r--r--board/siemens/common/fpga.c14
-rw-r--r--board/trab/auto_update.c26
6 files changed, 92 insertions, 0 deletions
diff --git a/board/cray/L1/L1.c b/board/cray/L1/L1.c
index 8e6d74eef..c00acc87a 100644
--- a/board/cray/L1/L1.c
+++ b/board/cray/L1/L1.c
@@ -140,6 +140,13 @@ int misc_init_r (void)
char bootcmd[32];
hdr = (image_header_t *) (CFG_MONITOR_BASE - image_get_header_size ());
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
+
timestamp = (time_t)image_get_time (hdr);
to_tm (timestamp, &tm);
printf ("Welcome to U-Boot on Cray L1. Compiled %4d-%02d-%02d %2d:%02d:%02d (UTC)\n", tm.tm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
diff --git a/board/esd/common/auto_update.c b/board/esd/common/auto_update.c
index cb8087bee..976707dfe 100644
--- a/board/esd/common/auto_update.c
+++ b/board/esd/common/auto_update.c
@@ -91,6 +91,12 @@ int au_check_cksum_valid(int i, long nbytes)
image_header_t *hdr;
hdr = (image_header_t *)LOAD_ADDR;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
if ((au_image[i].type == AU_FIRMWARE) &&
(au_image[i].size != image_get_data_size (hdr))) {
@@ -118,6 +124,13 @@ int au_check_header_valid(int i, long nbytes)
unsigned long checksum;
hdr = (image_header_t *)LOAD_ADDR;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
+
/* check the easy ones first */
#undef CHECK_VALID_DEBUG
#ifdef CHECK_VALID_DEBUG
@@ -183,6 +196,12 @@ int au_do_update(int i, long sz)
#endif
hdr = (image_header_t *)LOAD_ADDR;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
switch (au_image[i].type) {
case AU_SCRIPT:
diff --git a/board/mcc200/auto_update.c b/board/mcc200/auto_update.c
index 8b520c859..fcae35aaf 100644
--- a/board/mcc200/auto_update.c
+++ b/board/mcc200/auto_update.c
@@ -143,6 +143,12 @@ int au_check_cksum_valid(int idx, long nbytes)
image_header_t *hdr;
hdr = (image_header_t *)LOAD_ADDR;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
if (nbytes != image_get_image_size (hdr)) {
printf ("Image %s bad total SIZE\n", aufile[idx]);
@@ -162,6 +168,13 @@ int au_check_header_valid(int idx, long nbytes)
unsigned long checksum, fsize;
hdr = (image_header_t *)LOAD_ADDR;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
+
/* check the easy ones first */
#undef CHECK_VALID_DEBUG
#ifdef CHECK_VALID_DEBUG
@@ -233,6 +246,12 @@ int au_do_update(int idx, long sz)
uint nbytes;
hdr = (image_header_t *)LOAD_ADDR;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
/* execute a script */
if (image_check_type (hdr, IH_TYPE_SCRIPT)) {
diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c
index b171ca517..fffd25c2b 100644
--- a/board/mpl/common/common_util.c
+++ b/board/mpl/common/common_util.c
@@ -181,6 +181,13 @@ mpl_prg_image(uchar *ld_addr)
image_header_t *hdr = (image_header_t *)ld_addr;
int rc;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
+
if (!image_check_magic (hdr)) {
puts("Bad Magic Number\n");
return 1;
diff --git a/board/siemens/common/fpga.c b/board/siemens/common/fpga.c
index 9d719460d..a9a6dfed6 100644
--- a/board/siemens/common/fpga.c
+++ b/board/siemens/common/fpga.c
@@ -137,6 +137,13 @@ static int fpga_load (fpga_t* fpga, ulong addr, int checkall)
char msg[32];
int verify, i;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
+
/*
* Check the image header and data of the net-list
*/
@@ -333,6 +340,13 @@ int fpga_init (void)
}
hdr = (image_header_t *)addr;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
+
if ((new_id = fpga_get_version(fpga, image_get_name (hdr))) == -1)
return 1;
diff --git a/board/trab/auto_update.c b/board/trab/auto_update.c
index bd9ee0c01..8f6753592 100644
--- a/board/trab/auto_update.c
+++ b/board/trab/auto_update.c
@@ -211,6 +211,12 @@ au_check_cksum_valid(int idx, long nbytes)
image_header_t *hdr;
hdr = (image_header_t *)LOAD_ADDR;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
if (nbytes != image_get_image_size (hdr))
{
@@ -234,6 +240,13 @@ au_check_header_valid(int idx, long nbytes)
unsigned char buf[4];
hdr = (image_header_t *)LOAD_ADDR;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
+
/* check the easy ones first */
#undef CHECK_VALID_DEBUG
#ifdef CHECK_VALID_DEBUG
@@ -327,6 +340,12 @@ au_do_update(int idx, long sz)
uint nbytes;
hdr = (image_header_t *)LOAD_ADDR;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
/* disable the power switch */
*CPLD_VFD_BK |= POWER_OFF;
@@ -417,6 +436,13 @@ au_update_eeprom(int idx)
}
hdr = (image_header_t *)LOAD_ADDR;
+#if defined(CONFIG_FIT)
+ if (gen_image_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+ puts ("Non legacy image format not supported\n");
+ return -1;
+ }
+#endif
+
/* write the time field into EEPROM */
off = auee_off[idx].time;
val = image_get_time (hdr);