This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unable to mount rootfs from SDCard

Hi,

I am booting DM816x Netra board from SD card.

I am getting error unable to find the rootfs and followed by kernrl panic.

I am using boot args setenv bootargs 'console=ttyO2,115200n8 root=/dev/mmcblk0p2 mem=128M rootwait'

and 2.6.37 kernel does root=/dev/mmcblk0p2 changes for different SD cards ?


  • For me this boot.cmd worked:

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

    I've the same kernel, and a DM816x too, but the old version for DDR2 only.

    Possibly it helps generating a SD card from scratch, using the shell script mksdcard.sh provided by TI for this purpose, if you have EZSDK have a look into docs/DM816x_C6A816x_AM389x_EZ_Software_Developers_Guide.pdf, chapter 5.6, "How to create an SD card" - just to have a sample for comparing to your non-running SD card.

    Regards,
    Joern.

  • Hi Joern,

    I tried with these boot args but still the same problem exists.

    As i am formatting the SD Card with  ./mksd-ti816x.sh /dev/sdd MLO u-boot.bin uImage nfs.tar.gz , do I need to change boot args ...?

    and in rootfs folder init.rc is missing and only linuxrc is there, is it ok?

    from where can I down load the correct root file system?

    I read some boot related docs, i found that bootm uImage address is different in them.. how do I found the correct address..? 

  • From the DM816x_C6A816x_AM389x_EZ_Software_Developers_Guide.pdf (ezsdk5.01/docs) I took:

    sudo ${EZSDK}/bin/mksdboot.sh --device /dev/sdb --sdk ${EZSDK}

    where ${EZSDK} should deliver the install path of the EZSDK (instead you can call  that line with actual pathes to EZSDK). I refer to the most current EZSDK 5_01_01_80 from here.

    In this case obviously all needed stuff (bootargs, MLO, u-boot, kernel image, root file system) came from the EZSDK directories resp. from the install directory where some EZSDK builds copy their results to on 'make inst'. So maybe you should try again with components original coming from the EZSDK itself. And then compare, what made the difference.

    The only thing I had to change was:

    I had to rebuild u-boot/MLO with some changed settings concerning DDR2 (as I yet had an older DDR2-only board running), if that's the case for you, have a look into the above mentioned document, chapter 5.3, "How to setup the EZ SDK for DDR2 EVMs". But if that was the case for you, then you would have any boot message nor messages about a crash when looking for the root file system. (And I installed the EZSDK without video components, because my older board had no video extension board).

    Besides, after that above call to mkboot.sh I found all u-boot stuff at 1st partition of the SD card, and the whole root files system was to be found at the second partition of the SD card. Later I changed to NFS root file system and simply copied all (by cp -a) content of that second partition into the concerning NFS directory. For NFS I had to add the boot parameter rootdelay=4, as our NFS server obviously was too slow.

    Concerning your bootm address question: I know, that at different places different information is to be found, sometimes it does not matter, sometimes it does... so too often I feel put back to trial and error techniques from the Stone Age. But in this case I think it is allowed to differ somewhat, as long as it is within a sensful region (for sure SOMEWHERE this is to be found, too) AND, of course, if the uImage is started from the same address it was loaded to before. For me worded:

    fatload mmc 1 0x80009000 uImage
    bootm 0x80009000

    An after I changed to TFTP for uImage (renamed the concerning file at tftp server) I used an other address (was randomly), it worked, too:

    tftp  0x81000000 ti816x.bin
    bootm 0x81000000

    Regards,
    Joern.

     

  • Hi Joern,

    I am using Fedora as my host and this EZSDK runs only on ubuntu 10.44, I even tried o run it on ubuntu 9.4 but its failed.

    Please tell me the compatible binaries which can run on Fedora or  ubuntu 9.4


  • Hi Ramakrishna,

    I didn't try to install it at another platform then the one announced by TI, the Ubuntu 10.04 LTS (there is an option of the installer, "--forcehost", to ignore the Linux host compatibility check, but I didn't try that). After the complete installation was finished I copied the whole installed directories to my SuSE 11.3 platform and could continue working there without any problems (until now, and besides the problem always looking for some missing information).

    For the Ubuntu 10.04 LTS I used a current virtualbox, that works quiet good.

    Regards,
    Joern.

     

  • ramakrishna deshpande,

    Just double checking. You mention "./mksd-ti816x.sh /dev/sdd MLO u-boot.bin uImage nfs.tar.gz". Did you execute this line as root user?

    Might be helpful to see the boot messages.

     

     

  • Hi,

    I have downloaded the latest Ez-SDK .

    I am using mksd-ti816x.sh to format the sd card, and I have used the rootfs.tar.gz which came along with the package.

    I have used the boot args :

    TI8168_EVM#  mmc init
    TI8168_EVM#  fatload mmc 1 0x81000000 uImage
    TI8168_EVM#  setenv bootargs 'console=ttyO2,115200n8 root=/dev/mmcblk0p2 mem=128M'
    TI8168_EVM#  bootm 0x81000000

    But am getting the kernel panic and the error message is as follows

    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)
    Backtrace:
    [<c0043b44>] (dump_backtrace+0x0/0x110) from [<c0353b94>] (dump_stack+0x18/0x1c)
     r7:c7812000 r6:00000000 r5:c002b72c r4:c04b9950
    [<c0353b7c>] (dump_stack+0x0/0x1c) from [<c0353bf8>] (panic+0x60/0x17c)
    [<c0353b98>] (panic+0x0/0x17c) from [<c0009254>] (mount_block_root+0x1e0/0x220)
     r3:00000000 r2:00000000 r1:c7823f58 r0:c040638c
    [<c0009074>] (mount_block_root+0x0/0x220) from [<c0009340>] (mount_root+0xac/0xc
    c)
    [<c0009294>] (mount_root+0x0/0xcc) from [<c00094d0>] (prepare_namespace+0x170/0x
    1d4)
     r4:c04b92e4
    [<c0009360>] (prepare_namespace+0x0/0x1d4) from [<c0008784>] (kernel_init+0x114/
    0x154)
     r5:c0008670 r4:c04b9280
    [<c0008670>] (kernel_init+0x0/0x154) from [<c0063b00>] (do_exit+0x0/0x5e4)
     r5:c0008670 r4:00000000

  • It not clear if you executed the command as root. To ensure root use "sudo":

    sudo ./mksd-ti816x.sh /dev/sdd MLO u-boot.bin uImage nfs.tar.gz

    Your boot messages suggest the MMC driver is not loaded yet. Your boot messages should have something like this:

    mmc0: new high speed SD card at address b368
    mmcblk0: mmc0:b368 SD    1.88 GiB (ro)
     mmcblk0: p1 p2

    Your bootargs should have a "rootwait" option. Your first post has it but your recent post does not.