Tried to flash firmware image from here https://dl.khadas.com/Firmware/VIM2/Ubuntu/EMMC/
I have VIM2 1.2 connected with USB, debug UART connected to my console, powered with independent power supply. Currently seems sume Android image there.
My computer working on ArchLinux. So used Ubuntu guide https://docs.khadas.com/vim2/UpgradeViaUSBCable.html
So my flashing process started and I see this
$ aml-burn-tool -i ./images/ubuntu/VIM2_Ubuntu-server-xenial_Linux-4.9_arm64_EMMC_2018-07-12/VIM2_Ubuntu-server-xenial_Linux-4.9_arm64_EMMC_2018-07-12.img
Burning image './images/ubuntu/VIM2_Ubuntu-server-xenial_Linux-4.9_arm64_EMMC_2018-07-12/VIM2_Ubuntu-server-xenial_Linux-4.9_arm64_EMMC_2018-07-12.img' to eMMC...
Rebooting the board ........[OK]
Unpacking image [OK]
Initializing ddr ........[OK]
Running u-boot ........[OK]
Create partitions [KO]
So it always failed on Creating partitions
In debugger console, connected to board I see this
....
Load bl30 from USB, src: 0x00010000, des: 0x01100000, size: 0x0000d600
Load bl31 from USB, src: 0x00020000, des: 0x05100000, size: 0x0002c600
Load bl33 from USB, src: 0x00050000, des: 0x01000000, size: 0x00056400
NOTICE: BL3-1: v1.0(release):a625749
NOTICE: BL3-1: Built : 11:25:15, Aug 25 2017
NOTICE: BL31: BL33 decompress pass
mpu_config_enable:ok
[Image: gxl_v1.1.3243-377db0f 2017-09-07 11:28:58 qiufang.dai@droid07]
OPS=0x82
wdt: reset registers!
5 6b f5 45 35 75 b ec 2f 58 71 75 [37.405030 Inits done]
secure task start!
high task start!
low task start!
ERROR: Error initializing runtime service opteed_fast
U-Boot 2015.01 (Jul 12 2018 - 11:56:38)
DRAM: 3 GiB
Relocation Offset is: b6ecd000
[MSG]MMC init in usb
aml_priv->desc_buf = 0x00000000b3ecd640
aml_priv->desc_buf = 0x00000000b3ecf960
SDIO Port B: 0, SDIO Port C: 1
InUsbBurn
[MSG]sof
Set Addr 27
Get DT cfg
Get DT cfg
set CFG
USBErr:767--unknown vendor req comp 80.00 v0000 i0000 l2
Tried different images - same result. Have no ideas now how to flash it.
numbqq
August 23, 2018, 12:30pm
2
Hi diytronic,
Linux upgrade tool only tested on Ubuntu not tested on ArchLinux, not sure whether it works.
Have you tried other USB C cable or change the host PC USB port? And you can try to burn on windows , too.
Thanks.
Found debug key in flash tools and turned it to 1 now output is (starting from U-boot)
...
Running u-boot
Command -> /home/roman/.Projects/DIY/khadas/utils/aml-flash-tool/tools/update 2>/dev/null write /tmp/aml-flash-tool-e609/DDR.USB 0xd9000000
- Results ---------------------------------------------------
..
Transfer Complete! total size is 49152 Bytes
-------------------------------------------------------------
Command -> /home/roman/.Projects/DIY/khadas/utils/aml-flash-tool/tools/update 2>/dev/null write /home/roman/.Projects/DIY/khadas/utils/aml-flash-tool/tools/usbbl2runpara_runfipimg.bin 0xd900c000
- Results ---------------------------------------------------
..
Transfer Complete! total size is 48 Bytes
-------------------------------------------------------------
Command -> /home/roman/.Projects/DIY/khadas/utils/aml-flash-tool/tools/update 2>/dev/null write /tmp/aml-flash-tool-e609/UBOOT.USB 0x200c000
- Results ---------------------------------------------------
....................
Transfer Complete! total size is 638976 Bytes
-------------------------------------------------------------
Command -> /home/roman/.Projects/DIY/khadas/utils/aml-flash-tool/tools/update 2>/dev/null run 0xd9000000
- Results ---------------------------------------------------
[update]Run at Addr d9000000
AmlUsbRunBinCode:ram_addr=d9000000
-------------------------------------------------------------
........[OK]
Command -> /home/roman/.Projects/DIY/khadas/utils/aml-flash-tool/tools/update 2>/dev/null mwrite /tmp/aml-flash-tool-e609/_aml_dtb.PARTITION mem dtb normal
- Results ---------------------------------------------------
file size is 0xade8
AmlUsbTplCmd = download mem dtb normal 0xade8 rettemp = 1 buffer = download mem dtb normal 0xade8
AmlUsbReadStatus IOCTL_TPL_STATUS_Handler ret=-110 error_msg=Connection timed out
retusb = 0
Read status failed
-------------------------------------------------------------
Create partitions
Command -> /home/roman/.Projects/DIY/khadas/utils/aml-flash-tool/tools/update 2>/dev/null bulkcmd " disk_initial 1"
- Results ---------------------------------------------------
AmlUsbBulkCmd[ disk_initial 1]
AM_REQ_BULK_CMD_Handler ret=-110,blkcmd= disk_initial 1 error_msg=Connection timed out
[AmlUsbRom]Err:rettemp = 0 buffer = [ disk_initial 1]
ERR: AmlUsbBulkCmd failed!
-------------------------------------------------------------
[KO]
Cleanup
So error is Connection timed out
Also got this during board reset
Command -> .../aml-flash-tool/tools/update 2>/dev/null bulkcmd " reset"
- Results ---------------------------------------------------
AmlUsbBulkCmd[ reset]
usbReadFile len=512,ret=-5 error_msg=Input/output error
[AmlUsbRom]Err:return len=-1 < strLenBusy 11
[AmlUsbRom]Err:bulkInReply=[]
ERR: AmlUsbBulkCmd failed!
Have you tried other USB C cable or change the host PC USB port?
yes
And you can try to burn on windows
did not tried on windows yet
And you can try to burn on windows
Done it and it work
Very strange Same cable, same board - just different computer and OS.
Also got in linux this
$ dmesg
...
[ 2406.433699] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2406.433702] usb 2-1: Product: GX-CHIP
[ 2406.433704] usb 2-1: Manufacturer: Amlogic
[ 2425.336541] usb 2-1: usbfs: process 2014 (update) did not claim interface 0 before use
[ 2433.521990] usb 2-1: usbfs: process 2068 (update) did not claim interface 0 before use
[ 2433.545870] usb 2-1: usbfs: process 2076 (update) did not claim interface 0 before use
[ 2433.561937] usb 2-1: usbfs: process 2101 (update) did not claim interface 0 before use
[ 2433.570750] usb 2-1: usbfs: process 2101 (update) did not claim interface 0 before use
[ 2433.579191] usb 2-1: usbfs: process 2101 (update) did not claim interface 0 before use
...
Seems something wrong with linux usbfs subsystem