Cannot update Via a USB-C Cable with USB burning tools

I have flashed a update.img built by myself using the Windows USB burning tools, when it flashed successfully, I power down and power up the VIM, and the VIM can boot into u-boot, it just loops in bootloader, and get exception on u-boot.
Also, it cann’t enter the Update Mode described in “Upgrade introductions: Via a USB-C Cable” page by keeping pressing the power key and reset, the usb burning tools cannot find the devices. The serial log shows that the machine is loops in bootloader. How can I solve this?

Below is the log of bootloader reboot and reboot…:

GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 96786

BL2 Built : 13:48:56, Sep 23 2016. 
gxl g7459bd4 - jianxin.pan@droid06

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x10100000, size: 0x00015400
Load bl33 from eMMC, src: 0x00038200, des: 0x01000000, size: 0x000a3800
NOTICE:  BL3-1: v1.0(debug):fb68908
NOTICE:  BL3-1: Built : 18:30:11, Nov  1 2016
aml log : bl31 normal boot !
[Image: gxl_v1.1.3154-065f772 2016-09-29 14:08:54 yan.wang@droid05]
OPS=0x82
f5 a6 20 2 8d 56 ad 1d 39 78 e0 c [0.334790 Inits done]
secure task start!
high task start!
low task start!
INFO:    BL3-1: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL3-1: Preparing for EL3 exit to normal world
INFO:    BL3-1: Next image address = 0x1000000
INFO:    BL3-1: Next image spsr = 0x3c9


U-Boot 2015.01-g00abf8b (May 10 2017 - 11:56:01)

DRAM:  2 GiB
Relocation Offset is: 76ecf000
register usb cfg[0][1] = 0000000077f5f5b8
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300)
vpp: vpp_init
boot_device_flag : 1
Nand PHY Ver:1.01.001.0006 (c) 2013 Amlogic Inc.
init bus_cycle=6, bus_timing=7, system=5.0ns
reset failed
get_chip_type and ret:fffffffe
get_chip_type and ret:fffffffe
chip detect failed and ret:fffffffe
nandphy_init failed and ret=0xfffffff1
MMC:   aml_priv->desc_buf = 0x0000000073ecf6b0
aml_priv->desc_buf = 0x0000000073ed19d0
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
[mmc_startup] mmc refix success
[mmc_init] mmc init success
mmc read lba=0x14000, blocks=0x400
start dts,buffer=0000000073ed4270,dt_addr=0000000073ed4270
parts: 11
00:      logo   0000000002000000 1
01:  recovery   0000000002000000 1
02:       rsv   0000000000800000 1
03:       tee   0000000000800000 1
04:     crypt   0000000002000000 1
05:      misc   0000000002000000 1
06: instaboot   0000000020000000 1
07:      boot   0000000002000000 1
08:    system   0000000040000000 1
09:     cache   0000000020000000 2
10:      data   ffffffffffffffff 4
get_dtb_struct: Get emmc dtb OK!
overide_emmc_partition_table: overide cache 
[mmc_get_partition_table] skip partition cache.
Partition table get from SPL is : 
        name                        offset              size              flag
===================================================================================
   0: bootloader                         0            400000                  0
   1: reserved                     2400000           4000000                  0
   2: cache                        6c00000          20000000                  2
   3: env                         27400000            800000                  0
   4: logo                        28400000           2000000                  1
   5: recovery                    2ac00000           2000000                  1
   6: rsv                         2d400000            800000                  1
   7: tee                         2e400000            800000                  1
   8: crypt                       2f400000           2000000                  1
   9: misc                        31c00000           2000000                  1
  10: instaboot                   34400000          20000000                  1
  11: boot                        54c00000           2000000                  1
  12: system                      57400000          40000000                  1
  13: data                        97c00000         13a400000                  4
mmc read lba=0x12000, blocks=0x2
mmc read lba=0x12002, blocks=0x2
mmc_read_partition_tbl: mmc read partition OK!
eMMC/TSD partition table have been checked OK!
mmc env offset: 0x27400000 
In:    serial
Out:   serial
Err:   serial
reboot_mode=watchdog_reboot
hpd_state=1
set hdmitx VIC = 16
config HPLL = 2970
HPLL: 0xc000027b
config HPLL done
j = 4  vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
rx version is 1.4 or below  div=10
hdmtix: set audio
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
read emmc dtb
Net:   dwmac.c9410000
wipe_data=successful
wipe_cache=successful
upgrade_step=2
[OSD]load fb addr from dts
[OSD]failed to get fb addr for logo
[OSD]use default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]load fb addr from dts
[OSD]failed to get fb addr for logo
[OSD]use default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[CANVAS]canvas init
[CANVAS]addr=0x3d800000 width=3840, height=2160
amlkey_init() enter!
"Synchronous Abort" handler, esr 0x96000210
ELR:     77f09a78
LR:      77f09a64
x0 : 0000000077fbb000 x1 : 0000000000000001
x2 : 0000000000000000 x3 : 0000000000000000
x4 : 0000000000000000 x5 : 0000000000000020
x6 : ffffff80ffffffc8 x7 : 0000000000000044
x8 : 0000000000000000 x9 : 0000000000000000
x10: 0000000000000000 x11: 0000000000000000
x12: 0000000000000000 x13: 0000000000000000
x14: 0000000000000000 x15: 0000000000000000
x16: 0000000000000000 x17: 0000000000000000
x18: 0000000073ebee28 x19: 0000000077f3fe78
x20: 0000000077f65000 x21: 0000000000000000
x22: 0000000000000003 x23: 0000000077f728d8
x24: 0000000000000000 x25: 0000000000000000
x26: 0000000000000000 x27: 0000000000000000
x28: 0000000073ed4810 x29: 0000000073ebe5b0

Resetting CPU ...

resetting ...

You can download my u-boot.bin and only replace the u-boot.bin for your board.
About how to load u-boot.bin,you can refer to Loading Images with U-Boot via Ethernet and TFTP

Have a try and give me more informations. Thanks :slight_smile:

To load the U-Boot from tftp requires that we can interactive with uboot using command line.
But it can’t enter the uboot command line mode. For the uboot hasn’t got there before resetting. And I have tried to press the space to interrupt the uboot, it just didn’t work.

Any other idea?

You can copy my u-boot.bin to the path ‘out/target/product/TARGET/’ and pack the update image following below command

./vendor/amlogic/tools/aml_upgrade/aml_image_v2_packer -r out/target/product/TARGET/upgrade/aml_upgrade_package.conf out/target/product/TARGET/upgrade/ out/target/product/TARGET/update.img

It can’t enter the recovery mode as described in 2H, I change and test in several Windows PCs, both the same result, also I test the another VIM board, still the same result. So I don’t know how to flash it now? Use a bootable SD card?

You can refer to Howto Boot Into Upgrade Mode(MRegister Mode)

Finally, with your help, I flashed it. Replace and only replace with your u-boot it boot into system(Android 6) normally.

But how can I build my u-boot to get it work? Thank you!

It maybe has problem for your host pc env. Which version the gcc is?

I use the ‘gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu/’ firstly, and now changed to the 4.9 as the guide described. And the u-boot can boot now.

Thanks so much.

Hi, TonyHo:
If your problem has been fixed, please follow the Problem Solved Button to mark it as solved.

Thanks!