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 with a RAMDISK File System

I am trying to boot up with a RAMDISK file system. I get a kernel panic at boot.  I'm not sure if the boot args are wrong or the filesystem image is wrong.  I'm working with a DaVinci board.  I can get the image into RAM just fine.  In the past, I was successful in booting from the NAND.  I would have thought the two procedures, RAMDISK vs NAND,  were similar.  I tried to use the ARAGO sample file system but it crashed at boot complaining about libs not being present.  I tried using the file system which came with the EZSDK as the base of my RAMDISK file system.  The resulting image was very large even after a gzip (80+M).    Where can I find a per-built RAMDISK?  This would test if my boot args or memory location assignment was wrong.  I'm using the kernel image which came with EZSDK.  Was it configured to handle RAMDISK file systems?

  • Can you please provide the full console log of your attempts?  There's a number of possible explanations and this information would help.  Thanks.

  • Here is the log:

    RAMDISK: gzip image found at block 0                                           
    RAMDISK: incomplete write (10938 != 32768)                                     
    write error                                                                    
    VFS: Mounted root (ext2 filesystem) on device 1:0.                             
    attempt to access beyond end of device                                         
    ram0: rw=0, want=131080, limit=65536                                           
    EXT2-fs (ram0): error: ext2_get_inode: unable to read inode block - inode=16129,
     block=65539                                                                   
    devtmpfs: error mounting -5                                                    
    Freeing init memory: 188K                                                      
    attempt to access beyond end of device                                         
    ram0: rw=0, want=410124, limit=65536                                           
    EXT2-fs (ram0): error: ext2_get_inode: unable to read inode block - inode=50401,
     block=205061                                                                  
    attempt to access beyond end of device                                         
    ram0: rw=0, want=245768, limit=65536                                           
    EXT2-fs (ram0): error: ext2_get_inode: unable to read inode block - inode=30241,
     block=122883                                                                  
    attempt to access beyond end of device                                         
    ram0: rw=0, want=360456, limit=65536                                           
    EXT2-fs (ram0): error: ext2_get_inode: unable to read inode block - inode=44353,
     block=180227                                                                  
    attempt to access beyond end of device                                         
    ram0: rw=0, want=360456, limit=65536                                           
    EXT2-fs (ram0): error: ext2_get_inode: unable to read inode block - inode=44353,
     block=180227                                                                  
    Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
    See Linux Documentation/init.txt for guidance.                                 
    Backtrace:                                                                     
    [<c0045b44>] (dump_backtrace+0x0/0x110) from [<c0378128>] (dump_stack+0x18/0x1c)
     r7:00000013 r6:c0068504 r5:c0008670 r4:c04e9b10                               
    [<c0378110>] (dump_stack+0x0/0x1c) from [<c037818c>] (panic+0x60/0x17c)        
    [<c037812c>] (panic+0x0/0x17c) from [<c0037574>] (init_post+0xa4/0xc4)         
     r3:c1b7ef00 r2:00000000 r1:c0557fc0 r0:c042e76d                               
    [<c00374d0>] (init_post+0x0/0xc4) from [<c0008788>] (kernel_init+0x118/0x154)  
     r5:c0008670 r4:c04e9400                                                       
    [<c0008670>] (kernel_init+0x0/0x154) from [<c0068504>] (do_exit+0x0/0x5e4)     
     r5:c0008670 r4:00000000

     

    Here is the minicom setup script:

    send "setenv bootargs console=ttyO0,115200n8 mem=256M earlyprintk \c"
    send "root=/dev/ram0 rw \c"
    send "initrd=0x82000000,85MB \c"       

    I've tried to increase the ram disk size through the boot arg but I get the same result.  The 80+M file system is still rather large.  It is still a lot smaller than the base file system which came with EZSDK.  I have already proven the file system works by mounting it via NFS.

     

    Thanks.

     

  • At the second stage u-boot, I did a iminfo on my system image and kernel image in RAM.  The kernel image gave me a valid report: Arago....  The system file image gave me: Unknown image format.  I did a loop device to create the file system image.  Do I need to add a header to it?

  • Well, did you follow all of the steps on http://processors.wiki.ti.com/index.php/Initrd ?

  • Yes, I used that doc to make my file system image.  I didn't do a kernel rebuild because I thought support was already in the pre-built kernel image which came with EZSDK.  I took a quick look at the .config and it looks like COUNT is set to sixteen and size is only set to 32 Megs.  I'll modify to 1 and 85 and see if it works.