summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorMax Uvarov <muvarov@gmail.com>2016-04-13 12:52:16 +0300
committerRob Herring <robh@kernel.org>2016-04-19 17:25:12 -0500
commit34b82026a507ec0092398d9fc7893c00dd11b7da (patch)
tree9ee2da5045a8c1bd44514ffec7a7e161dd8d7a77 /drivers/of
parentbc553986a2f7c56d0de811485d5312ea29692d5d (diff)
downloadlinux-34b82026a507ec0092398d9fc7893c00dd11b7da.tar.bz2
fdt: fix extend of cmd line
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> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/fdt.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 3349d2aa6634..5e897bfe6628 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);