summaryrefslogtreecommitdiff
path: root/lib_arm/armlinux.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib_arm/armlinux.c')
-rw-r--r--lib_arm/armlinux.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib_arm/armlinux.c b/lib_arm/armlinux.c
index 2fb8db8..0305803 100644
--- a/lib_arm/armlinux.c
+++ b/lib_arm/armlinux.c
@@ -27,6 +27,9 @@
#include <image.h>
#include <zlib.h>
#include <asm/byteorder.h>
+#ifdef CONFIG_HAS_DATAFLASH
+#include <dataflash.h>
+#endif
#include <asm/setup.h>
#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
@@ -94,6 +97,11 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
printf ("## Loading Ramdisk Image at %08lx ...\n", addr);
/* Copy header so we can blank CRC field for re-calculation */
+#ifdef CONFIG_HAS_DATAFLASH
+ if (addr_dataflash(addr)){
+ read_dataflash(addr, sizeof(image_header_t), (char *)&header);
+ } else
+#endif
memcpy (&header, (char *)addr, sizeof(image_header_t));
if (ntohl(hdr->ih_magic) != IH_MAGIC) {
@@ -121,6 +129,13 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
data = addr + sizeof(image_header_t);
len = ntohl(hdr->ih_size);
+#ifdef CONFIG_HAS_DATAFLASH
+ if (addr_dataflash(addr)){
+ read_dataflash(data, len, (char *)CFG_LOAD_ADDR);
+ data = CFG_LOAD_ADDR;
+ }
+#endif
+
if (verify) {
ulong csum = 0;