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.

[dfu] Device Firmware Upgrade issue

Other Parts Discussed in Thread: PMP

Hi ,

I want process DFU for u-boot  and follow  below link.

http://processors.wiki.ti.com/index.php/DRA7xx_GLSDK_Software_Developers_Guide#DFU_Usage_from_u-boot

After " setenv dfu_alt_info ${dfu_alt_info_emmc}"    and   "dfu 0 mmc 1"   commands,  u-boot can not pop  "set_config: high speed config #1: usb_dnload" string. And hence "dfu-util -l" can not find any device to flash image.


Please help on this , thanks.

Best,
Andy

Below is my uboot environment variable.

print
arch=arm
baudrate=115200
board=dra7xx
board_name=dra7xx
bootcmd=switch_dtb;run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; setenv mmcroot /dev/mmcblk0p2 rw; run mmcboot;
bootdelay=1
bootdir=/boot
bootenv=uEnv.txt
bootfile=zImage
bootm_size=0x10000000
bootpart=0:2
bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
console=ttyO2,115200n8
cpu=armv7
dfu_alt_info=rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 1 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x200 0x400;spl-os-args.raw raw 0x80 0x80;spl-os-image.raw raw 0x900 0x2000;spl-os-args fat 1 1;spl-os-image fat 1 1;u-boot.img fat 1 1;uEnv.txt fat 1 1
dfu_alt_info_emmc=rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 1 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x200 0x400;spl-os-args.raw raw 0x80 0x80;spl-os-image.raw raw 0x900 0x2000;spl-os-args fat 1 1;spl-os-image fat 1 1;u-boot.img fat 1 1;uEnv.txt fat 1 1
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x200 0x400;spl-os-args.raw raw 0x80 0x80;spl-os-image.raw raw 0x900 0x2000;spl-os-args fat 0 1;spl-os-image fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1
dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
dfu_bufsiz=0x10000
eth1addr=d0:b5:c2:51:25:c7
ethact=cpsw
ethaddr=7c:ec:79:9c:14:5a
fdt_addr_r=0x88000000
fdtaddr=0x88000000
fdtfile=undefined
findfdt=if test $board_name = omap5_uevm; then setenv fdtfile omap5-uevm.dtb; fi; if test $board_name = dra7xx; then setenv fdtfile dra7-evm-lcd10.dtb; fi;if test $board_name = dra72x; then setenv fdtfile dra72-evm-lcd10.dtb; fi;if test $board_name = beagle_x15; then setenv fdtfile am57xx-beagle-x15.dtb; fi;if test $fdtfile = undefined; then echo WARNING: Could not determine device tree to use; fi;
importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
ipaddr=192.168.1.1
kernel_addr_r=0x82000000
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}
loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr
loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};
loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
mmcargs=setenv bootargs console=${console} ${optargs} vram=${vram} root=${mmcroot} rootfstype=${mmcrootfstype}
mmcboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadimage; then run loadfdt; echo Booting from mmc${mmcdev} ...; run mmcargs; bootz ${loadaddr} - ${fdtaddr}; fi;fi;
mmcdev=0
mmcroot=/dev/mmcblk0p2 rw
mmcrootfstype=ext4 rootwait
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
netboot=echo Booting from network ...; set env autoload no; dhcp; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}
netmask=255.255.255.0
partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
ramdisk_addr_r=0x88080000
rdaddr=0x88080000
scsidevs=0
serial#=2e6408f02b3a00a2
serverip=192.168.1.100
soc=omap5
stderr=serial
stdin=serial
stdout=serial
usbtty=cdc_acm
vendor=ti
ver=U-Boot 2014.07 (Sep 02 2016 - 11:49:41)
vram=16M

Environment size: 3531/131067 bytes
U-Boot#





  • Hi Andy,

    Question is forwarded to uboot expert

    Best regards
    Lucy
  • Andy

    Are you using Processor SDK-Linux Automotive -3.0 ?

    Did you connect the SS USB device cable between USB1 port of EVM and ubuntu machine ?

    #env default -a

    # setenv dfu_alt_info ${dfu_alt_info_emmc}

    #  dfu 0 mmc 1

    Check at ubuntu side, issue command  

    @ubuntu # sudo dfu-util -l

    Regards

    Ravi

  • Hi Ravi,
    We use custom board + 7.04.00.04 sdk.
    And I did connect the usb cable , because I can use dfu-util to recognize our board in "USB_Peripheral_boot_mode" .
    BUT I always fail in "DFU Usage from u-boot" mode.
    I use the same fw in these two mode.

    Best,
    Andy
  • Andy

    What is the defconfig used for building u-boot ?

    Regards

    Ravi

  • Hi Ravi,

    Actually I use 7.02.00.02 uboot + 7.04.00.03 kernel on our custom board.

    I use the dra7xx_evm defconfig for building our uboot.

    please see the attachment of my dra7xx_evm.h

    And I also use the Processor SDK Linux Automotive u-boot ( 2016-05 ) version to verify this on our custom board.

    I got the same situation as 7.02.00.02 uboot,  I  use the default config to build my u-boot ( 2016-05 version ) .

    Here is the log.

    ---------------------


    U-Boot SPL 2016.05 (Sep 14 2016 - 11:57:07)
    DRA752-GP ES2.0
    *** Warning - bad CRC, using default environment

    Trying to boot from MMC2_2
    spl: falcon_args_file not set in environment, falling back to default
    reading args
    spl_load_image_fat_os: error reading image args, err - -1
    reading u-boot.img
    reading u-boot.img


    U-Boot 2016.05 (Sep 14 2016 - 11:57:07 +0800)

    CPU : DRA752-GP ES2.0
    Board: DRA74x EVM REV <NULL>
    I2C: ready
    DRAM: 1.5 GiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - bad CRC, using default environment

    Warning: fastboot.board_rev: unknown board revision
    GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
    part_get_info_efi: *** ERROR: Invalid GPT ***
    GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
    part_get_info_efi: *** ERROR: Invalid Backup GPT ***
    ERROR: cannot find partition: 'userdata'

    at arch/arm/cpu/armv7/omap-common/utils.c:195/mmc_get_part_size()
    Warning: fastboot.userdata_size: unable to calc
    SCSI: SATA link 0 timeout.
    AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
    flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst
    scanning bus for devices...
    Found 0 device(s).
    Net: <ethaddr> not set. Validating first E-fuse MAC
    Could not get PHY for cpsw: addr 2
    cpsw
    Hit any key to stop autoboot: 2 0
    => env default -a
    ## Resetting to default environment
    => setenv dfu_alt_info ${dfu_alt_info_emmc}
    => dfu 0 mmc 1

    --------------

    Best,

    Andy

    1778.dra7xx_evm.h

  • Andy

    Ok, you are using 7.02.00.02 u-boot, did you checked on TI-EVM, is it working ?

    The problem you may be facing that eMMC may not be formatted to FAT, 

    Can you try removing the FAT entries in dfu_alt_info.. 

    try below commands and let me know. 

    # setenv dfu_alt_info "rawemmc raw 0 3751936;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x200 0x400"

    # dfu 0 mmc 1

    Regards

    Ravi 

  • Note: No delimiter (";") at end of dfu_alt_info string.
  • My DFU run failure.
    My board is DRA74x EVM REV H.0
    Processor SDK version is Linux-Automotive 3.01.00.00
    u-boot git version is fb0606103eb4e07663e6f38561137eb99809dae5

    the PC log is:

    reading ASIC ID
    CHIP: 5641
    rom minor version: 02
    IDEN: 0000000000000000000000000000000000000000
    MPKH: 0000000000000000000000000000000000000000000000000000000000000000
    CRC0: 51d2f9a7
    CRC1: 00000000
    device is GP
    sending 2ndstage to target...

    On PC after those log, it exit to console immediately.



    the log on evm board is:
    U-Boot SPL 2016.05-gfb0606103e (Nov 19 2016 - 14:54:01)
    DRA752-GP ES2.0
    spl: mmc init failed with error: -19
    *** Warning - MMC init failed, using default environment

    Trying to boot from MMC2
    spl: mmc init failed with error: -19
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    Any advise is very appreciated !

    Ya Lin
  • Ya Lin

    Based on the logs, Looks like SYSBOOT sets to MMC boot. What is the SYSBOOT pin setting ? 

    set SYSBOOT[0..7] =OFF OFF OFF OFF OFF OFF OFF OFF. 

    Also include this u-boot-dfu patch. pastebin.ubuntu.com/23510597 

    Regards

    Ravi

  • Hi Ravi B

    I follow your instruction but the same error remain.

    Regards

    Ya Lin
  • Yan Lin

    Have you selected CONFIG_SPL_DFU_SUPPORT ?

    Menuconfig->Boot Images->"Enable SPL with DFU to load binaries to memory device"

    Regards

    Ravi

  • Ravi:
    Menuconfig->Boot Images->"Enable SPL with DFU to load binaries to memory device"
    This is work well. Thank you ! very much !


    Ya lin
  • Ya Lin

    On 2016.05 u-boot, you need to apply this patch pastebin.ubuntu.com/23510597 and try.

    There are some sequence changed in 2016.05 u-boot onwards. Follow the wiki documents.
    1) You need to load the MLO using ./usbboot
    2) Then you need to load the u-boot.img and enter into u-boot.

    Regards
    Ravi
  • Ya Lin

    Have you checked on version 2016.05 ?  

    Regards

    Ravi

  • Hi Ravi,

    the DFU can work normally, but the emmc must partition :part1: boot , part2:rootfs;

    so, is there a way to partition on the uboot stage?

    Regards

    Cesar

  • Hi Ravi,

    download the uboot.2016.05 and selected CONFIG_SPL_DFU_SUPPORT,the DFU tool can work normally.

    thanks.

    Cesar
  • Cesar

    Hope your issue got resolved.

    Regards
    Ravi

  • Ya Lin

    There are many bugs fixed after GLSDK 7.x release onwards.

    Have you tried on PSDKLA-3.02 release version. processors.wiki.ti.com/.../Category:Processor_SDK_Linux_Automotive

    Regards
    Ravi
  • Hi Ravi B

    I have tried DFU on PSDKLA-3.02, it work well.

    Regards
    Ya Lin