Greetings,
I have found that the location that kernel command line is stored in U-Boot fsl-sdk-v1.6 is dictated by this constant.
```
/*
* For booting Linux, the board info and command line data
* have to be in the first 64 MB of memory, since this is
* the maximum mapped by the Linux kernel during initialization.
*/
#define CONFIG_SYS_BOOTMAPSZ (64 << 20) /* Initial map for Linux*/
```
The command line is allocated space working backward from 64 MB.
The ramdiskaddr is written starting at 32 MB. So if the root filesystem gets to 32 MB or higher. The command line will be written into the middle of it, causing a file in the root filesystem to be corrupted.
I corrected this by pushing the ramdiskaddr to 64 MB. Not sure if this is the best approach????
```
--- build/uboot-fsl-sdk-v1.6/include/configs/T104xRDB.h 2014-06-05 15:41:03.000000000 -0500
+++ build/fix-uboot-fsl-sdk-v1.6/include/configs/T104xRDB.h 2015-07-20 09:17:58.784739185 -0500
@@ -818,7 +818,7 @@
"protect on $ubootaddr +$filesize && " \
"cmp.b $loadaddr $ubootaddr $filesize\0" \
"consoledev=ttyS0\0" \
- "ramdiskaddr=2000000\0" \
+ "ramdiskaddr=4000000\0" \
"ramdiskfile=" __stringify(RAMDISKFILE) "\0" \
"fdtaddr=c00000\0" \
"ramdiskfile=" __stringify(FDTFILE) "\0" \
@@ -828,7 +828,7 @@
#define CONFIG_LINUX \
"setenv bootargs root=/dev/ram rw " \
"console=$consoledev,$baudrate $othbootargs;" \
- "setenv ramdiskaddr 0x02000000;" \
+ "setenv ramdiskaddr 0x4000000;" \
"setenv fdtaddr 0x00c00000;" \
"setenv loadaddr 0x1000000;" \
"bootm $loadaddr $ramdiskaddr $fdtaddr"
```
Thanks,
Maury Anderson
Hello Maury Anderson,
I think you are correct, you also could modify ramdiskaddr under u-boot prompt.
=> pri ramboot
ramboot=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr
=> setenv ramdiskaddr 4000000
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------