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.

DM6467/T demo ramdisk upload problem using TFTP

Hi Guys,

 

I'm trying to upload the demo randisk which is 12.6MB.

(http://arago-project.org/files/releases/davinci-psp_3.x.0.0-r37/images/dm6467t-evm/arago-demo-image-dm6467t-evm.ext2.gz)

 

When I start the transfer in the uboot enviroment using the 'tftp' command, the file starts loading after its quite a way through it hangs and I have to restart the board to get any response from it.

Transfering a file <9MB is file, is there a setting in uboot I need to change of is there something else that needs setting?

Thanks

 

  • Hi James,

    It took me a while to figure out these limitations too.  Here is what i know.

    Uboot will only take a jffs2 file type, which is available at the same link you provided.  Also, if the file is too big it will over write uboot depending on where in RAM you are trying to tftp to.   I think the recommended location is 80700000 try just 80000000

    if you want to do a .ext2.gz you need to do it from linux and then reboot the system to test it.  The steps can be found in the middle of this post:

    http://e2e.ti.com/support/embedded/f/354/p/96436/337782.aspx#337782

    Good luck!

  • Actually, I wrote my own version of the steps for the jffs2.  Maybe this will be helpful.

     

    Flashing a kernel and filesystem from U-boot

     

    To flash the kernel and filesystem into NAND, this is link is found to be rather reliable with the exception of the bootargs.  This was wrong.

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

     

    From U-boot is very easy to flash the file system, however it is limited to a jffs2 file system and extension.  For most projects, we are not using many specialized linux libraries so the jffs2 found here is probably sufficient.

    http://arago-project.org/files/releases/davinci-psp_3.x.0.0-r35/images/dm6467t-evm/

     

    Save the kernel image and the jffs2 image to your tftp transfer folder (probably tftpboot).

     

    In U-Boot, to get a file into Ram you need to change the variable bootfile and serverip.

    DM6467 EVM > setenv bootfile uImage

    DM6467 EVM > setenv serverip <ip removed>

     

    Then start the tftp with either tftpcmd or dhcp command.  (tftp assumes you set the variable ipaddr to the host IP address.)

    DM6467 EVM > tftp                                                                                                                                                                                                                          

    Using DaVinci EMAC device                                                                                                                                                                                                                  

    TFTP from server <ip removed>; our IP address is <ip removed>                                                                                                                                                                               

    Filename 'uImage'.                                                                                                                                                                                                                          

    Load address: 0x80700000                                                                                                                                                                                                                    

    Loading: #################################################################                                                                                                                                                                  

             #################################################################                                                                                                                                                                  

             ###################                                                                                                                                                                                                                

    done                                                                                                                                                                                                                                        

    Bytes transferred = 2180400 (214530 hex)  

     

    Now notice where the load address defaults: 0x80700000.  This is ok for most file sizes.  However, UBL loads the U-Boot application into address 0x81080000 (as set by the steps above) so if your tftping a large file (such as your file system) it might over write Uboot and cause the process to freeze.

     

    To finish the writing of the kernel to nand you’ve got to do some math.  First TI recommends round the size written up to nearest 2kB.  For this example, that means the size will round to 0x214800

     

    Then execute the erase command:

                    nand erase <offset in NAND> <size in bytes>

    DM6467 EVM > nand erase 160000 214800

     

    Then the write command:

                    nand write <where in RAM> <offset in NAND> <size in bytes>

    DM6467 EVM > nand write 80700000 160000 214800

     

    And now your kernel is nand.

     

    Next for the file system, do the same thing.  In our example, we need to tftp the file to the beginning of RAM because it is too large for the default value (as hinted at above.)

    DM6467 EVM > setenv bootfile "fileimage.jffs2"                                                                                                                                                                                              

    DM6467 EVM > tftp 80000000                                                                                                                                                                                                                  

    Using DaVinci EMAC device                                                                                                                                                                                                                   

    TFTP from server <ip removed>; our IP address is <ip removed>                                                                                                                                                                               

    Filename 'fileimage.jffs2'.                                                                                                                                                                                                                

    Load address: 0x80000000                                                                                                                                                                                                                    

    Loading: #################################################################                                                                                                                                                                 

             #################################################################                                                                                                                                                                 

             #################################################################                                                                                                                                                                  

             #################################################################                                                                                                                                                                  

             #################################################################                                                                                                                                                                  

             #################################################################                                                                                                                                                                  

             #################################################################                                                                                                                                                                  

             #################################################################                                                                                                                                                                  

             #################################################################                                                                                                                                                                  

             #################################################################                                                                                                                                                                  

             #################################################################                                                                                                                                                                 

             #################################################################                                                                                                                                                                 

             #################################################################                                                                                                                                                                 

             #################################################################                                                                                                                                                                 

             #################################################################                                                                                                                                                                 

             #################################################################                                                                                                                                                                  

             #################################################################                                                                                                                                                                  

             ###                                                                                                                                                                                                                                

    done                                                                                                                                                                                                                                        

    Bytes transferred = 16252928 (f80000 hex)

     

    Calculate the rounded size (no change in this case).  Erase the NAND and write it.

    DM6467 EVM > nand erase 560000 f80000

    DM6467 EVM > nand write 80000000 560000 f80000

     

    Next you will need to change your bootargs and bootcmd to use the kernel and filesystem.  Another neat trick is to mount the nand filesystem to the MTDblock.  With this, the mtd driver will automatically update NAND when the file system changes.

    (MTD info: http://www.righthandtech.com/embedded-linux-managing-memory.php)

    bootcmd=nand read 81100000 560000 f80000;nboot 80700000 0 160000;bootm                                                                                                                                                                     

    bootargs=mem=76M console=ttyS0,115200n8 root=/dev/mtdblock3 rw rootfstype=jffs2 initrd 0x81100000,16M ip=<ips removed>::eth0:off pif_display.ch2_numbuffers=0 vpif_display.ch3_numbuffers=0            

    s

    This boot command will boot both kernel and the file system from NAND.  To change bring the kernel from tftp, change the boot command”

    bootcmd=nand read 81100000 560000 f80000;tftp;bootm                                                                                                                                                                      

     

    To change the file system to NFS, change both:

    bootcmd=nboot 80700000 0 160000;bootm                                                                                                                                                                      

    bootargs mem=76M console=ttyS0,115200n8 root=/dev/nfs nfsroot=<ipRemoved>:/shares/davinci,nolock rw noinitrd ip=<ips removed>::eth0:off pif_display.ch2_numbuffers=0 vpif_display.ch3_numbuffers=0