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.

Init YAFFS

Could some one please give me some pointers in setting up the flash on a new board.

We have our new hardware booting from flash, but I get a kernel panic in the boot process:

VFS: Mounted root (yaffs2 filesystem).
Freeing init memory: 180K
Warning: Cannot create /dev/console: -2Warning: unable to open an initial console.
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

my boot args are as follows:

bootargs=mem=116M console=ttyS0,115200n8 noinitrd rw root=/dev/mtdblock3 rootfstype=yaffs2 ip=off  video=davincifb:vid0=720x576x16,2500K:vid1=720x576x16,2500K:osd0=720x576x16,2025K davinci_enc_mngr.ch0_output=COMPOSITE davinci_enc_mngr.ch0_mode=pal

I am assuming that the panic is because I don't have a file system initialised on the flash as it's a new board.

Now I have seen a few posts explaining how to do this using nfs, but our hardware does not have a network interface.

I used serial to download the kernel, not sure how to do this for the file system.

There are references to using the mtd interface, but you need linux up and running to do this, am I missing something?

TIA

Brendan

  • mmm, this is an interesting issue to solve.

    If you do not have a network interface but still have USB or SD card, you can format any of these two in an external Host and put a Linux File System there initially.  Once you boot using that file system, you can write your desired file-system to your flash device.

    Optionally, you can write an app to do this via serial utility.  This is probrably a bit more challenging so one of the options above would probrably be easier.

  • Hi Juan

    I figured that the SD card would be the way to go (I got there eventually),  but I do have to get the darn thing to boot  to start with.  Note the kernel panic in my post.

    The kernel seems to need a file system to start, so I assume at this point i need a ram based file sys.

    Any ideas how I do this?

  • Actually, what I had in mind was preparing the SD Card, and writting the Linux file system into the SD Card with a Linux or Windows based host PC. 

    The following wiki article describes how to prepare the SD Card for OMAP35x, but the process for the DM355 should be similar: http://tiexpressdsp.com/index.php?title=MMC_Boot_Format

    Once the SD Card is prepared, you can use the same host system to write the target Linux File System onto the SD card (you do not have to do this within the target).  This will allow you to at least get a file system loaded from which you can do other things (e.g. write file system onto flash)

  • OK, so I can put the initial file system onto the SD card.

    I assume that when the board boots, if the card is in the slot, the kernel will start the driver and mount this file system, yes?

    Do I need any special boot args in u-boot?

    I am guessing that

    bootargs=mem=116M console=ttyS0,115200n8 noinitrd rw root=/dev/mtdblock3 rootfstype=yaffs2 ip=off 

    is not applicable at this point, but the kernel must require a hint that the SD card is the place to look for a file system.

     

  • yes, ou will need to modify you bootargs to tell the system where your file system is; what you have above appears right to me.