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.

Automatically load program on DM355 EVM

Hello,

I am just putting final touches on a program thats written for the dm355 evm board. It is basically a modified version of the encodedecode demo that comes with the board. So far I am running my code through an NFS as mentioned under 4.6 in the getting started manual. What I would like to do is run this code automatically on the board, i.e. without a network connection.

So how do I load this program onto the board and autostart the program when the board is started.

On a side note, if the above is done is it possible to somehow take images saved onto the board?

Thanks

  • Hi,

    Have you gone through the Getting Started Guide with DM355 DVSDK? It talks about booting DM355 kernel from NAND instead of TFTP and running the file system from NAND.

    There are few options possible and you can get the details either browsing through the forum or reading through on the web too:

    1. Store uImage on the NAND and use NAND boot mode in your bootcmd. This way network is not needed for loading the kernel to your DM355 hardware from PC.

    2. Use NAND file system like YAFFS2 and store it on NAND. The boot args would change such that root filesystem becomes /dev/mtdX instead of current /dev/nfs

    3. Use RAMDisk as root file system. In this case your filesystem has to be created as RAMDIsk and stored on NAND. Next time you boot up, the boot cmd will tell that copy ramdisk from NAND to DDR and boot args will have root = /dev/ram0

    4. Use SD card as your root file system. We have not put details for it in getting started guide but i assume customers have used it.

    Regards,

    Anshuman

  • Hello,

    I have read the Getting Started Guide, but maybe didn't understand fully. How would I go about storing the uImage onto the NAND? I do not understand if TFTP transfers the image onto NAND, or temporary loads it everytime, i.e. would I use TFTP to transfer the uImage onto NAND, and then use the default boot args? Is there a way to retrieve information through ethernet/serial when booting in this method?

    I am reading into loading from an SD card, I guess it is the best solution for me.

    Thanks :)

  • Hi,

    S. Abb said:
    I do not understand if TFTP transfers the image onto NAND, or temporary loads it everytime, i.e. would I use TFTP to transfer the uImage onto NAND, and then use the default boot args?

    The TFTP boot or any other boot for that matter brings the uImage on the SDRAM. It does not write to NAND directly. If you have looked at Getting Started Guide, it talkes about commands like "nand read" and "nand write". Please use these commands to write to the NAND and then change the bootargs according to the Getting Started Guide to boot from nand.

    Regards,

    Anshuman

  • Hi,

    Thanks for your help. I am starting to understand this a bit more.

    I understand loading the new kernel through TFTP and nand writing etc, as mentioned in the Getting Started Guide, but I did not modify the kernel and see no reason to change.

    What I would like to do is mount my encodedecode demo onto the board, and from further reading, what I understand is I need to do steps 2, 3 or 4 as mentioned in your original post. My question is how would I create a yaffs2 root image that I can mount over /dev/mtdblock3, also is there a way to create a different block instead of overwriting over mtdblock3? Finally how do I know the address location to nand erase and then nand write the created image onto the NAND flash.

    Sorry for the basic questions, but I have very little knowledge of NAND flash and loading files.

    Thanks again

  • Hello,

    There are some relevant commands mentioned in the commands.txt file included in the docs folder of LSP 2.00 which should help here. Basically, Linux using NFS and then from the Linux command prompt:

    flash_eraseall /dev/mtd3
    mkdir /mnt/nand
    mount -t yaffs2 /dev/mtdblock3 /mnt/nand
    cd /mnt/nand
    tar -xf <flash-filesystem.tar>

    Then unmount the partition and reboot the board. Stop at U-Boot prompt. For booting from YAFFS2 FS set the U-Boot bootargs variable as:

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

    Boot the board again, it should boot from YAFFS2 partition created above.

    Thanks,

    Sekhar

  • Hello again,

    I have edited the dm355_flash_image_#_#_#_#.tar by adding some files to it, and followed the manual and what you have mentioned for placing the new file system, but upon restarting the board gets stuck at the following message

    cmem initialized 8 pools between 0x87400000 and 0x88000000

    and nothing after that happens. Any ideas?

     

     

     

     

  • Try to fill yaffs with original file system. Then do you changes carefully one by one on yaffs file system.
    If you add "set -x" to script loadmodules.sh you could see trace of executed commands.