summaryrefslogtreecommitdiff
path: root/kexec/arch/arm/kexec-uImage-arm.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>2010-01-22 18:15:38 +0100
committerSebastian Andrzej Siewior <bigeasy@linutronix.de>2010-03-31 10:01:29 +0200
commitde5dd4d4036211b0a8e1839ce87984a074eb18f8 (patch)
treebf66e9eb865a868bbbf572cdebbddb0e94cd6488 /kexec/arch/arm/kexec-uImage-arm.c
parent872edb58246b9f310bd99315e5e102ab754fb765 (diff)
Let SH adn ARM use common uImage probe code
The now generic probe function is more complete than the currently used. It seems that ARM's and SH's uImage are always uncompressed so it might be good to check for this. Cc: Paul Mundt <lethal@linux-sh.org> Cc: Marc Andre Tanner <mat@brain-dump.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'kexec/arch/arm/kexec-uImage-arm.c')
-rw-r--r--kexec/arch/arm/kexec-uImage-arm.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/kexec/arch/arm/kexec-uImage-arm.c b/kexec/arch/arm/kexec-uImage-arm.c
index e881fd8..4875185 100644
--- a/kexec/arch/arm/kexec-uImage-arm.c
+++ b/kexec/arch/arm/kexec-uImage-arm.c
@@ -5,24 +5,13 @@
#include <string.h>
#include <sys/types.h>
#include <image.h>
+#include <kexec-uImage.h>
#include "../../kexec.h"
#include "kexec-arm.h"
int uImage_arm_probe(const char *buf, off_t len)
{
- struct image_header header;
-
- if ((uintmax_t)len < (uintmax_t)sizeof(header))
- return -1;
-
- memcpy(&header, buf, sizeof(header));
-
- if (cpu_to_be32(header.ih_magic) != IH_MAGIC)
- return -1;
-
- /* XXX: check CRC Checksum? */
-
- return 0;
+ return uImage_probe(buf, len, IH_ARCH_ARM);
}
int uImage_arm_load(int argc, char **argv, const char *buf, off_t len,