* [PATCH] kexec/ppc: Check for a uImage initrd with ELF kernel
@ 2013-09-24 5:23 Athira Rajeev
2013-09-25 2:46 ` Suzuki K. Poulose
2013-09-25 7:11 ` Simon Horman
0 siblings, 2 replies; 4+ messages in thread
From: Athira Rajeev @ 2013-09-24 5:23 UTC (permalink / raw)
To: horms; +Cc: suzuki, kexec
From: Suzuki K. Poulose <suzuki@in.ibm.com>
We should check if the initrd is in uImage format, when
the kernel might be in ELF.
Signed-off-by : Suzuki K Poulose <suzuki@in.ibm.com>
Signed-off-by : Athira Rajeev<atrajeev@in.ibm.com>
---
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
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] kexec/ppc: Check for a uImage initrd with ELF kernel
2013-09-24 5:23 [PATCH] kexec/ppc: Check for a uImage initrd with ELF kernel Athira Rajeev
@ 2013-09-25 2:46 ` Suzuki K. Poulose
2013-09-25 4:23 ` Simon Horman
2013-09-25 7:11 ` Simon Horman
1 sibling, 1 reply; 4+ messages in thread
From: Suzuki K. Poulose @ 2013-09-25 2:46 UTC (permalink / raw)
To: horms; +Cc: kexec, Athira Rajeev
On 09/24/2013 10:53 AM, Athira Rajeev wrote:
> From: Suzuki K. Poulose <suzuki@in.ibm.com>
>
> We should check if the initrd is in uImage format, when
> the kernel might be in ELF.
>
> Signed-off-by : Suzuki K Poulose <suzuki@in.ibm.com>
> Signed-off-by : Athira Rajeev<atrajeev@in.ibm.com>
Simon,
Please pull this one as well. Lets a user choose any combination of
Kernel/Initrd.
Suzuki
> ---
>
> 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
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] kexec/ppc: Check for a uImage initrd with ELF kernel
2013-09-25 2:46 ` Suzuki K. Poulose
@ 2013-09-25 4:23 ` Simon Horman
0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2013-09-25 4:23 UTC (permalink / raw)
To: Suzuki K. Poulose; +Cc: kexec, Athira Rajeev
On Wed, Sep 25, 2013 at 08:16:41AM +0530, Suzuki K. Poulose wrote:
> On 09/24/2013 10:53 AM, Athira Rajeev wrote:
> > From: Suzuki K. Poulose <suzuki@in.ibm.com>
> >
> > We should check if the initrd is in uImage format, when
> > the kernel might be in ELF.
> >
> > Signed-off-by : Suzuki K Poulose <suzuki@in.ibm.com>
> > Signed-off-by : Athira Rajeev<atrajeev@in.ibm.com>
>
> Simon,
>
> Please pull this one as well. Lets a user choose any combination of
> Kernel/Initrd.
Hi,
For some reason I don't seem to have the original post of the patch
in my inbox. Could either you or Athira send it to me with
kexec@lists.infradead.org CCed (again?).
>
> Suzuki
>
> > ---
> >
> > 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
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kexec/ppc: Check for a uImage initrd with ELF kernel
2013-09-24 5:23 [PATCH] kexec/ppc: Check for a uImage initrd with ELF kernel Athira Rajeev
2013-09-25 2:46 ` Suzuki K. Poulose
@ 2013-09-25 7:11 ` Simon Horman
1 sibling, 0 replies; 4+ messages in thread
From: Simon Horman @ 2013-09-25 7:11 UTC (permalink / raw)
To: Athira Rajeev; +Cc: kexec, suzuki
On Tue, Sep 24, 2013 at 10:53:10AM +0530, Athira Rajeev wrote:
> From: Suzuki K. Poulose <suzuki@in.ibm.com>
>
> We should check if the initrd is in uImage format, when
> the kernel might be in ELF.
>
> Signed-off-by : Suzuki K Poulose <suzuki@in.ibm.com>
> Signed-off-by : Athira Rajeev<atrajeev@in.ibm.com>
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
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-25 7:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-24 5:23 [PATCH] kexec/ppc: Check for a uImage initrd with ELF kernel Athira Rajeev
2013-09-25 2:46 ` Suzuki K. Poulose
2013-09-25 4:23 ` Simon Horman
2013-09-25 7:11 ` Simon Horman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.