AnsweredAssumed Answered

T1040RDB - U-Boot fsl-sdk-v1.6 - TFTP boot of Linux, ramdiskaddr conflicts with kernel cmdline

Question asked by Maury Anderson on Jul 20, 2015
Latest reply on Jul 22, 2015 by Yiping Wang

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

Outcomes