Skip to content

Commit

Permalink
arm64: Hook up the ZBOOT support as vmlinuz
Browse files Browse the repository at this point in the history
Add the previously defined _probe() and _usage() routines
to the kexec file types table, and build the new module.

It should be noted that this "vmlinuz" support reuses the
"Image" support to actually load the resulting image after
it has been decompressed to a temporary file.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Pingfan Liu <piliu@redhat.com>
To: kexec@lists.infradead.org
Cc: horms@verge.net.au
Cc: ardb@kernel.org
Cc: jeremy.linton@arm.com
Signed-off-by: Simon Horman <horms@kernel.org>
  • Loading branch information
jlintonarm authored and horms committed Aug 2, 2023
1 parent c2951c2 commit 502fce8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kexec/arch/arm64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ arm64_KEXEC_SRCS += \
kexec/arch/arm64/kexec-arm64.c \
kexec/arch/arm64/kexec-elf-arm64.c \
kexec/arch/arm64/kexec-uImage-arm64.c \
kexec/arch/arm64/kexec-image-arm64.c
kexec/arch/arm64/kexec-image-arm64.c \
kexec/arch/arm64/kexec-vmlinuz-arm64.c

arm64_UIMAGE = kexec/kexec-uImage.c

Expand Down
1 change: 1 addition & 0 deletions kexec/arch/arm64/kexec-arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ struct file_type file_type[] = {
{"vmlinux", elf_arm64_probe, elf_arm64_load, elf_arm64_usage},
{"Image", image_arm64_probe, image_arm64_load, image_arm64_usage},
{"uImage", uImage_arm64_probe, uImage_arm64_load, uImage_arm64_usage},
{"vmlinuz", pez_arm64_probe, pez_arm64_load, pez_arm64_usage},
};

int file_types = sizeof(file_type) / sizeof(file_type[0]);
Expand Down
6 changes: 6 additions & 0 deletions kexec/arch/arm64/kexec-arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ int uImage_arm64_load(int argc, char **argv, const char *buf, off_t len,
struct kexec_info *info);
void uImage_arm64_usage(void);

int pez_arm64_probe(const char *kernel_buf, off_t kernel_size);
int pez_arm64_load(int argc, char **argv, const char *buf, off_t len,
struct kexec_info *info);
void pez_arm64_usage(void);


extern off_t initrd_base;
extern off_t initrd_size;

Expand Down

0 comments on commit 502fce8

Please sign in to comment.