6

I am hacking together a quick embedded linux system on a DM816x evm board. Previously I have been using TFTP and NFS to load my kernel and root filesystem to the board. I am now trying to switch over to loading everything from an SD card.

I have my card partitioned such that uBoot and my kernel image are in one partition, and my rootFS in another partition. At power-on, Uboot starts correctly and successfully launches the kernel. However, the kernel is unable to mount the root file system. It appears that it doesn't recognize any SD (mmc) cards. It gives this error message.

VFS: Cannot open root device "mmcblk0p2" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00             256 mtdblock0  (driver?)
1f01               8 mtdblock1  (driver?)
1f02            2560 mtdblock2  (driver?)
1f03            1272 mtdblock3  (driver?)
1f04            2432 mtdblock4  (driver?)
1f05             128 mtdblock5  (driver?)
1f06            4352 mtdblock6  (driver?)
1f07          204928 mtdblock7  (driver?)
1f08           50304 mtdblock8  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

I feel like I'm missing something fundamental here. Why does it not recognize the root device I am trying to load from?

Here is my uBoot boot script that is running:

setenv bootargs console=ttyO2,115200n8 root=/dev/mmcblk0p2 rw mem=124M earlyprink vram=50M ti816xfb.vram=0:16M,1:16M,2:6M ip=off noinitrd;mmc init;fatload mmc 1 0x80009000 uImage;bootm 0x80009000

2 Answers2

6

I see that some sample bootarg lines from the DM816x EVMs have a rootdelay=2 up to rootdelay=10. Since it's missing from your bootargs, starting at the lower end of 2 might be nice to see if you need a little bit of time to allow the mmc device to come online.

Digikata
  • 226
2

Yes, the root filesystem driver must be built into the kernel, not a module. The reason is that modules are loaded from the root filesystem. Recompiling a kernel isn't such a huge deal. The first couple times it's tricky, but it's definitely not something only a kernel hacker can understand.