* [PATCH] fdt: fix extend of cmd line
@ 2016-04-13 9:52 Max Uvarov
2016-04-19 21:30 ` Rob Herring
0 siblings, 1 reply; 2+ messages in thread
From: Max Uvarov @ 2016-04-13 9:52 UTC (permalink / raw)
To: linux-kernel; +Cc: devicetree, robh+dt, frowand.list, grant.likely, Max Uvarov
On arm CONFIG_CMDLINE_EXTEND does not append build-in
cmdline in kernel to U-boot parameters. Fix it here.
Theoretically this patch should repair kdump work where
it adds elfcorehdr= and memmap additional parameters
to second kernel.
Signed-off-by: Max Uvarov <muvarov@gmail.com>
---
drivers/of/fdt.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 3349d2a..5e897bf 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -969,10 +969,16 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
* is set in which case we override whatever was found earlier.
*/
#ifdef CONFIG_CMDLINE
-#ifndef CONFIG_CMDLINE_FORCE
+#if defined(CONFIG_CMDLINE_EXTEND)
+ strlcat(data, " ", COMMAND_LINE_SIZE);
+ strlcat(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
+#elif defined(CONFIG_CMDLINE_FORCE)
+ strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
+#else
+ /* No arguments from boot loader, use kernel's cmdl*/
if (!((char *)data)[0])
-#endif
strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
+#endif
#endif /* CONFIG_CMDLINE */
pr_debug("Command line is: %s\n", (char*)data);
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fdt: fix extend of cmd line
2016-04-13 9:52 [PATCH] fdt: fix extend of cmd line Max Uvarov
@ 2016-04-19 21:30 ` Rob Herring
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2016-04-19 21:30 UTC (permalink / raw)
To: Max Uvarov; +Cc: linux-kernel, devicetree, Frank Rowand, Grant Likely
On Wed, Apr 13, 2016 at 4:52 AM, Max Uvarov <muvarov@gmail.com> wrote:
> On arm CONFIG_CMDLINE_EXTEND does not append build-in
> cmdline in kernel to U-boot parameters. Fix it here.
> Theoretically this patch should repair kdump work where
> it adds elfcorehdr= and memmap additional parameters
> to second kernel.
>
> Signed-off-by: Max Uvarov <muvarov@gmail.com>
Applied, thanks. There was some work to standardize these config
options across architectures, but it seems that stalled.
Rob
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-19 21:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 9:52 [PATCH] fdt: fix extend of cmd line Max Uvarov
2016-04-19 21:30 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®