On Tue, Sep 24, 2013 at 10:53:10AM +0530, Athira Rajeev wrote:
> From: Suzuki K. Poulose <[email protected]>
> 
> We should check if the initrd is in uImage format, when
> the kernel might be in ELF.
> 
> Signed-off-by : Suzuki K Poulose <[email protected]>
> Signed-off-by : Athira Rajeev<[email protected]>

Thanks, applied.

> ---
> 
>  kexec/arch/ppc/kexec-elf-ppc.c |    2 +-
>  kexec/arch/ppc/kexec-ppc.h     |    3 +++
>  2 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/kexec/arch/ppc/kexec-elf-ppc.c b/kexec/arch/ppc/kexec-elf-ppc.c
> index 98cae9c..df1b521 100644
> --- a/kexec/arch/ppc/kexec-elf-ppc.c
> +++ b/kexec/arch/ppc/kexec-elf-ppc.c
> @@ -371,7 +371,7 @@ int elf_ppc_load(int argc, char **argv,   const char 
> *buf, off_t len,
>       blob_buf = fixup_dtb_init(info, blob_buf, &blob_size, kernel_addr, 
> &dtb_addr);
>  
>       if (ramdisk) {
> -             seg_buf = slurp_file(ramdisk, &seg_size);
> +             seg_buf = slurp_ramdisk_ppc(ramdisk, &seg_size);
>               /* load the ramdisk *above* the device tree */
>               hole_addr = add_buffer(info, seg_buf, seg_size, seg_size,
>                               0, dtb_addr + blob_size + 1,  max_addr, -1);
> diff --git a/kexec/arch/ppc/kexec-ppc.h b/kexec/arch/ppc/kexec-ppc.h
> index 68728c6..904cf48 100644
> --- a/kexec/arch/ppc/kexec-ppc.h
> +++ b/kexec/arch/ppc/kexec-ppc.h
> @@ -78,4 +78,7 @@ extern int read_memory_region_limits(int fd, unsigned long 
> long *start,
>  #define COMMAND_LINE_SIZE    512 /* from kernel */
>  /*fs2dt*/
>  void reserve(unsigned long long where, unsigned long long length);
> +
> +/* Defined kexec-uImage-ppc.c */
> +extern char* slurp_ramdisk_ppc(const char *filename, off_t *r_size);
>  #endif /* KEXEC_PPC_H */
> 
> 
> _______________________________________________
> kexec mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/kexec
> 

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to