From: dyoung@redhat.com
To: kexec@lists.infradead.org
Cc: jstodola@redhat.com, horms@verge.net.au
Subject: [kexec-tools PATCH 3/3] ppc64: add arch option --dt-no-old-root
Date: Wed, 28 Oct 2015 13:41:37 +0800 [thread overview]
Message-ID: <20151028054400.051359764@redhat.com> (raw)
In-Reply-To: 20151028054134.200833741@redhat.com
[-- Attachment #1: ppc64-arch-no-root.patch --]
[-- Type: text/plain, Size: 2141 bytes --]
When createing fdt from /proc/device-tree, if there's local --command-line
option provided but there's no root= specified, kexec-tools will copy the root=
param from 1st kernel cmdline by default. In case one want kexec boot without
root= it will be impossible.
Thus add the new option so that one can provide --dt-no-old-root for above
mentioned case.
Reported-by: Jan Stodola <jstodola@redhat.com>
Signed-off-by: Dave Young <dyoung@redhat.com>
---
kexec/arch/ppc64/include/arch/options.h | 4 +++-
kexec/arch/ppc64/kexec-ppc64.c | 5 +++++
2 files changed, 8 insertions(+), 1 deletion(-)
--- kexec-tools.orig/kexec/arch/ppc64/include/arch/options.h
+++ kexec-tools/kexec/arch/ppc64/include/arch/options.h
@@ -2,7 +2,8 @@
#define KEXEC_ARCH_PPC64_OPTIONS_H
#define OPT_ELF64_CORE (OPT_MAX+0)
-#define OPT_ARCH_MAX (OPT_MAX+1)
+#define OPT_DT_NO_OLD_ROOT (OPT_MAX+1)
+#define OPT_ARCH_MAX (OPT_MAX+2)
/* All 'local' loader options: */
#define OPT_APPEND (OPT_ARCH_MAX+0)
@@ -14,6 +15,7 @@
#define KEXEC_ARCH_OPTIONS \
KEXEC_OPTIONS \
{ "elf64-core-headers", 0, 0, OPT_ELF64_CORE }, \
+ { "dt-no-old-root", 0, 0, OPT_DT_NO_OLD_ROOT }, \
#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR ""
--- kexec-tools.orig/kexec/arch/ppc64/kexec-ppc64.c
+++ kexec-tools/kexec/arch/ppc64/kexec-ppc64.c
@@ -869,6 +869,8 @@ int file_types = sizeof(file_type) / siz
void arch_usage(void)
{
fprintf(stderr, " --elf64-core-headers Prepare core headers in ELF64 format\n");
+ fprintf(stderr, " --dt-no-old-root Do not reuse old kernel root= param.\n" \
+ " while creating flatten device tree.\n");
}
struct arch_options_t arch_options = {
@@ -895,6 +897,9 @@ int arch_process_options(int argc, char
case OPT_ELF64_CORE:
arch_options.core_header_type = CORE_TYPE_ELF64;
break;
+ case OPT_DT_NO_OLD_ROOT:
+ dt_no_old_root = 1;
+ break;
}
}
/* Reset getopt for the next pass; called in other source modules */
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2015-10-28 5:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 5:41 [kexec-tools PATCH 0/3] New option to avoid copying old root param from 1st kernel cmdline dyoung
2015-10-28 5:41 ` [kexec-tools PATCH 1/3] fs2dt.c: move copy old root param as a new function dyoung
2015-10-28 5:41 ` [kexec-tools PATCH 2/3] arm: add arch option --dt-no-old-root dyoung
2015-10-28 5:41 ` dyoung [this message]
2015-10-29 23:49 ` [kexec-tools PATCH 0/3] New option to avoid copying old root param from 1st kernel cmdline 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=20151028054400.051359764@redhat.com \
--to=dyoung@redhat.com \
--cc=horms@verge.net.au \
--cc=jstodola@redhat.com \
--cc=kexec@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox