Unable to flash official prebuilt Android 14 firmware via fastboot on VIM3 v15

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

Android 14, prebuilt firmware for VIM3(Main branch(Latest) 20241220) provide by Khadas in post -

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

Main branch(Latest) 20241220

Please describe your issue below:

I got 2 VIM3 - they are different in hardware version v14 and v15.
VIM3 v14 is fine with the prebuilt firmware.
VIM3 v15 is not able to flash boot.img.

Here are mt my flashing steps:

  1. power and press the ‘F‘ key on VIM3 3 times shortly
  2. export BOOTLOADER_NAME=u-boot_kvim3_ab.bin
  3. boot-g12.py ${BOOTLOADER_NAME}
  4. fastboot flash bootloader ${BOOTLOADER_NAME}
  5. fastboot erase bootenv && fastboot oem format && fastboot reboot bootloader
  6. press the ‘R‘ key on VIM3
  7. fastboot flash boot_a boot.img && fastboot flash boot_b boot.img && fastboot flash super super.img && fastboot flash userdata userdata.img && fastboot flash dtbo_a dtbo-unsigned.img && fastboot flash dtbo_b dtbo-unsigned.img && fastboot erase misc && fastboot erase frp && fastboot format metadata && fastboot reboot

at step 6, I see this error on console:

Hit any key to stop autoboot: 0
Verify GPT: error!
Broken MMC partition scheme
Running Fastboot…


Then stop at “boot” partition not found
Running Fastboot…
crq->brequest:0x0
** Bad device specification mmc boot_a_a **
** Bad device specification mmc boot_a_a **
Couldn’t find partition mmc boot_a_a
** Bad device specification mmc boot_a **
** Bad device specification mmc boot_a **
Couldn’t find partition mmc boot_a
** Bad device specification mmc boot_a **
** Bad device specification mmc boot_a **
Couldn’t find partition mmc boot_a
Starting download of 35448832 bytes




downloading of 35448832 bytes finished
** Bad device specification mmc boot_a **
** Bad device specification mmc boot_a **
Couldn’t find partition mmc boot_a

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: 131054

BL2 Built : 16:01:39, May 25 2020. g12b gb6bfa83 - 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: 000248d2
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 : 16:01:44, May 25 2020. g12b gb6bfa83 - 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�G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:D;RCY:0;USB: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: 56562398

BL2 Built : 16:01:39, May 25 2020. g12b gb6bfa83 - 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: 035f5c72
board id: 6
Cfg max: 12, cur: 1. Board id: 255. Force loop cfg
DATA transfer complete…
Get wrong ddr fw magic! Error!!
fw parse done
DATA transfer complete…
AML DDR FW load done
DATA transfer complete…
PIEI prepare done
LPDDR4 probe

LPDDR4_PHY_V_0_1_22-Built : 16:01:44, May 25 2020. g12b gb6bfa83 - gongwei.chen@droid11-sz
ddr clk to 1608MHz
DATA transfer complete…

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 init succeed
DATA transfer complete…
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 00000029 00000028 00000026 00000028 00000026 00000026 00000026 00000026 00000025 00000025 00000024 00000026 00000026 00000026 00000026 00000028 00000028 00000026 00000028 00000026 00000028 00000028 00000026 00000027 00000028 00000027 00000026 00000027 00000026 00000026 00000027 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0004
dram_vref_reg_value 0x 00000014
2D init succeed
ddr init done, boot next stage
result report
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
DATA transfer complete…
DATA transfer complete…
Data req end
DATA transfer complete…
RUN bl2 usb boot
0.0;M3 CHK:0;cm4_sp_mode 0
[Image: g12b_v1.1.3394-7d43064d5 2020-05-07 15:37:11 gongwei.chen@droid11-sz]
OPS=0x10
ring efuse init
chipver efuse init
29 0b 10 00 01 1a 06 00 00 11 32 39 33 4b 4d 50
[0.016073 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE: BL31: v1.3(release):d9e1bbe85
NOTICE: BL31: Built : 19:07:43, Sep 7 2020
NOTICE: BL31: G12A normal boot!
NOTICE: BL31: BL33 decompress pass
ERROR: Error initializing runtime service opteed_fast

<debug_uart>

U-Boot 2024.01-rc1-18687-g1aa26a76a4e7 (Feb 15 2024 - 18:39:08 +0100) khadas-vim3

Model: Khadas VIM3
SoC: Amlogic Meson G12B (A311D) Revision 29:b (10:2)
DRAM: 2 GiB (effective 3.8 GiB)
Core: 410 devices, 36 uclasses, devicetree: separate
MMC: sd@ffe03000: 0, sd@ffe05000: 1, mmc@ffe07000: 2
Loading Environment from MMC… MMC Device -1 not found
*** Warning - No MMC card found, using default environment

In: usbkbd,serial
Out: vidconsole,serial
Err: vidconsole,serial
Net: eth0: ethernet@ff3f0000
Hit any key to stop autoboot: 0
Fastboot forced by usb rom boot
Running Fastboot…
crq->brequest:0x0
** Bad device specification mmc bootloader_a **
** Bad device specification mmc bootloader_a **
Couldn’t find partition mmc bootloader_a
Starting download of 1280880 bytes

downloading of 1280880 bytes finished
Flashing Raw Image
… wrote 1281024 bytes to ‘bootloader’
** Bad device specification mmc bootenv_a **
** Bad device specification mmc bootenv_a **
Couldn’t find partition mmc bootenv_a
Erasing blocks 0 to 3072 due to alignment
… erased 1572864 bytes from ‘bootenv’
Writing GPT: success!
resetting …
bl31 reboot reason: 0xd
bl31 reboot reason: 0x0
system cmd 1.
G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:D;RCY:0;USB:0;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: 140786

BL2 Built : 16:01:39, May 25 2020. g12b gb6bfa83 - 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: 00026ed7
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 : 16:01:44, May 25 2020. g12b gb6bfa83 - 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 00000029 00000028 00000026 00000028 00000026 00000026 00000026 00000026 00000025 00000025 00000025 00000026 00000026 00000026 00000026 00000028 00000028 00000026 00000028 00000027 00000029 00000027 00000026 00000027 00000027 00000027 00000026 00000026 00000026 00000027 00000027 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0004
dram_vref_reg_value 0x 00000014
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== 420
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: 0x000c0c00, part: 1
0.0;M3 CHK:0;cm4_sp_mode 0
[Image: g12b_v1.1.3394-7d43064d5 2020-05-07 15:37:11 gongwei.chen@droid11-sz]
OPS=0x10
ring efuse init
chipver efuse init
29 0b 10 00 01 1a 06 00 00 11 32 39 33 4b 4d 50
[0.016073 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE: BL31: v1.3(release):d9e1bbe85
NOTICE: BL31: Built : 19:07:43, Sep 7 2020
NOTICE: BL31: G12A normal boot!
NOTICE: BL31: BL33 decompress pass
ERROR: Error initializing runtime service opteed_fast

<debug_uart>

U-Boot 2024.01-rc1-18687-g1aa26a76a4e7 (Feb 15 2024 - 18:39:08 +0100) khadas-vim3

Model: Khadas VIM3
SoC: Amlogic Meson G12B (A311D) Revision 29:b (10:2)
DRAM: 2 GiB (effective 3.8 GiB)
Core: 410 devices, 36 uclasses, devicetree: separate
MMC: sd@ffe03000: 0, sd@ffe05000: 1, mmc@ffe07000: 2
Loading Environment from MMC… MMC partition switch failed
*** Warning - MMC partition switch failed, using default environment

In: usbkbd,serial
Out: vidconsole,serial
Err: vidconsole,serial
Net: eth0: ethernet@ff3f0000
Hit any key to stop autoboot: 0
Verify GPT: error!
Broken MMC partition scheme
Running Fastboot…
crq->brequest:0x0
** Bad device specification mmc boot_a_a **
** Bad device specification mmc boot_a_a **
Couldn’t find partition mmc boot_a_a
** Bad device specification mmc boot_a **
** Bad device specification mmc boot_a **
Couldn’t find partition mmc boot_a
** Bad device specification mmc boot_a **
** Bad device specification mmc boot_a **
Couldn’t find partition mmc boot_a
Starting download of 35448832 bytes




downloading of 35448832 bytes finished
** Bad device specification mmc boot_a **
** Bad device specification mmc boot_a **
Couldn’t find partition mmc boot_a


Is Android supported on VIM3 v15?

Thanks

@Narsilx,

I checked that flashing the V15 version vim3-u-aosp-v241101 might cause boot issues. You can flash the latest AOSP version instead.

20241220 Download Link:
https://dl.khadas.com/products/vim3/firmware/android/vim3-tablet-aosp-main-20241220.tar.gz
Instructions:
https://forum.khadas.com/t/vim3-vim3l-aosp-android-14-0-upside-down-cake/21192

Download and Operation Steps:

$ python3 boot-g12.py 20241220-vim3-tablet-aosp-main/u-boot_kvim3_ab.bin

$ fastboot oem format

$ fastboot flash bootloader 20241220-vim3-tablet-aosp-main/u-boot_kvim3_ab.bin

$ fastboot erase bootenv

$ fastboot reboot bootloader

$ cd 20241220-vim3-tablet-aosp-main/

$ fastboot flash boot_a boot.img && fastboot flash boot_b boot.img && fastboot flash super super.img && fastboot flash userdata userdata.img && fastboot flash dtbo_a dtbo-unsigned.img && fastboot flash dtbo_b dtbo-unsigned.img && fastboot erase misc && fastboot erase frp && fastboot format metadata

Press the R (Reset) button

$ fastboot reboot

Enter from the serial port:

setenv force_avb 1

saveenv

Operation video is as follows:

https://drive.google.com/file/d/16kFEJMg74sXEnHT4frAUKPyLvsbDNKec/view?usp=sharing

Hello William,

Appreciate your reply!
I’m using the same firmware version(20241220).

After following your video and commands, I failed this step:

Writing ‘boot_a’ FAILED (remote: ‘invalid partition or device’)
fastboot: error: Command failed

Am I missing some early stage configs on VIM3?


Full Command log:

~/Downloads $ boot-g12.py 20241220-vim3-tablet-aosp-main/u-boot_kvim3_ab.bin
Firmware Version :
ROM: 3.2 Stage: 0.0
Need Password: 0 Password OK: 1
Writing 20241220-vim3-tablet-aosp-main/u-boot_kvim3_ab.bin at 0xfffa0000…
[DONE]
Running at 0xfffa0000…
[DONE]
AMLC dataSize=16384, offset=65536, seq=0…
[DONE]
AMLC dataSize=49152, offset=393216, seq=1…
[DONE]
AMLC dataSize=16384, offset=229376, seq=2…
[DONE]
AMLC dataSize=49152, offset=245760, seq=3…
[DONE]
AMLC dataSize=49152, offset=294912, seq=4…
[DONE]
AMLC dataSize=16384, offset=65536, seq=5…
[DONE]
AMLC dataSize=1198960, offset=81920, seq=6…
[DONE]
[BL2 END]
~/Downloads $ fastboot oem format
OKAY [ 0.252s]
Finished. Total time: 0.252s
~/Downloads $ fastboot flash bootloader 20241220-vim3-tablet-aosp-main/u-boot_kvim3_ab.bin
Sending ‘bootloader’ (1250 KB) OKAY [ 0.048s]
Writing ‘bootloader’ OKAY [ 0.073s]
Finished. Total time: 0.172s
~/Downloads $ fastboot erase bootenv
Erasing ‘bootenv’ OKAY [ 0.016s]
Finished. Total time: 0.064s
~/Downloads $ fastboot reboot bootloader
Rebooting into bootloader OKAY [ 0.006s]
Finished. Total time: 0.056s
~/Downloads $ cd 20241220-vim3-tablet-aosp-main/
~/Downloads/20241220-vim3-tablet-aosp-main $ fastboot flash boot_a boot.img && fastboot flash boot_b boot.img && fastboot flash super super.img && fastboot flash userdata userdata.img && fastboot flash dtbo_a dtbo-unsigned.img && fastboot flash dtbo_b dtbo-unsigned.img && fastboot erase misc && fastboot erase frp && fastboot format metadata
Warning: skip copying boot_a image avb footer (boot_a partition size: 0, boot_a image size: 35448832).
Sending ‘boot_a’ (34618 KB) OKAY [ 1.305s]
Writing ‘boot_a’ FAILED (remote: ‘invalid partition or device’)
fastboot: error: Command failed
~/Downloads/20241220-vim3-tablet-aosp-main $

Full console log:

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: 151004

BL2 Built : 16:01:39, May 25 2020. g12b gb6bfa83 - 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: 000296c1
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 : 16:01:44, May 25 2020. g12b gb6bfa83 - 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 00000029 00000027 00000026 00000028 00000026 00000026 00000026 00000026 00000025 00000025 00000024 00000026 00000026 00000026 00000026 00000028 00000028 00000026 00000028 00000027 00000029 00000027 00000026 00000027 00000027 00000027 00000026 00000026 00000026 00000027 00000027 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0004
dram_vref_reg_value 0x 00000014
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== 420
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: 0x000c0c00, part: 1
G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:D;RCY:0;USB: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: 83953641

BL2 Built : 16:01:39, May 25 2020. g12b gb6bfa83 - 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: 0501517c
board id: 6
Cfg max: 12, cur: 1. Board id: 255. Force loop cfg
DATA transfer complete…
Get wrong ddr fw magic! Error!!
fw parse done
DATA transfer complete…
AML DDR FW load done
DATA transfer complete…
PIEI prepare done
LPDDR4 probe

LPDDR4_PHY_V_0_1_22-Built : 16:01:44, May 25 2020. g12b gb6bfa83 - gongwei.chen@droid11-sz
ddr clk to 1608MHz
DATA transfer complete…

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 init succeed
DATA transfer complete…
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 00000029 00000028 00000026 00000028 00000026 00000026 00000026 00000026 00000025 00000025 00000024 00000026 00000026 00000027 00000026 00000028 00000028 00000026 00000028 00000027 00000028 00000027 00000026 00000027 00000027 00000027 00000026 00000027 00000026 00000027 00000027 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0004
dram_vref_reg_value 0x 00000014
2D init succeed
ddr init done, boot next stage
result report
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
DATA transfer complete…
DATA transfer complete…
Data req end
DATA transfer complete…
RUN bl2 usb boot
0.0;M3 CHK:0;cm4_sp_mode 0
[Image: g12b_v1.1.3394-7d43064d5 2020-05-07 15:37:11 gongwei.chen@droid11-sz]
OPS=0x10
ring efuse init
chipver efuse init
29 0b 10 00 01 1a 06 00 00 11 32 39 33 4b 4d 50
[0.016073 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE: BL31: v1.3(release):d9e1bbe85
NOTICE: BL31: Built : 19:07:43, Sep 7 2020
NOTICE: BL31: G12A normal boot!
NOTICE: BL31: BL33 decompress pass
ERROR: Error initializing runtime service opteed_fast

<debug_uart>

U-Boot 2024.01-rc1-18687-g1aa26a76a4e7 (Feb 15 2024 - 18:39:08 +0100) khadas-vim3

Model: Khadas VIM3
SoC: Amlogic Meson G12B (A311D) Revision 29:b (10:2)
DRAM: 2 GiB (effective 3.8 GiB)
Core: 410 devices, 36 uclasses, devicetree: separate
MMC: sd@ffe03000: 0, sd@ffe05000: 1, mmc@ffe07000: 2
Loading Environment from MMC… MMC Device -1 not found
*** Warning - No MMC card found, using default environment

In: usbkbd,serial
Out: vidconsole,serial
Err: vidconsole,serial
Net: eth0: ethernet@ff3f0000
Hit any key to stop autoboot: 0
Fastboot forced by usb rom boot
Running Fastboot…
crq->brequest:0x0
Writing GPT: success!
** Bad device specification mmc bootloader_a **
** Bad device specification mmc bootloader_a **
Couldn’t find partition mmc bootloader_a
Starting download of 1280880 bytes

downloading of 1280880 bytes finished
Flashing Raw Image
… wrote 1281024 bytes to ‘bootloader’
** Bad device specification mmc bootenv_a **
** Bad device specification mmc bootenv_a **
Couldn’t find partition mmc bootenv_a
Erasing blocks 0 to 3072 due to alignment
… erased 1572864 bytes from ‘bootenv’
resetting …
bl31 reboot reason: 0xd
bl31 reboot reason: 0x0
system cmd 1.
G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:D;RCY:0;USB:0;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: 163034

BL2 Built : 16:01:39, May 25 2020. g12b gb6bfa83 - 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: 0002c5bf
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 : 16:01:44, May 25 2020. g12b gb6bfa83 - 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 00000029 00000028 00000026 00000028 00000026 00000026 00000026 00000026 00000025 00000025 00000024 00000026 00000026 00000026 00000026 00000028 00000028 00000026 00000028 00000027 00000029 00000028 00000026 00000027 00000027 00000027 00000027 00000027 00000026 00000027 00000027 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0004
dram_vref_reg_value 0x 00000014
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== 420
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: 0x000c0c00, part: 1
0.0;M3 CHK:0;cm4_sp_mode 0
[Image: g12b_v1.1.3394-7d43064d5 2020-05-07 15:37:11 gongwei.chen@droid11-sz]
OPS=0x10
ring efuse init
chipver efuse init
29 0b 10 00 01 1a 06 00 00 11 32 39 33 4b 4d 50
[0.016080 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE: BL31: v1.3(release):d9e1bbe85
NOTICE: BL31: Built : 19:07:43, Sep 7 2020
NOTICE: BL31: G12A normal boot!
NOTICE: BL31: BL33 decompress pass
ERROR: Error initializing runtime service opteed_fast

<debug_uart>

U-Boot 2024.01-rc1-18687-g1aa26a76a4e7 (Feb 15 2024 - 18:39:08 +0100) khadas-vim3

Model: Khadas VIM3
SoC: Amlogic Meson G12B (A311D) Revision 29:b (10:2)
DRAM: 2 GiB (effective 3.8 GiB)
Core: 410 devices, 36 uclasses, devicetree: separate
MMC: sd@ffe03000: 0, sd@ffe05000: 1, mmc@ffe07000: 2
Loading Environment from MMC… MMC partition switch failed
*** Warning - MMC partition switch failed, using default environment

In: usbkbd,serial
Out: vidconsole,serial
Err: vidconsole,serial
Net: eth0: ethernet@ff3f0000
Hit any key to stop autoboot: 0
Verify GPT: error!
Broken MMC partition scheme
Running Fastboot…
crq->brequest:0x0
** Bad device specification mmc boot_a_a **
** Bad device specification mmc boot_a_a **
Couldn’t find partition mmc boot_a_a
** Bad device specification mmc boot_a **
** Bad device specification mmc boot_a **
Couldn’t find partition mmc boot_a
** Bad device specification mmc boot_a **
** Bad device specification mmc boot_a **
Couldn’t find partition mmc boot_a
Starting download of 35448832 bytes




downloading of 35448832 bytes finished
** Bad device specification mmc boot_a **
** Bad device specification mmc boot_a **
Couldn’t find partition mmc boot_a

@Narsilx,

After entering the fastboot reboot bootloader, if the device is not restarted, reset the key to restart the device and enter the fastboot mode.

I have the same exact issue with 2 vim3 boards we purshased…

Same results as @Narsilx .

Even if I follow striktly the instructions, there is a big instability with flashing the partitions.

I am also confused on why this u-boot we are flashing is cosing so many problem with this new HW.

Previous one was stable and now we are blocked.

@redou,

Can you use the tool upgrade method to upgrade the system version to Android 9, and then try to burn the 20241220-vim3-tablet-aosp-main version?

Hello William,

For my case,

I’ve tried following firmware, and they are fine on my VIM3 (v15)

  1. vim3-android-9-64bit-v250915.img (khadas/util on github)
  2. vim3-android-11-32bit-v241024.img (khadas/util on github)
  3. vim3-ubuntu-24.04-server-linux-5.15-fenix-1.7.5-250925-emmc.img.xz (khadas/util on github)
  4. vim3-oowow-241112.000-sd.img.gz(Install to micro SD by balenaEtcher)

But for vim3-tablet-aosp-main-20241220, I got some issues before flashing boot.img:

  1. Sometimes cannot find the EMMC partition table
  2. Random partition error when flashing.

On fastboot command:

Sending ‘boot_a’ (34618 KB) OKAY [ 1.515s]
Writing ‘boot_a’ OKAY [ 0.844s]
Finished. Total time: 2.426s
Sending ‘boot_b’ (34618 KB) OKAY [ 1.527s]
Writing ‘boot_b’ OKAY [ 0.852s]
Finished. Total time: 2.446s
Warning: skip copying super image avb footer (super partition size: 3221225472, super image size: 140728110866120).
Sending sparse ‘super’ 1/3 (756116 KB) OKAY [ 33.679s]
Writing ‘super’ OKAY [ 20.363s]
Sending sparse ‘super’ 2/3 (726211 KB) OKAY [ 32.368s]
Writing ‘super’ FAILED (remote: ‘invalid partition or device’)
fastboot: error: Command failed

on Console:

BCB: Bootloader boot…
Running Fastboot…
crq->brequest:0x0
** Bad device specification mmc boot_a_a **
** Bad device specification mmc boot_a_a **
Couldn’t find partition mmc boot_a_a
Starting download of 35448832 bytes

downloading of 35448832 bytes finished
Flashing Raw Image
… wrote 35448832 bytes to ‘boot_a’
** Bad device specification mmc boot_b_a **
** Bad device specification mmc boot_b_a **
Couldn’t find partition mmc boot_b_a
Starting download of 35448832 bytes

downloading of 35448832 bytes finished
Flashing Raw Image
… wrote 35448832 bytes to ‘boot_b’
** Bad device specification mmc super_a **
** Bad device specification mmc super_a **
Couldn’t find partition mmc super_a
Starting download of 774263612 bytes

downloading of 774263612 bytes finished
Flashing sparse image at offset 304128
Flashing Sparse Image
… wrote 774475776 bytes to ‘super’
Starting download of 743640204 bytes

downloading of 743640204 bytes finished
** Bad device specification mmc super **
** Bad device specification mmc super **
Couldn’t find partition mmc super

Hello,

I checked our boards, the EMMC are different. A V15 VIM3 is able to boot. I hope it helps.

Flashing 20241220-vim3-tablet-aosp-main and able to boot:
Pass Cases:

  1. V14 EMMC SEC(Samsung)
  2. V15 EMMC SEC

Fail Cases:

  1. V15 EMMC FORESEE
  2. V15 EMMC FORESEE

The bootloader is cloned by following command according to the post

git clone https://gitlab.baylibre.com/baylibre/amlogic/atv/u-boot.git -b u-boot/v2024.01-rc1/integ bootloaders

Hello @william.lin ,

I flashed with the burning tool which is ok but then going on the manual flash, same as @Narsilx . We are facing same behavior.

@Narsilx many thanks for you relevant logs and report. We have the same problem here and bought many boards …

@william.lin we need you to point out the issue that might be problematic as we are in a step where we tried many combinations. Are you suspecting a change in the HW that might cause this.

Or is their a version of bootloader .bin that we need to flash first ?

@redou @Narsilx ,

Can you take a picture of your V15 board for me?

@william.lin

@william.lin

Hi @william.lin, is there any feedbacks ?

@redou @Narsilx ,

We can reproduce this problem in the office, and now we are looking for solutions.
Thank you very much for your feedback. It may take us a while to find the best solution.

@william.lin Thank you for your fast reaction. Let us know as soon as you have information or a solution.

Anyway we need to quickly know if we can keep the boards or send them back.