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.

DM365 boot and flash program is ready for beta testing

The program boots and flashes UBL and u-boot on DM365 system. Boot data located on FAT file system.

Online manual: http://wiki.davincidsp.com/index.php/DM3xx_SD_card_boot_and_flashing_program

Downloads: http://www.linux-davinci.info/data/boot/

The program is still under construction. Now it restores UBL and u-boot only. Then restore u-boot configuration, kernel and root FS manually accordingly http://wiki.davincidsp.com/index.php/GSG:_DM365_DVEVM_Additional_Procedures#Restoring_the_NAND_Flash

Please leave you feedback and suggestions here.

  • Constantine,

    I am just getting started with this, but wanted to let you know that in Ubuntu (9.04) I had to change the shell scripts to start with #!/bin/bash rather than #!/bin/sh

    Stock Ubuntu has /bin/sh as a symlink to "dash", a light weight shell interpreter for performance reasons.

    https://wiki.ubuntu.com/DashAsBinSh

     

    Best Regards,

    Mark Deneen

  • I just wanted to report that I was successful in restoring uBoot to nand flash with Constantine's boot utility.  My DM365 is running the demo now, encoding and decoding.

     

    Best Regards,

    Mark Deneen

  • Thank you Mark, for dash and successful testing!

  • Hello Constantine,

     

    Is it possible for you to modify this for the DM365IPNC-MT5. My flash contents is gone, and i'm trying to reflash the ubl and U-BOOT using CCS but this program fails during flash erase.

     

  • geennaam said:

    Hello Constantine,

    Is it possible for you to modify this for the DM365IPNC-MT5. My flash contents is gone, and i'm trying to reflash the ubl and U-BOOT using CCS but this program fails during flash erase.

    Hi Greennaam,

    I have no DM365IPNC-MT5 for testing. Tell me please what happened when you try to recover your flash with this utility? What is outpurt?

  • I am trying to use your program.  I am using a 2Gig SD card and I get an error on the format on the very first step.  Am I doing something wrong?   See the log below.

     

    keith@KeithM1330:~/workdir/wti/sw1/dev1/uboot/dm3xx_sd_boot-5$ sudo ./dm3xx_sd_boot  format /dev/mmcblk0

    ./dm3xx_sd_boot: 150: [[: not found

    cleaning SD card

    1000+0 records in

    1000+0 records out

    1024000 bytes (1.0 MB) copied, 0.00392153 s, 261 MB/s

    BLKRRPART: Invalid argument

     

    Disk /dev/mmcblk0: 60032 cylinders, 4 heads, 16 sectors/track

     

    sfdisk: ERROR: sector 0 does not have an msdos signature

     /dev/mmcblk0: unrecognized partition table type

    Old situation:

    No partitions found

    trailing junk after number

     

    sfdisk: bad input

    -en 033[0;31m

    Failed to format SD card-en 033[0m

     

    ./dm3xx_sd_boot: 150: [[: not found

    ./dm3xx_sd_boot: 150: [[: not found

    1000+0 records in

    1000+0 records out

    1024000 bytes (1.0 MB) copied, 0.0717796 s, 14.3 MB/s

    dm3xx_boot_data_addr=0x

    Image dm3xx_boot_rec:please define dm3xx_boot_data_addr 

    -en 033[2;32m

    dm3xx boot record is written-en 033[0m

     

    Please reinsert the card for auto mounting

  • keith36119 said:

    I am trying to use your program.  I am using a 2Gig SD card and I get an error on the format on the very first step.  Am I doing something wrong?

    Hi Keith,

    Possible you are using Ubuntu and this note from this thread could help you:

    mdeneen said:

    ...... in Ubuntu (9.04) I had to change the shell scripts to start with #!/bin/bash rather than #!/bin/sh

    Stock Ubuntu has /bin/sh as a symlink to "dash", a light weight shell interpreter for performance reasons: https://wiki.ubuntu.com/DashAsBinSh

    Best Regards,

    Mark Deneen

    Try please to do the same.

  • I am using ubuntu 8.04.  So that is possible.

    I just restored my board with UBL and my new u-boot that I built.   have a black hawk 560 jtag and I followed the instructions in dvsdk_2_10_01_18/PSP_02_10_00_14/docs/DM365-installation.doc.  It took a while for me to get all the updates straight.  But after that it worked like a charm.

     

  • Using CSS and a  blackhawk ICE, I can see that the something is running running from DDR, but I get no serial output. This may be due to a different clock speed or different UART.

  • When I ran the u-boot from the blackhawk I got no serial output either.  Only after I restored UBL_DM36x_NAND.bin to flash did I start seeing the serial output again.  I posted what I did at the following link.   

    http://e2e.ti.com/forums/p/9972/39873.aspx#39873

     

  • Hello Keith,

    I don't have an EVMDM365 but an DM365IPNC (camera reference design based on the DM365).

    I did write a SDCARD(1GB) with the bin from Constantine, and slected SD bootmode for the DM365. Unfortunately, I don't get the serial output unlike an EVMDM365.

    IBut when I connect the USB560-M and halt the DM365, I can see that it's runningsome code from DDR. So internal bootrom did see a valid UBL.

    The flash writer which comes with the DM365IPNC doesn't work for some reason. It says it erases the flash but in fact it doesn't and the UPL write procedure hangs (because the flash is not erased.) 

    I hope that it's just a baudrate issue.

  • Hello Constantine,

     

    I used your mmcsd code and added SD card support in my u-boot, for my solution of booting the entire kernel of SD, and not using the flash at all. All seems to be working to a point.

    I load the uImage at address 0x80008000 and the ramdisk.gz at address 0x82000000.

    I also set a couple of environment variables in u-boot.

    The problem I have is that I get an error of "Wrong Ramdisk Image Format", and the last u-boot message is: "Starting kernel ..." but the kernel doesn't really start, I suspect it dies over on a panic, not finding the rootfs.

     

    Please help me. What all must I set in u-boot to make this work?

     

    Thank you

    Louis Putter

  • Louis Putter said:

    The problem I have is that I get an error of "Wrong Ramdisk Image Format", and the last u-boot message is: "Starting kernel ..." but the kernel doesn't really start, I suspect it dies over on a panic, not finding the rootfs.

    It seems there is problem during writing root FS to SD. I am working on it.

  • Hello Constantine (and all others that might be able to PLEASE help),

    I use your UBL to load uboot. I've taken the original uboot and added your SD driver code to be able to read from the SD card.

    I pack all the data in a raw format onto the SD card using dd.

    I do write the entire ramdisk.gz to 0x82000000, and I write the kernel (uImage) to 0x80008000 - all from within uboot. I've also added code to my uboot to re-read the data at that address, and compared it to a HEX reader's output of the actual ramdisk file, and all seems fine.

    I believe that I have two problems:

    1.)The format of the ramdisk file might not be correct. I'll try to re-create it. But I still expect to see a message after the "Starting kernel ..." message, even through the ramdisk was not initialised.

    2.)I think that I'm not setting the correct environment variables in my uboot code. I use setenv in my main function in my uboot code. What all variables must be set with setenv for a basic boot. Do the kernel read the environment variables set by setenv, or must I write the bootargs to a very specific address? I tried to set ip=off to prevent the kernel from waiting for a DHCP server - but no effect on my boot process.

     

    Do anybody know which source code file is the actual entry point of the kernel. I've compiled this kernel, and many others before, but has only changed configuration settings and driver code. I haven't looked at the actual execution of the core code. I would like to add a lot more logging to the kernel source to be able to trace it quickly.

    Once booted, I hope to be able to mount a USB mass-storage device via the USB port, and run mpeg4 videos from that storage - should it be very straight forward?

     

    Thank you

    Louis Putter

     

     

  • Tried the V6 on actual debian system.

    Changes needed:

    1) "export PATH=$PATH:./bin.x86"   to have the executable for x86 in the path

    2) Changed mkfs.vat - to mkfs in "dm3xx_sd_boot" script (mkfs was already available as comment)

    3) After the format run as "root"  - the dm3xx.dat couldn´t be accessed as user - so I had to

        chown "user" /media/disk/dm3xx.dat

     

    There was no error message during the process so it seems to work out.

    If I try to boot my "bricked" board, I see the following:

    On select  "UART-BOOT" - I can see 140kBaud on DM365 TX-Line with the scope - so I assume that the the serial interface, converter,

    processor is functioning.

    On select "SD-CARD-BOOT" I see a single high-to-low transition on the tx line - with inserted sd-card.

    Without sd-card and in every other boot mode - there is no TX activity.

    Does the UBL/U-boot rely on other NAND-FLASH content to work properly ?

    Are there UBL/U-boot images available to cope with that ?

    Or is CCS + JTAG the only way out ?

    There was no CCS eval with my board - is there an eval to download somewhere ?

    I have only XDS510 (ISA !!) - but I assume this should be accepted from CCS.

     

    rgds.

  • wolfgang gaerber said:
    1) "export PATH=$PATH:./bin.x86"   to have the executable for x86 in the path

    Right. It is a bug.

    wolfgang gaerber said:
    Changed mkfs.vat - to mkfs in "dm3xx_sd_boot" script (mkfs was already available as comment)

    mkfs by default formats ext2/3. mkfs.vat formats FAT for better compatibility.

    wolfgang gaerber said:
    After the format run as "root"  - the dm3xx.dat couldn´t be accessed as user - so I had to chown "user" /media/disk/dm3xx.dat

    it because you used ext2, which preserves root ownership

    wolfgang gaerber said:
    Does the UBL/U-boot rely on other NAND-FLASH content to work properly ?

    Default u-boot expect connected NAND, even empty.

    Answers on another questions you my find in DaVinci wiki.

    Thank you!

  • Thank you Constantine. It works fine..I saved my EVM board...[:D]

  • i have downloaded the tarball, but cannot find the file bellow (see ubl.c).

    #ifdef UBL_SD_MMC

    // NAND driver include

    #include "sd_mmc.h"

    #include "sd_mmcboot.h"

    #endif

    how can i add a configure for SD boot in mmc ???

     

    regards, Mike