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.

IPNC 3.0: Updating UBL, U-Boot and Diagnostic file using SDCARD

Hello,

I am trying to load uboot, ubl, uImage, squashfs using SD card.

Its explained very clearly in document USER_Guide_IPNC_DM36x under section  2.2.2

and also on

http://wiki.davincidsp.com/index.php/SD_card_boot_and_flashing_tool_for_DM355_and_DM365

I did following steps

1) Extract file dm3xx_sd_boot-6.1.zip located at Utils\src folder
2) Copy all the files reuiqred for burning like filesystem, uimage, uboot, ubl and diagnostic file to original folder
3) Edit dm3xx_sd.config and Makefile to choose the platform (DM36X or DM35X) and the modelname (DM365_IPNC or DM368_IPNC). Also set the mount path correctly as data_file=`<PATH where SD Card is mounted>/dm3xx.dat`
4) Now, Prepare the SD card, Insert a SD card ( SDHC is not supported) to a Linux PC
5) Find out the device name of this SD card by looking at /dev/sd*
6) Navigate to folder where dm3xx_sd_boot-6.1 is installed.
7) Run this command export PATH=$PATH:./bin.x86
8) User need run make command

Here make was successful

after that

9) Run command
sudo ./dm3xx_sd_boot format /dev/sdb (sdb is device name for SD card I used)

But in this step I am getting error

sudo: ./dm3xx_sd_boot: command not found

Kindly suggest solution for this issue

  • Hello,

    Can you please check the pin connection on debug board are fine as given in userguide for SDCARD boot?

    Also, can you check if dm3xx_sd_boot is present?

    Regards,

    Raghu

  • Hello,

    I have not reached to that step in which I can put SD card in DM365 Board and check the debug board connections.

    I am trying to prepare SD card on my host PC which I can put in my DM365 Board.

    And yes, dm3xx_sd_boot is present in my working folder

    Thanks and Regards,

    Mahesh

  • Hello,

    I have not reached to that step in which I can put SD card in DM365 Board and check the debug board connections.

    I am trying to prepare SD card on my host PC which I can put in my DM365 Board.

    And yes, dm3xx_sd_boot is present in my working folder

    Thanks and Regards,

    Mahesh

  • Mahesh,

    Please check the permissions of dm3xx_sd_boot and see whether its having executable permissions.


  • Yes, changing permission worked for me..

    but now its giving following error for "sudo ./dm3xx_sd_boot format /dev/sdb" command

    cleaning SD card
    1000+0 records in
    1000+0 records out
    1024000 bytes (1.0 MB) copied, 0.605748 s, 1.7 MB/s

    Disk /dev/sdb: 1017 cylinders, 62 heads, 62 sectors/track

    sfdisk: ERROR: sector 0 does not have an msdos signature
     /dev/sdb: unrecognized partition table type
    Old situation:
    No partitions found
    New situation:
    Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

       Device Boot Start   End    MiB    #blocks   Id  System
    /dev/sdb1   *     0+    41-    42-     42283+   b  W95 FAT32
    /dev/sdb2   *    41+  1908-  1868-   1912390   83  Linux
    /dev/sdb3         0      -      0          0    0  Empty
    /dev/sdb4         0      -      0          0    0  Empty
    Successfully wrote the new partition table

    Re-reading the partition table ...

    mkfs.vfat 3.0.7 (24 Dec 2009)
    Seek to 7018072064:Invalid argument
    0+0 records in
    0+0 records out
    0 bytes (0 B) copied, 2.9277e-05 s, 0.0 kB/s
    0+1 records in
    0+1 records out
    18 bytes (18 B) copied, 5.1719e-05 s, 348 kB/s
    total 15000
    -rwxr-xr-x 1 root root 15360000 2012-06-14 17:41 dm3xx.dat
    SD card /dev/sdb formatted
    10000+0 records in
    10000+0 records out
    10240000 bytes (10 MB) copied, 0.655897 s, 15.6 MB/s
    dm3xx_boot_data_addr=0x0a7000
    ./dm3xx_sd_boot: 165: dm3xx_boot_make_image: Permission denied
    Failed to copy boot record to SD card
    Please reinsert the card for auto mounting or mount it manually

    Please suggest solution

    Thanks n Regards

    Mahesh

  • I resolved the above mentioned issue by changing permission of "dm3xx_boot_make_image" file in bin.x86 folder.

    So as per procedure mentioned in user guide

    9) Run command
    sudo ./dm3xx_sd_boot format /dev/sdX (replace sdX with the SD device name)


    10) Remove the SD card, and plug it back in. Check if the Card is automatically
    mounted by using mount command.


    11) If not mounted the mount it to preferred location. eg : sudo mount /dev/sdX
    /media/disk(Folder to mount).


    12) Since Mounting of SD Card uses sudo user will have to use sudo for
    copying data into SD Card.
    sudo ./dm3xx_sd_boot data /media/disk(Folder where card is mounted).

    for the last step i used following command

    sudo ./dm3xx_sd_boot data /media/B926-18E4(folder in which my SD card id mounted)

    n It returned this error

    copying data to
    Writing /media/B926-18E4
    openning data file: Is a directory
    failed to build data image

    Please suggest solution

    Thanks n Regards

    Mahesh

  • Resolved the above issue as well. One need to specify the that file name as well.

    sudo ./dm3xx_sd_boot data /media/B926-18E4/dm3xx.dat

    but now I am getting this

    DM36x initialization passed!
    TI UBL Base Version: 1.50
    Boot Loader BootMode = NAND
    Starting NAND Copy...
    Valid magicnum, 0xA1ACED66, found in block 0x00000008.
    Boot Mode Task Completed

    IPNC UBL Version: 2.0.0
    Platform: DM365

    Jumping to entry point at 0x81080000

    U-Boot 1.3.4 (Feb 28 2012 - 15:01:39) DM365-IPNC-2.0.0

    I2C:   ready
    DRAM:  128 MB
    NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
    Bad block table found at page 65504, version 0x00
    Bad block table found at page 65472, version 0x00
    32 MiB
    *** Warning - bad CRC or NAND, using default environment

    In:    serial
    Out:   serial
    Err:   serial
    ARM Clock :- 297MHz
    DDR Clock :- 270MHz
    Ethernet PHY: GENERIC @ 0x01
    Hit any key to stop autoboot:  0
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!
    DM365 IPNC :>

    I am using IPNC 3.0 version bin files.

    Please suggest how to resolve this issue .

    Regard,

    Mahesh

  • Can you please "setenv verify no"

    This will remove this verification, we had removed this to save boot-time

    Regards,

    Raghu

  • Mahesh,

    Print the enviornment variables and see whether you are loading the kernel to DDR?

  • These are my env variables

    bootdelay=4
    baudrate=115200
    bootfile="uImage"
    setboot=setenv bootargs $(bootargs) video=dm36x:output=$(videostd)
    bootcmd=nboot 0x80700000 0 0x200000;bootm 0x80700000
    bootargs=mem=48M console=ttyS0,115200n8 root=/dev/mtdblock3 rootfstype=squashfs ip=off eth=00:0C:13:A5:DE:D1 lpj=741376 cmemk.phys_start="0x83000000" cmemk."
    verify=no
    stdin=serial
    stdout=serial
    stderr=serial
    ver=U-Boot 1.3.4 (Feb 28 2012 - 15:01:39) DM365-IPNC-2.0.0

    I used tftp download method to transfer image and file system to the board.

    Used same env variables in that case and worked fine. 

  • "setenv verify no" dint change anything for me.

  • Hi,

    Your botargs is totally wrong, can you please refer to userguide and program the correct ENV variable

    Regards,

    Raghu

  • These are my environment variables

    baudrate=115200
    bootfile="uImage"
    nfshost=192.168.120.216
    bootcmd=nboot 0x80700000 0 0x200000;bootm 0x80700000
    rootpath=/home/pandurang/IP_CAMERA/IPNetCam_3_0/ipnc_rdk/target/filesys
    ipaddr 192.168.121.168
    filesize=D45000
    fileaddr=82000000
    ipaddr=192.168.121.168
    serverip=192.168.121.211
    verify=no
    ethaddr=00:0C:13:A5:DE:D3
    bootargs=mem=48M console=ttyS0,115200n8 root=/dev/mtdblock3 rootfstype=squashfs
    ip=off eth=00:0C:13:A5:DE:D3 lpj=741376 cmemk.phys_start="0x83000000" cmemk.phys
    _end="0x88000000" cmemk.phys_start_1="0x00001000" cmemk.phys_end_1="0x00008000"
    cmemk.pools_1="1x28672" cmemk.allowOverlap="1"
    stdin=serial
    stdout=serial
    stderr=serial
    ver=U-Boot 1.3.4 (Feb 28 2012 - 15:01:39) DM365-IPNC-2.0.0

    bootargs were not copied properly so clipped bootargs were pasted in previous post.

    I also checked in user guide.  bootargs mentioned there are,

    setenv bootcmd 'nboot 0x80700000 0 0x200000;bootm 0x80700000'
    setenv bootargs 'mem=48M console=ttyS0,115200n8 root=/dev/mtdblock3 rootfstype=squashfs ip=dhcp eth=$(ethaddr) lpj=741376
    cmemk.phys_start="0x83000000" cmemk.phys_end="0x88000000" cmemk.phys_start_1="0x00001000" cmemk.phys_end_1="0x00008000" cmemk.pools_1="1x28672"
    cmemk.allowOverlap="1" quiet'

    only differences between and this my bootargs are,

    1. I am not using dhcp. so ip=off

    2 "quite" at the end of bootargs

    I dont think these changed will affect my SD card boot method.

    But I am still not able to use SD card as boot media.

  • "Resolved the above issue as well. One need to specify the that file name as well.

    sudo ./dm3xx_sd_boot data /media/B926-18E4/dm3xx.dat"

    Hi, how did you solve this line. I mean until before this, I was getting same errors as u were..after adding dm3xx.dat, too i continue to get the error:-

    copying data to
    Writing /media/sdcard2/dm3xx.dat
    openning data file: No such file or directory
    failed to build data image

    I dint get how it solved the case for you. Can you please advise?