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.

Booting USB Filesystem on OMAPL137 EVM

Other Parts Discussed in Thread: OMAP-L137

Hi,

I am trying to boot the file-system by means USB0 port at the OMAPL137 EVM. I have followed  instructions from http://processors.wiki.ti.com/index.php/Creating_filesystems_on_removable_media. So, I got kernel built from DaVinci-PSP-SDK-03.20.00.14 and u-boot as well.

At the USB, I did two partitions, one for  kernel and the other for FS. Besides, first partition has FAT16 type whereas second partition has LINUX. Both of them seem to be generated without problems.

Respect to file-system, I had to copy the Montavista file-system embedded in the SD Card. This copy was done by means following command:

sudo rsync -avx --progress /media/SDCARD/   /media/USB_PARTITION_FS

I think it is one of the safest procedures to do this kind of operations.

Everything goes ok so far. Then, I configure the environment variables at uboot to boot through USB:

//Check if USB is alive and which devices are on
usb reset
//Load the kernel image to memory
fatload usb 0:1 0xC0700000 uimage
setenv bootargs console=ttyS2,115200n8 noinitrd rw ip=off root=/dev/sda2 rootfstype=ext2 mem=32M

Kernel is read without problems, but when the OS is loading, it failed trying to look for the /dev/sda2. I got next message:

VFS: Cannot open root device "sda2" or unknown-block

What else can I do?Maybe, would I have to modify any kernel/u-boot options? Or does anyone know any method to obtain the file-system directly, easily?

Any suggestion or advise would be appreciated!! Thanks in advance

Regards

Óscar

  • Hi Óscar,

    Is your file system partition formatted as ext2? I noticed your 'rootfstype' bootarg is set to this type.

    Thanks,

    Clinton

  • Yes Clinton, I formatted with that option, ext2. .. I think that error message has to be other kind of fail, I mean, USB is detected ok at the uboot, but second partition is never recognized as a filesystem and it is strange, I think ... Is there any location where I can download the montavista filesystem or whatever to copy on the USB second partition??  Sugestions or advises please! Thanks in advance!

    Regards

    Óscar

  • Hi Óscar,

    I'm trying to recreate your issue on my board, could you provide some of the following details:

    1. Did you also pull you DSP UBL and ARM UBL from the PSP release?

    2. Did you make any modification to the kernel?

    3. Is there a reason you did not use the 'cp' command to copy over the file system?

    4. Can you confirm with your host machine that the /dev/sda2 partition is on your flash drive and has the file system you copied on it?

     

    Thanks,

    Clinton

  • Yeah of course! Answers are below

    1- Yees, I am using the DSP UBLand ARM UBL from the PSP release

    2-I have tested two scenarios: a) kernel built from the PSP release  and other kernel built by myself, configuring for the EVM OMAL137 (file:da830evm.h or similar). Both kernels are read ok.

    3- Use command cp does not allow complete copies of a file-system (dependences and so on). Command written at the previous post (rsync) ensures the copy correctly. Maybe cp works ok but I have had some bad experience with it... In short, I do not think command issue would be the problem, but who knows... I am going to revise..

    4-That I can confirm absolutely. Second partition has the corret information. In fact, I boot EVM through the NFS withoput problems and then, I can see this partition and all its folders (/dev/sda2) if it is mounted previously,

    I hope I have answered all your questions. Let me know if you need more information. I hope your suggestions or advises. Thanks in advance.

    Regards

    Óscar

  • Can you post a bootlog for USB boot? Is there any boot messages with USB or SCSI or sda in them? Possible that the USB drive is not ready. Try adding rootwait to the bootargs.

  • Norman,

    Thanks for the input.

     Óscar,

    Norman's suggestion may be your issue. I recreated your situation on my OMAP-L137 Spectrum Digital EVM and successfully booted into the Monta Vista login prompt. Below are the steps I took to recreate:

    1. I flashed the DSP and ARM UBLs as well as the uboot from DaVinci-PSP-SDK-03.20.00.14 to the board.
    2. I formatted a 2GB flash drive with a 32MB boot partition (fat16) and the remainder as file system (ext2).
      1. One thing to note here is that I used a Linux utility 'gparted' to do this partitioning. I can provide further details if necessary.
    3. I copied the kernel image (uImage) from the  ..DaVinci-PSP-SDK-03.20.00.14\images\kernel\omapl1x7 directory to the boot partition.
    4. I copied the Monta VIsta file system on the SD card to my Linux machine and then copied it to the file system partition of the flash drive.
      1. Note that I used the 'cp' command, as I was unfamiliar with the rsync command prior.
    5. I plugged the USB drive into USB0 and powered on the board
    6. I stopped the boot sequence in u-boot and changed the bootargs and bootcmd using the following commands:
      1. setenv bootargs ' mem=32M console=ttyS2,115200n8 noinitrd root=/dev/sda2 rootfstype=ext2 rootwait ip=none'
      2. setenv bootcmd 'usb start; fatload usb 0:1 0xC0700000 uImage; bootm c0700000'
      3. saveenv
    7. I then used the 'boot' command in u-boot, which loaded the kernel and file system and I reached the Monta Vista login prompt.

    I have the 'rootwait' bootarg, which may be your issue as Norman mentioned.

    I also wanted to address your question about where to find the file system outside of with SD card. In the Spectrum Digital OMAP-L137 kit, you should have also received a CD that contains the 'MV Pro 5.0 System Tools And MV Pro 5.0 Target File System'. It is bundled with another CD which contains the software development kit.

    Instructions on installing that software can be found at: http://processors.wiki.ti.com/index.php/Installing_the_Software_for_OMAP-L137

    The file system can be found in the following folder (once you run all of the setup):

    <install directory>/montavista/pro/devkit/arm/v5t_le/target

    Note that those instructions will also point you to a web page where you can download the same software that's on the CD, however you will need an activation ID, which is included on the front of the CD case.

    Thanks,

    Clinton

     

  • Hi guys! It is working!!

    Thanks for your quick answer!

    Just a little details:

    - Finally, I used the file-system installed on the SD Card. I had to make a complete copy of that by means the following command:

    sudo rsync -avx --progress /home/gtsc/BackupFileSystemSD/ /media/ROOTFS_USB/

    Clinton, I followed your tips installing the montavista file-system (on CD) and then I copied it using the "cp -Rf" command but it did not work. I received the next message at the minicom console: "Kernel panic - not syncing: No init found.  Try passing init= option to kernel. "

    I think that "complete and perfect" copy did not reach. I was looking for init executable inside the file-system and I did not found it. However, at the SD Card file-system, this file was inside /sbin folder. For this reason, I decided to test the first option that I wrote above. Thanks Clinton for your advises!

    - Rootwait command at uboot was the other key. Thanks Norman for your tip!

    Keep in touch! ;)

    Óscar

  • I've never had much success using "cp" for creating a rootfs. I think it does not copy the special device files properly. I usually use tar:

    su
    cd /tmp
    tar -cvpf rootfs.tar -C /media/SDCARD/ .
    tar -xvpf rootfs.tar -C /media/USB_PARTITION_FS/

    Note the "." at the end of the first tar line.

    Not familiar with the rsync command. Looks much easier than using tar and no intermediate file. I'll have to try using it next time.

  • Óscar,

    Glad you got it working. Thanks for following up with us. Also, thanks to you and Norman for the insight on 'copying' a rootfs.

    Thanks again,

    Clinton