diff options
Diffstat (limited to 'kexec/arch/sh')
-rw-r--r-- | kexec/arch/sh/Makefile | 1 | ||||
-rw-r--r-- | kexec/arch/sh/kexec-uImage-sh.c | 15 |
2 files changed, 3 insertions, 13 deletions
diff --git a/kexec/arch/sh/Makefile b/kexec/arch/sh/Makefile index 9ccd008..a9f6081 100644 --- a/kexec/arch/sh/Makefile +++ b/kexec/arch/sh/Makefile @@ -9,6 +9,7 @@ sh_KEXEC_SRCS += kexec/arch/sh/kexec-elf-sh.c sh_KEXEC_SRCS += kexec/arch/sh/kexec-elf-rel-sh.c sh_KEXEC_SRCS += kexec/arch/sh/netbsd_booter.S sh_KEXEC_SRCS += kexec/arch/sh/crashdump-sh.c +sh_KEXEC_SRCS += kexec/kexec-uImage.c sh_ADD_BUFFER = sh_ADD_SEGMENT = diff --git a/kexec/arch/sh/kexec-uImage-sh.c b/kexec/arch/sh/kexec-uImage-sh.c index c2bce53..e983165 100644 --- a/kexec/arch/sh/kexec-uImage-sh.c +++ b/kexec/arch/sh/kexec-uImage-sh.c @@ -7,24 +7,13 @@ #include <string.h> #include <sys/types.h> #include <image.h> +#include <kexec-uImage.h> #include "../../kexec.h" #include "kexec-sh.h" int uImage_sh_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_SH); } int uImage_sh_load(int argc, char **argv, const char *buf, off_t len, |