[meta-xilinx] FW: Kernel Command Line problem
Michal Simek
michal.simek at xilinx.com
Tue Dec 10 07:05:21 PST 2013
Hi Martin,
you are right. I have confirmed it and pushed it to xlnx_3.8 branch.
I will test the same on the master-next just for sure.
There were some changes that's why I can't just simple apply this patch there.
Thanks,
Michal
commit 3213f6447f29121d939c671116911d493538ea13
Author: Michal Simek <michal.simek at xilinx.com>
Date: Tue Dec 10 15:59:28 2013 +0100
microblaze: Fix passing kernel command line from bootloader
This patch fix the problem with overwritten cmdline by
chosen one from DT. Bootloader has a higher precedence
than DT.
Reported-by: Martin Townsend <martin.townsend at xsilon.com>
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
On 12/05/2013 11:26 PM, Sipke Vriend wrote:
> Hi Martin,
>
> For Zynq your understanding would be correct, but I am unsure for
> Microblaze.
> I am forwarding this to git at xilinx.com as the team monitoring that
> may be able to assist you.
>
> Regards
> Sipke
>
>> -----Original Message-----
>> From: meta-xilinx-bounces at yoctoproject.org
>> [mailto:meta-xilinx-bounces at yoctoproject.org] On Behalf Of Martin Townsend
>> Sent: Thursday, 5 December 2013 12:57 AM
>> To: meta-xilinx at yoctoproject.org
>> Subject: [meta-xilinx] Kernel Command Line problem
>>
>> Hi,
>>
>> I now have the 3.10 Kernel booting. I had an issue where my Kernel
>> bootargs that I had setup in the U-Boot environment weren't being used
>> by the Kernel. After some debugging I found that they were being
>> overwritten by the ones in the 'chosen' section of the device tree. My
>> understanding (which may be wrong) is that the bootargs passed by the
>> bootloader have a higher precedence than the one in the device tree so I
>> hacked the prom.c file in arch/microblaze/kernel/prom.c so it doesn't
>> process 'chosen' to get things working. The reason I want to use U-Boot
>> bootargs is that we are mounting the Root Filesystem using NFS and each
>> board will have a different rootpath variable in the U-Boot env, we are
>> also storing the unique MAC address here too. It's easier to program a
>> unique environment rather than regenerate the device tree.
>>
>> First am I right in assuming the bootloader should have higher
>> precedence and if so I would appreciate if someone could look at this
>> patch that I'm using as a hack and advise on the right way to do it :)
>>
>> Best Regards,
>> Martin.
>>
>> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
>> index 0a2c68f..bff2c75 100644
>> --- a/arch/microblaze/kernel/prom.c
>> +++ b/arch/microblaze/kernel/prom.c
>> @@ -118,7 +118,8 @@ void __init early_init_devtree(void *params)
>> * device-tree, including the platform type, initrd location and
>> * size, TCE reserve, and more ...
>> */
>> - of_scan_flat_dt(early_init_dt_scan_chosen, cmd_line);
>> + if(cmd_line[0] == '\0')
>> + of_scan_flat_dt(early_init_dt_scan_chosen, cmd_line);
>>
>> /* Scan memory nodes and rebuild MEMBLOCKs */
>> of_scan_flat_dt(early_init_dt_scan_root, NULL);
>> --
>> 1.8.3.2
>> _______________________________________________
>> meta-xilinx mailing list
>> meta-xilinx at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-xilinx
>>
>>
More information about the meta-xilinx
mailing list