Never use double quote on u-boot

When you use double quotes on u-boot:

u-boot> set bootargs "console=ttymxc0,115200 root=/dev/mmcblk0p2 video=mxcdi1fb:RGB666,1280x720M@60 di1_primary gpu_nommu,gpu_memory=32M rootfstype=ext3"

It passes the double quote to Linux kernel:

Kernel command line: "console=ttymxc0,115200 root=/dev/mmcblk0p2 video=mxcdi1fb:RGB666,1280x720M@60 di1_primary gpu_nommu,gpu_memory=32M rootfstype=ext3"

Then you could receive an error like this:

Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "(null)" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00            1024 mtdblock0 (driver?)
1f01            6144 mtdblock1 (driver?)
1f02            1024 mtdblock2 (driver?)
1f03          174080 mtdblock3 (driver?)
1f04          200704 mtdblock4 (driver?)
1f05           96256 mtdblock5 (driver?)
1f06          568320 mtdblock6 (driver?)
b300        31166976 mmcblk0 driver: mmcblk
  b301            4096 mmcblk0p1
  b302        31141856 mmcblk0p2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[] (unwind_backtrace+0x0/0xf0) from [] (panic+0x6c/0xe0)
[] (panic+0x6c/0xe0) from [] (mount_block_root+0x1cc/0x20c)
unwind: Unknown symbol address 80008e30
unwind: Index not found 80008e30

The right way to do it is using single quote:

u-boot> set bootargs 'console=ttymxc0,115200 root=/dev/mmcblk0p2 video=mxcdi1fb:RGB666,1280x720M@60 di1_primary gpu_nommu,gpu_memory=32M rootfstype=ext3'

Then u-boot will not pass the quotes to kernel:

Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk0p2 video=mxcdi1fb:RGB666,1280x720M@60 di1_primary gpu_nommu,gpu_memory=32M rootfstype=ext3

and your system will boot correctly:

EXT4-fs (mmcblk0p2): recovery complete
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext3 filesystem) on device 179:2.
Freeing init memory: 536K
INIT: version 2.88 booting

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s