I don’t think the power supply is the cause. For I can flash the KVIM official Android image with power supplied by the same USB port in the same Windows PC. The only different is the Update.img, one is compiled by myself according to the Khadas Doc, one is downloaded from Khadas firmware page.
Besides, I have flash the Android 6 update.img compiled by myself successfully with same Windows PC at the same USB Port.
Still, I tried to use the SD Card to burn the image, and it get success. The log is :
GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 96186
BL2 Built : 13:38:48, Mar 8 2017.
gxl g8e12692 - xiaobo.gu@droid05
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: 0x0001b400
Load bl33 from eMMC, src: 0x0003c200, des: 0x01000000, size: 0x000b3a00
GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:0;RCY:0;USB:0;SPI:0;CHK:AA;EMMC:400;NAND:81;SD:0;READ:0;0.0;CHK:0;
no sdio debug board detected
TE: 1795806
BL2 Built : 13:38:48, Mar 8 2017.
gxl g8e12692 - xiaobo.gu@droid05
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!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from SD, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from SD, src: 0x00020200, des: 0x10100000, size: 0x0001b400
Load bl33 from SD, src: 0x0003c200, des: 0x01000000, size: 0x000b4000
NOTICE: BL3-1: v1.0(debug):866a5ea
NOTICE: BL3-1: Built : 15:50:05, Feb 28 2017
[BL31]: GXL CPU setup!
aml log : bl31 normal boot !
mpu_config_enable:ok
[Image: gxl_v1.1.3194-db501b7 2017-03-28 15:06:09 yun.cai@droid06]
OPS=0x82
f5 a6 20 2 8d 56 ad 1d 39 78 e0 c [2.218718 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-g35f4e9d (Apr 19 2017 - 19:03:15)
DRAM: 2 GiB
Relocation Offset is: 76ebd000
register usb cfg[0][1] = 0000000077f5ca38
[CANVAS]canvas init
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 = 0x0000000073ebd6b0
aml_priv->desc_buf = 0x0000000073ebf9d0
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd55, status=0x1ff2800
init_part() 278: PART_TYPE_DOS
[mmc_init] mmc init success
dtb magic edfe0dd0
start dts,buffer=0000000073ec2200,dt_addr=0000000073ec2200
parts: 10
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: boot 0000000002000000 1
07: system 0000000080000000 1
08: cache 0000000020000000 2
09: data ffffffffffffffff 4
_check_ptbl_mbr()-815: MBR is OK!
init_part() 278: PART_TYPE_DOS
eMMC/TSD partition table have been checked OK!
check pattern success
mmc env offset: 0x27400000
In: serial
Out: serial
Err: serial
reboot_mode=cold_boot
Unknown command 'cvbs' - try 'help'
hpd_state=1
set hdmitx VIC = 16
config HPLL = 2970000
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]
_verify_dtb_checksum()-918: calc 7df5e5dd, store 7df5e5dd
_verify_dtb_checksum()-918: calc 7df5e5dd, store 7df5e5dd
dtb_read()-1040: total valid 2
dtb_read()-1107: do nothing
card in
init_part() 278: PART_TYPE_DOS
[mmc_init] mmc init success
Device: SDIO Port B
Manufacturer ID: 74
OEM: 4a60
Name: SD16G
Tran Speed: 25000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.6 GiB
mmc clock: 25000000
Bus Width: 4-bit
[MSG]ini sz 0x249B
[fat]Filesize is 0x249B[0M]
[fat]0x:leftSz 249 < BPS 2000, gotSz 249
=========sdc_burn_paras=====>>>
[common]
erase_bootloader = 1
erase_flash = 1
reboot = 0x1
key_overwrite = 0x0
[burn_ex]
package = update.img
media =
[burn_parts]
burn_num = 0
<<<<=====sdc_burn_paras======
[fat]Filesize is 0x3bcb4f78B[956M]
[fat]0x:leftSz c40 < BPS 2000, gotSz 6c40
[MSG]image version [0x00000002]
[MSG]cfg10=0xADFC318C
[fat]Seek 0xf2b00 from 0x6c40
[MSG]itemSizeNotAligned 0x1500
[MSG]align 4 mmc read... [fat]0x:leftSz e30 < BPS 2000, gotSz a330
[MSG]Down(mem) part(dtb) sz(0xa330) fmt(normal)
[MSG]Burn Start...
[MSG]load dt.img to 0x0000000001000000, sz=0xa330
[MSG]Burn complete
Err imgread(L587):Logo header err.
[MSG]echo video prepare for upgrade
hpd_state=1
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0x7f851000
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0x7f851000
[CANVAS]addr=0x7f851000 width=3840, height=2160
set hdmitx VIC = 16
config HPLL = 2970000
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
[MSG]dw,dh[1920, 1080]
[MSG]w,h[4,14]
[MSG]Exit before re-init
command: store exit
dtb magic edfe0dd0
start dts,buffer=0000000001000000,dt_addr=0000000001000000
parts: 10
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: boot 0000000002000000 1
07: system 0000000080000000 1
08: cache 0000000020000000 2
09: data ffffffffffffffff 4
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
init_part() 278: PART_TYPE_DOS
[mmc_init] mmc init success
switch to partitions #0, OK
mmc1(part 0) is current device
Device: SDIO Port C
Manufacturer ID: 15
OEM: 100
Name: 8WPD3
Tran Speed: 52000000
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 7.3 GiB
mmc clock: 40000000
Bus Width: 8-bit
[store]amlmmc erase 1emmckey_is_protected : protect
start = 0,end = 57343
Caution! Your devices Erase group is 0x400
The erase range would be change to 0x36000~0xe8ffff
start = 221184,end = 15269886
[burn_parts]
burn_num = 5
burn_part0 = _aml_dtb
burn_part1 = boot
burn_part2 = logo
burn_part3 = recovery
burn_part4 = system
[MSG]=====>To burn part [_aml_dtb]
[MSG]itemSizeNotAligned 0x1500
[MSG]Down(store) part(_aml_dtb) sz(0xa330) fmt(normal)
[MSG]totalSlotNum = 0, nextWriteBackSlot 1
[MSG]itemSizeNotAligned 0x1500
[fat]0x:leftSz e30 < BPS 2000, gotSz 8e30
[MSG]Burn Start...
[MSG]optimus_download_dtb_image:dataSzReceived=0xa330
start erase dtb......
start = 81920,end = 82943
dev # 1, , several blocks erased OK
[store]To run cmd[emmc dtb_write 0x00000000076feb00 0x40000]
dtb_write()-1141: valid 2
dtb_write()-1161: new stamp 1, checksum 0x475dc552, version 1, magic A~D
dtb magic edfe0dd0
start dts,buffer=00000000076feb00,dt_addr=00000000076feb00
dtb magic edfe0dd0
start dts,buffer=00000000076feb00,dt_addr=00000000076feb00
parts: 10
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: boot 0000000002000000 1
07: system 0000000080000000 1
08: cache 0000000020000000 2
09: data ffffffffffffffff 4
_construct_ptbl_by_mbr()-738: invalid magic value: 0x0000
_cmp_iptbl()-577: partition count is not same 0:13
_check_ptbl_mbr()-815: MBR is Improper!
mmc_device_init()-1101: MBR Updated!
init_part() 278: PART_TYPE_DOS
partition table success
[MSG]Burn complete
[store]To run cmd[emmc dtb_read 0x0000000007700000 0x40000]
dtb_read_shortcut()-976: short cut in...
[MSG]VERIFY OK
[MSG]=====>To burn part [boot]
[fat]Seek 0x1ed2b0 from 0xfce60
[MSG]itemSizeNotAligned 0xd50
[MSG]flash LOGIC partCap 0x2000000B
[MSG]Down(store) part(boot) sz(0x8a2000) fmt(normal)
[MSG]totalSlotNum = 0, nextWriteBackSlot 139
[MSG]itemSizeNotAligned 0xd50
[fat]0x:leftSz 12b0 < BPS 2000, gotSz 12b0
[MSG]Burn Start...
[MSG]Burn complete
[MSG]Verify Start...
[MSG]To verify part boot in fmt normal
[MSG]Verify End
[MSG]VERIFY OK
[MSG]=====>To burn part [logo]
[fat]Seek 0xb7f310 from 0xa8f2e0
[MSG]itemSizeNotAligned 0xcf0
[MSG]flash LOGIC partCap 0x2000000B
[MSG]Down(store) part(logo) sz(0x11b5b0) fmt(normal)
[MSG]totalSlotNum = 0, nextWriteBackSlot 18
[MSG]itemSizeNotAligned 0xcf0
[fat]0x:leftSz 8c0 < BPS 2000, gotSz a8c0
[MSG]Burn Start...
[MSG]Burn complete
[MSG]Verify Start...
[MSG]To verify part logo in fmt normal
[MSG]Verify End
[MSG]VERIFY OK
[MSG]=====>To burn part [recovery]
[fat]Seek 0xcaa8b8 from 0xc9a8f0
[MSG]itemSizeNotAligned 0x1748
[MSG]flash LOGIC partCap 0x2000000B
[MSG]Down(store) part(recovery) sz(0xcb9000) fmt(normal)
[MSG]totalSlotNum = 0, nextWriteBackSlot 204
[MSG]itemSizeNotAligned 0x1748
[fat]0x:leftSz 18b8 < BPS 2000, gotSz 78b8
[MSG]Burn Start...
[MSG]Burn complete
[MSG]Verify Start...
[MSG]To verify part recovery in fmt normal
[MSG]Verify End
[MSG]VERIFY OK
[MSG]=====>To burn part [system]
[MSG]itemSizeNotAligned 0x718
[MSG]flash LOGIC partCap 0x80000000B
[MSG]Down(store) part(system) sz(0x3a351660) fmt(sparse)
[MSG]totalSlotNum = 0, nextWriteBackSlot 1024
[MSG]itemSizeNotAligned 0x718
[MSG]Burn Start...
[fat]0x:leftSz f48 < BPS 2000, gotSz f48
[MSG]Burn complete
Downloading %100
[MSG]Verify Start...
[MSG]To verify part system in fmt sparse
[MSG]Verify End
[MSG]VERIFY OK
[MSG]=====>To burn part [bootloader]
[MSG]itemSizeNotAligned 0xd20
[MSG]Down(store) part(bootloader) sz(0xf0000) fmt(normal)
[MSG]totalSlotNum = 0, nextWriteBackSlot 15
[MSG]itemSizeNotAligned 0xd20
[fat]0x:leftSz 12e0 < BPS 2000, gotSz f2e0
[MSG]Burn Start...
mmc switch to boot0 success
mmc switch to boot1 success
mmc switch to user success
[MSG]align bootloader sz from 0xf0000 to 0x100000
[MSG]Burn complete
mmc switch to boot0 success
mmc switch to boot1 success
mmc switch to user success
[MSG]VERIFY OK
## save_setting ##
[MSG]Set upgrade_step to 2
Saving Environment to aml-storage...
mmc env offset: 0x27400000
Writing to MMC(1)... done
[MSG]to close image
[MSG]Reload bmps env.
[MSG]======sdc burn SUCCESS.
reboot mode: normal
INFO: PSCI Affinity Map:
INFO: AffInst: Level 0, MPID 0x0, State ON
INFO: AffInst: Level 0, MPID 0x1, State OFF
INFO: AffInst: Level 0, MPID 0x2, State OFF
INFO: AffInst: Level 0, MPID 0x3, State OFF
bl31 reboot reason: 0xd
bl31 reboot reason: 0x1
system cmd 1.
When the update is finished, it reboot and still loops on reboot and reboot:
GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:0;RCY:0;USB:0;SPI:0;CHK:AA;EMMC:0;READ:0;0.0;CHK:0;
TE: 180843
BL2 Built : 13:38:48, Mar 8 2017.
gxl g8e12692 - xiaobo.gu@droid05
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: 0x0001b400
Load bl33 from eMMC, src: 0x0003c200, des: 0x01000000, size: 0x000b3a00
NOTICE: BL3-1: v1.0(debug):866a5ea
NOTICE: BL3-1: Built : 15:50:05, Feb 28 2017
[BL31]: GXL CPU setup!
aml log : bl31 normal boot !
mpu_config_enable:ok
[Image: gxl_v1.1.3194-db501b7 2017-03-28 15:06:09 yun.cai@droid06]
OPS=0x82
f5 a6 20 2 8d 56 ad 1d 39 78 e0 c [0.441742 Inits done]
=== PROCESS EXCEPTION: 04 ====== xPSR: 21000000 ===
r0 :00000001 r1 :1000b268 r2 :1000aedc r3 :1000aebc
r4 :00000000 r5 :00000000 r6 :00000000 r7 :00000000
r8 :00000000 r9 :00000000 r10:00000000 r11:00000000
r12:00000000 sp :1000d350 lr :1000a039 pc :1000a5ba
Data access violation, mfar = 1000aed8
mmfs = 82, shcsr = 70001, hfsr = 0, dfsr = 0
=========== Process Stack Contents ===========
1000d370: 00000000 00000000 00000000 10000ac9
1000d380: 00000000 00000000 00000000 00000000
1000d390: 00000000 00000000 00000000 00000000
1000d3a0: 00000000 00000000 00000000 00000000
GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:0;RCY:0;USB:0;SPI:0;CHK:AA;EMMC:0;READ:0;0.0;CHK:0;
TE: 170300
BL2 Built : 13:38:48, Mar 8 2017.
gxl g8e12692 - xiaobo.gu@droid05
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: 0x0001b400
Load bl33 from eMMC, src: 0x0003c200, des: 0x01000000, size: 0x000b3a00
NOTICE: BL3-1: v1.0(debug):866a5ea
NOTICE: BL3-1: Built : 15:50:05, Feb 28 2017
[BL31]: GXL CPU setup!
aml log : bl31 normal boot !
mpu_config_enable:ok
[Image: gxl_v1.1.3194-db501b7 2017-03-28 15:06:09 yun.cai@droid06]
OPS=0x82
f5 a6 20 2 8d 56 ad 1d 39 78 e0 c [0.431181 Inits done]
=== PROCESS EXCEPTION: 04 ====== xPSR: 21000000 ===
r0 :00000001 r1 :1000b268 r2 :1000aedc r3 :1000aebc
r4 :00000000 r5 :00000000 r6 :00000000 r7 :00000000
r8 :00000000 r9 :00000000 r10:00000000 r11:00000000
r12:00000000 sp :1000d350 lr :1000a039 pc :1000a5ba
Data access violation, mfar = 1000aed8
mmfs = 82, shcsr = 70001, hfsr = 0, dfsr = 0
=========== Process Stack Contents ===========
1000d370: 00000000 00000000 00000000 10000ac9
1000d380: 00000000 00000000 00000000 00000000
1000d390: 00000000 00000000 00000000 00000000
1000d3a0: 00000000 00000000 00000000 00000000
All the Android 7 code is synced just as the Khadas Doc described, the toolchain is what it implied. So what is the cause? And how can I get my Android 7 compiled by myself to work?