diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2017-03-08 22:41:13 +0000 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2017-03-13 10:01:36 +0100 |
commit | 896fb2aa30c6acf0c651ba80e4ef661517b4aac4 (patch) | |
tree | c309ed79d6163d661fcb7c0b0caa0eedff68308f /kexec/arch/arm64/kexec-uImage-arm64.c | |
parent | a0c575793b86ebdcf7260ffc7ebbebb912e7ecf4 (diff) |
arm64: add uImage support
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/arm64/kexec-uImage-arm64.c')
-rw-r--r-- | kexec/arch/arm64/kexec-uImage-arm64.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/kexec/arch/arm64/kexec-uImage-arm64.c b/kexec/arch/arm64/kexec-uImage-arm64.c new file mode 100644 index 0000000..022d7ee --- /dev/null +++ b/kexec/arch/arm64/kexec-uImage-arm64.c @@ -0,0 +1,34 @@ +/* + * uImage support added by David Woodhouse <dwmw2@infradead.org> + */ +#include <stdint.h> +#include <string.h> +#include <sys/types.h> +#include <image.h> +#include <kexec-uImage.h> +#include "../../kexec.h" +#include "kexec-arm64.h" + +int uImage_arm64_probe(const char *buf, off_t len) +{ + return uImage_probe_kernel(buf, len, IH_ARCH_ARM64); +} + +int uImage_arm64_load(int argc, char **argv, const char *buf, off_t len, + struct kexec_info *info) +{ + struct Image_info img; + int ret; + + ret = uImage_load(buf, len, &img); + if (ret) + return ret; + + return image_arm64_load(argc, argv, img.buf, img.len, info); +} + +void uImage_arm64_usage(void) +{ + printf( +" An ARM64 U-boot uImage file, compressed or not, big or little endian.\n\n"); +} |