[meta-xilinx] FW: Kernel Command Line problem

Sipke Vriend sipke.vriend at xilinx.com
Thu Dec 5 14:26:22 PST 2013


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