[meta-xilinx] 3.12 Kernel command line arg problem
Sipke Vriend
sipke.vriend at xilinx.com
Mon Jan 27 17:35:12 PST 2014
Forwarding to git at xilinx.com.
Sipke
On 24/01/2014 9:49 PM, Martin Townsend wrote:
> Hi,
>
> I see that the kernel command line arg problem still exists in the 3.12
> kernel that I'm using from net-next. In prom.c there's the following lines
>
> early_init_dt_scan(params);
> if (!strlen(boot_command_line))
> strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
>
> As boot_command_line will contain the command line in the device tree by
> this point, see drivers/of/fdt.c - early_init_dt_scan, it never copies
> the higher priority one from cmd_line (the one passed from U-Boot. You
> may have already fixed this in a forthcoming 3.12 release but in case
> you haven't I've got a patch below. You might want to take the #define
> DEBUG out :)
>
> Cheers,
> Martin.
>
>
>
> From f44b4f05c5c0e851e08a2b69632709dd8a5f9c98 Mon Sep 17 00:00:00 2001
> From: Martin Townsend <martin.townsend at xsilon.com>
> Date: Fri, 24 Jan 2014 10:42:54 +0000
> Subject: [PATCH] fixed kernel command line being overwritten
>
> ---
> arch/microblaze/kernel/prom.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index abdfb10..1929cfe 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -12,7 +12,7 @@
> * as published by the Free Software Foundation; either version
> * 2 of the License, or (at your option) any later version.
> */
> -
> +#define DEBUG
> #include <stdarg.h>
> #include <linux/export.h>
> #include <linux/kernel.h>
> @@ -103,8 +103,10 @@ void __init early_init_devtree(void *params)
> pr_debug(" -> early_init_devtree(%p)\n", params);
>
> early_init_dt_scan(params);
> - if (!strlen(boot_command_line))
> + printk("cmd_line: %s\n", cmd_line);
> + if (strlen(cmd_line))
> strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
> + printk("boot_command_line: %s\n", boot_command_line);
>
> parse_early_param();
>
More information about the meta-xilinx
mailing list