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.

Problem Loading root file system image using U-Boot and TFTP

Hello,

 

I am successfully booting our DaVinci DM6474 (EVM6467) using a TFTP kernel and an NFS file system.  However, we wish to load the file system into NAND so that only the kernel is loaded over a network.  The final boot process should be as follows:

 

1 - U-boot brings TFTPs the Linux kernel

2 - The file system is mounted from NAND memory.

 

Our only hang up is loading the file system into NAND.  I have followed the instructions listed here :

http://processors.wiki.ti.com/index.php/DM6467_EVM_Installation#Writing_Kernel_and_Filesystem_Image_to_NAND_Flash

And I have used several different file system images.  However, they all hang part way through the loading process (or so it seems).   Here is the output of the U-Boot console:

 

======================================================================================

 

Booting PSP Boot Loader                                                        
                                                                               
Starting NAND Copy                                                             
                                                                               
Booting Application @ 0x81080000                                               
                                                                               
                                                                               
U-Boot 2009.08 (Feb 21 2011 - 13:25:36)                                        
                                                                               
I2C:   ready                                                                   
DRAM:  256 MB                                                                  
NAND:  128 MiB                                                                 
In:    serial                                                                  
Out:   serial                                                                  
Err:   serial                                                                  
ARM Clock :- 495MHz                                                            
DDR Clock :- 396MHz                                                            
Net:   Ethernet PHY: GENERIC @ 0x01                                            
DaVinci EMAC                                                                   
Hit any key to stop autoboot:  0                                               
DM6467 EVM > set bootfile rootfs.ext2.gz                                       
DM6467 EVM > dhcp                                                              
BOOTP broadcast 1                                                              
DHCP client bound to address [removed]                                      
Using DaVinci EMAC device                                                      
TFTP from server [removed]; our IP address is [removed]                  
Filename 'rootfs.ext2.gz'.                                                     
Load address: 0x80700000                                                       
Loading: #################################################################     
         #################################################################     
         #################################################################     
         #################################################################     
         #################################################################     
         #################################################################     
         #################################################################     
         #################################################################     
         #################################################################     
         #################################################################     
         ################

 

======================================================================================

At this point U-Boot appears to freeze, I've let it run for about 15 minutes, just to see if something would happen.  Nothing does.  The file system image is ~12MiB.  Again, our board is the EVM6467: http://www.spectrumdigital.com/product_info.php?cPath=37_105&products_id=231&osCsid=f5aae22e8530c0f91b02b4acc282ff5d

 

Thanks a lot!

  • I forgot to mention, if I unzip the file archive, and have the DaVinci download "rootfs.ext2", the loading screen gets to the same point and then reboots immediately.

  • Did you try writing rootfs to Nand when the rootfs is NFS? Here is the steps.

    1. bootup evm using NFS

    2. flash_eraseall  /dev/mtd4 (this may change. see cat /proc/mtd to find out which partition)

    3. mount /dev/mtdblock4 /mnt/nand -t jffs2

    4. cd /mnt/nand; and untar the rootfs tar ball here.

    5. umount  /mtd/nand

    6. reboot evm and change bootargs to root=/dev/mtdblock4 rootfstype=jffs2

     

    Regards,

    Yan

  • This bootfile should be the uImage.bin of your kernel, not the file system image.

  • Yan,

     

    thanks for the reply.  This seems to be exactly what I need to do.  However, the output of: cat /proc/mtd is blank:

    dev:    size   erasesize  name

     

     

    Any idea why this might be the case?  Here is the /dev list:

     

    DavinciHD_vdce      tty14               tty5
    block               tty15               tty50
    char                tty16               tty51
    console             tty17               tty52
    cpu_dma_latency     tty18               tty53
    full                tty19               tty54
    i2c-1               tty2                tty55
    initctl             tty20               tty56
    input               tty21               tty57
    kmem                tty22               tty58
    kmsg                tty23               tty59
    log                 tty24               tty6
    loop0               tty25               tty60
    loop1               tty26               tty61
    loop2               tty27               tty62
    loop3               tty28               tty63
    loop4               tty29               tty7
    loop5               tty3                tty8
    loop6               tty30               tty9
    loop7               tty31               ttyS0
    mem                 tty32               ttyS1
    net                 tty33               ttyS2
    network_latency     tty34               udev_network_queue
    network_throughput  tty35               urandom
    null                tty36               usbmon0
    port                tty37               v4l
    ppp                 tty38               vcs
    pts                 tty39               vcs1
    ram0                tty4                vcsa
    random              tty40               vcsa1
    shm                 tty41               vga_arbiter
    snd                 tty42               video0
    tty                 tty43               video1
    tty0                tty44               video2
    tty1                tty45               video3
    tty10               tty46               watchdog
    tty11               tty47               zero
    tty12               tty48
    tty13               tty49

     

    Thanks!

  • Are you sure Nand is built in your kernel? If it built in, you should see the Nand partition information in the booting log.

     

    Regards,

    Yan

  • Hi Yan,

    Specifically what should be enabled?  I have MTD support built-in, if that is what you mean.

    Thanks,

    RR

  • Could you double check if "Nand device support" is also enabled? If you look at .config, at least CONFIG_MTD_NAND_DAVINCI is set to y. Do you see partition info in your booting log when you boot using NFS?

     

    Regards,

    Yan

  • Hi Yan,

     

    yaliu_2000 said:
    Could you double check if "Nand device support" is also enabled? If you look at .config, at least CONFIG_MTD_NAND_DAVINCI is set to y.

    Yes, my .config file shows exactly that.

     

    yaliu_2000 said:
    Do you see partition info in your booting log when you boot using NFS?

    Thanks for the tip!  I think I may have found the issue with the NAND not being recognized.  I found this in the booting log:

    WARNING: both PCI and NAND are enabled, but they share AEMIF pins.
            Disable PCI for NAND support.

    I'll see about disabling PCI and try your earlier suggestion.

    Thanks!

  • Mitch Rybczynski said:

    This bootfile should be the uImage.bin of your kernel, not the file system image.

    This looks like the correct answer, yet it's being ignored.

    John A

  • When you tftp ANY file, you have to set the "bootfile" environment variable to that filename.  You just have to make sure to change it back to your kernel image before you boot if you're booting from tftp.

  • Ok,  well I guess you could use the "dhcp" command with additional parameters to accomplish the same thing, but I wanted to follow the instructions on the TI document as closely as I could.

  • Thanks for the help Yan!  I was able to get the file system onto NAND using your instructions.