Need support to recover my VIM3 from bootloop

Which system do you use? Android, Ubuntu, OOWOW or others?

I am trying to get a custom-built AOSP 14 running on my VIM3. Before it was running the Tablet Android that it was shipped with fine.

Which version of system do you use? Please provide the version of the system here:

VIM3 Hardware 15

Please describe your issue below:

I am new to the Khadas ecosystem and bought a VIM3 (hardware revision 15) in order to tinker around with Android platform development. My main goal for now is to flash and run my self-built AOSP on the VIM3.

I am using an Ubuntu Workstation for building the AOSP and were able to build for emulation a couple of times now.

Now I tried to build the yukawa-userdebug target for the VIM3 on an Android 14 branch. The build was successful, so I tried to flash the image.

This is where things went south. As far as I understand now, I made a mistake when flashing the bootloader that ships within the AOSP source code under the “yukawa/bootloader” directory. I used the “noab” version instead of the “ab” version, which probably messed with my installation as AOSP 14 is probably expecting “ab” to be used.

Nonetheless, I flashed the bootloader using fastboot flash bootloader, then I used fastboot to format the eMMC and flashed each AOSP image one by one.

Since then my VIM3 is stuck in a bootloop that I can’t seem to get out of no matter what I do.

I will post the serial console output of the bootloop below, but here is a list of what I’ve tried until now that did not help:

  • I am not able to get an interactive shell via the serial console. Spamming enter/space does nothing, probably u-boot doesn’t even get to that part
  • I am able to put the VIM3 into upgrade mode by holding down the Power Button on the board for 3 seconds. After doing that I am not able to flash an officially supported image or even just the official u-boot though. Using the aml-burn-tool for example always times out after the reset was performed on the board, saying the the ddr setup timed out. After further investigation it seems like I am not able to read or write from/to SRAM in MaskROM mode at all. I can only read and write to registers using the Khadas update tool, every RAM read/write times out no matter how small it is.
  • I also tried to flash Krescue to an SD card and was able to get the respective loading screen to display on my connected HDMI display. After a couple of seconds though u-boot still runs into an error and the VIM boot cycles, so I also can’t seem to use the Krescue tool

No I am lost and don’t know how to recover my VIM3, any suggestions?
Below is the Serial Console output of one bootloop.

Thanks!

Post a console log of your issue below:


G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:0;READ:0;CHK:1F;READ:0;0.
                                                                                     bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

L0:00000000
L1:20000703
L2:00008067
L3:14000000
B2:00402000
B1:e0f83180

TE: 269018

BL2 Built : 19:23:21, Sep 18 2020. g12b g9fde858 - gongwei.chen@droid11-sz

Board ID = 6
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 000463be
eMMC boot @ 1
sw8 s
board id: 6
Load FIP HDR DDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 1
Get wrong ddr fw magic! Error!!
fw parse done
PIEI prepare done
ddr saved addr:00016000
Load ddr parameter from eMMC, src: 0x02c00000, des: 0xfffd0000, size: 0x00001000, part: 0
00000000
emmc switch 0 ok
fastboot data verify
result: 255
Cfg max: 12, cur: 1. Board id: 255. Force loop cfg
LPDDR4 probe

LPDDR4_PHY_V_0_1_22-Built : 14:57:26, Sep  1 2020. g12b g3c95fed - gongwei.chen@droid11-sz
ddr clk to 1608MHz
00000000
emmc switch 1 ok

dmc_version 0001
Check phy result
INFO : End of CA training
INFO : End of initialization
INFO : Training has run successfully!
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of Write leveling coarse delay
INFO : End of read delay center optimization
INFO : Training has run successfully!
Check phy result
INFO : End of initialization
INFO : End of MPR read delay center optimization
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!

soc_vref_reg_value 0x 00000027 00000025 00000029 00000025 00000026 00000026 00000027 00000026 00000027 00000027 00000025 00000026 00000028 00000025 00000025 00000025 00000025 00000023 00000027 00000025 00000023 00000024 00000025 00000023 00000025 000000 
 dram_vref_reg_value 0x 00000015
2D training succeed
auto size-- 65535DDR cs0 size: 2048MB
DDR cs1 size: 2048MB
DMC_DDR_CTRL: 00e00024DDR size: 3928MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass

non-sec scramble use zero key
ddr scramble enabled

100bdlr_step_size ps== 431
result report
boot times 0Enable ddr reg access
00000000
emmc switch 3 ok
Authentication key not yet programmed
get rpmb counter error 0x00000007
00000000
emmc switch 1 ok
Load FIP HDR from eMMC, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 1
Load BL3X from eMMC, src: 0x00078200, des: 0x01768000, size: 0x000e1400, part: 1
0.0;M3 CHK:0;cm4_sp_mode 0
[Image: g12b_v1.1.3396-c893a7153 2020-11-11 13:54:36 gongwei.chen@droid11-sz]
OPS=0x10
ring efuse init
chipver efuse init
29 0b 10 00 01 0c 1b 00 00 0b 32 39 33 4b 4d 50 
[0.016082 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE:  BL31: v1.3(release):5c909a099
NOTICE:  BL31: Built : 17:18:21, Nov 20 2020
NOTICE:  BL31: G12A normal boot!
NOTICE:  BL31: BL33 decompress pass
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01-ga584e58-dirty (Oct 23 2024 - 08:40:54)

DRAM:  3.8 GiB
Relocation Offset is: d6e23000
mmu cfg end: 0xe0000000
mmu cfg end: 0xe0000000
spi_post_bind(spifc): req_seq = 0
board init
register usb cfg[0][1] = 00000000d7f32160
aml_i2c_init_port init regs for 0
MCU version: 0x00 0x03
MCU version is to low! Doesn't support froce boot from SD card.
NAND:  MMC:   aml_priv->desc_buf = 0x00000000d3e13a70
aml_priv->desc_buf = 0x00000000d3e15db0
SDIO Port B: 0, SDIO Port C: 1
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
emmc/sd response timeout, cmd8, cmd->cmdarg=0x1aa, status=0x1ff2800
emmc/sd response timeout, cmd55, cmd->cmdarg=0x0, status=0x1ff2800
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x1, tx-dly 0, clock 40000000
[set_emmc_calc_fixed_adj][875]find fixed adj_delay=20
init_part() 274: PART_TYPE_EFI
[mmc_init] mmc init success
start dts,buffer=00000000d3e18620,dt_addr=00000000d3e18620
get_partition_from_dts() 92: ret 0
parts: 17
00:      logo   0000000000800000 1
01:  recovery   0000000001800000 1
02:      misc   0000000000800000 1
03:      dtbo   0000000000800000 1
04:  cri_data   0000000000800000 2
05:     param   0000000001000000 2
06:      boot   0000000001000000 1
set has_boot_slot = 0
07:       rsv   0000000001000000 1
08:  metadata   0000000001000000 1
09:    vbmeta   0000000000200000 1
10:       tee   0000000002000000 1
11:    vendor   000000001f000000 1
12:       odm   0000000008000000 1
13:    system   0000000078800000 1
14:   product   0000000008000000 1
15:     cache   0000000046000000 2
16:      data   ffffffffffffffff 4
init_part() 274: PART_TYPE_EFI
eMMC/TSD partition table have been checked OK!
crc32_s:0x1577dad == storage crc_pattern:0x1577dad!!!
crc32_s:0xee152b83 == storage crc_pattern:0xee152b83!!!
crc32_s:0x79f50f07 == storage crc_pattern:0x79f50f07!!!
mmc env offset: 0x4d400000 
In:    serial
Out:   serial
Err:   serial
board late init
aml log : internal sys error!
reboot_mode=cold_boot
TP050 id=0xff
TP101 id=0xff
panel_type=lcd_1   khadas_mipi_id=0   id=0---default old_TS050   id=1,lcd_1---old_TS050   id=2,lcd_2---TS101   id=3,lcd_3---new_TS050
[aml_i2c_xfer] error ret = -5   i2c master b current slave addr is 0xc
i2c_read: i2c transfer failed
Error reading the chip: -5
khadas camera id=0xfffffffb
khadas_camera_id=1   id=1---is OS08A10   id=2---is IMX415
M2X id=0xff
m2x_board_exist=0 khadas_m2x_id=0               id=0---no M2X   id=1---M2X exists
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
_verify_dtb_checksum()-3354: calc 117eec3c, store 117eec3c
_verify_dtb_checksum()-3354: calc 117eec3c, store 117eec3c
dtb_read()-3569: total valid 2
update_old_dtb()-3550: do nothing
aml_i2c_init_port init regs for 0
fusb302_init: Device ID: 0x91
CC connected in 1 as UFP
charge ic max_vol = 12000mv max_cur = 6000ma
chip->pos_power = 3, chip->pd_output_vol=12000  chip->pd_output_cur=3000
fusb302 detect chip.port_num = 0
amlkey_init() enter!
[EFUSE_MSG]keynum is 1
vpu: driver version: v20190313
vpu: detect chip type: 9
vpu: clk_level default: 7(666667000Hz), max: 7(666667000Hz)
vpu: clk_level in dts: 7
vpu: vpu_power_on
vpu: set_vpu_clk
vpu: set clk: 666667000Hz, readback: 666666667Hz(0x100)
vpu: set_vpu_clk finish
vpu: vpu_module_init_config
vpp: vpp_init
vpp: vpp osd2 matrix rgb2yuv..............
hdr_func 4, hdr_process_select 0x1
LCD_RESET PIN: 0
lcd: lcd_debug_print flag: 0
lcd: detect mode: tablet, key_valid: 0
lcd: detect lcd_clk_path: 1
lcd: failed to get lcd_cpu_gpio_names
lcd: load config from dts
lcd: pinctrl_version: 2
lcd: use panel_type=lcd_1
lcd: bl: pinctrl_version: 2
lcd: bl: name: backlight_pwm, method: 1
lcd: error: gpio: wrong name invalid
lcd: bl: pwm_reg=0x00800002
lcd: bl: aml_bl_power_ctrl: 0
Net:   use internal ethernet
--------ext_ethernet=0
+++++++++ext_ethernet=0
dwmac.ff3f0000amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 1
MACADDR:02:00:00:1b:0c:01(from chipid)

ramdump_init, add:0, size:0
CONFIG_AVB2: null 
Start read misc partition datas!
info->magic = 
info->version_major = 1
info->version_minor = 0
info->slots[0].priority = 15
info->slots[0].tries_remaining = 7
info->slots[0].successful_boot = 0
info->slots[1].priority = 14
info->slots[1].tries_remaining = 7
info->slots[1].successful_boot = 0
info->crc32 = -1075449479
active slot = 0

set SPDIF_OUT okay
set I2S okay
set UARTC okay
wipe_data=successful
wipe_cache=successful
upgrade_step=0
aml log : internal sys error!
reboot_mode:::: cold_boot
lcd: error: outputmode[576cvbs] is not support
hpd_state=1
do_hpd_detect: hdmimode=1080p60hz
do_hpd_detect: colorattribute=444,8bit
Edid_MonitorCapable861: ycbcr444=1, ycbcr422=1
HDMI_EDID_BLOCK_TYPE_VENDER: pRXCap->ColorDeepSupport=0x38
sink preferred_mode is <NULL>[0]
hdmi screen is not single resolution
hdr mode is 0
dv  mode is ver:0  len: 0
hdr10+ mode is 0
Edid_MonitorCapable861: ycbcr444=1, ycbcr422=1
HDMI_EDID_BLOCK_TYPE_VENDER: pRXCap->ColorDeepSupport=0x38
*0Jø��¢0010ÉHø�0*0Nø��¢P'                                               0(0ò*0Hø�               0+0Ý*02&0+0'øø��øî8÷:��]
command mark(uboot-command) not match 0'øø��øî8÷���,don't execute.
"Synchronous Abort" handler, esr 0x86000004
ELR:     10806120b2a1130
LR:      10806120b2a1130
x0 : 0000000000000000 x1 : 0000000000000000
x2 : 00000000d7e66494 x3 : 0000000000000001
x4 : 00000000d3e1192a x5 : 0000000000000000
x6 : 00000000ffffffd8 x7 : 00000000d7f41f68
x8 : 0000000000000001 x9 : 0000000000000008
x10: 000000000000000f x11: 00000000d7ef3f70
x12: 0000000000000000 x13: 000000000000e2c4
x14: 000000000000e2c0 x15: 000000000000e2bc
x16: 000000000000e2b8 x17: 000000000000e370
x18: 00000000d3e12e28 x19: 0789c33031300212
x20: c280c001b8c30748 x21: 1a0894c2100306a2
x22: 30021a0893c21016 x23: 87c2484e30022a11
x24: 0000000000000000 x25: 0000000000000000
x26: 0000000000000000 x27: 00000000d3e444f0
x28: 0000000000000000 x29: 021a0893c2101f1a

Resetting CPU ...

resetting ...
G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:0;READ:0;CHK:1F;READ:0;0.
                                                                                      bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

...