All of lore.kernel.org
 help / color / mirror / Atom feed
From: Athira Rajeev <atrajeev@in.ibm.com>
To: horms@verge.net.au
Cc: suzuki@in.ibm.com, kexec@lists.infradead.org
Subject: [PATCH] kexec/ppc: Check for a uImage initrd with ELF kernel
Date: Tue, 24 Sep 2013 10:53:10 +0530	[thread overview]
Message-ID: <20130924052302.4574.87561.stgit@localhost.localdomain> (raw)

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

             reply	other threads:[~2013-09-25  5:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-24  5:23 Athira Rajeev [this message]
2013-09-25  2:46 ` [PATCH] kexec/ppc: Check for a uImage initrd with ELF kernel Suzuki K. Poulose
2013-09-25  4:23   ` Simon Horman
2013-09-25  7:11 ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130924052302.4574.87561.stgit@localhost.localdomain \
    --to=atrajeev@in.ibm.com \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=suzuki@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.