How to boot from USB when eMMC is flashed with image

Which Khadas SBC do you use?

VIM3

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

Ubuntu

Which version of system do you use? Khadas official images, self built images, or others?

Khadas official image

Please describe your issue below:

I flashed an Android image into eMMC before, but it’s failed to boot up.
Now I need to try the ubuntu image, I’ve flashed the ubuntu image into usb dongle.
I tried insert the usb dongle on VIM3 board.
When VIM3 boots up, it seams it will not boot from the ubuntu in usb dongle.
How can I change it to boot from usb dongle instead of eMMC?
Do I need to re-flash the boot loader?

Post a console log of your issue below:

U-Boot 2021.01-00035-gde44e287b6 (Feb 02 2021 - 18:02:13 +0100) khadas-vim3


Model: Khadas VIM3
SoC:   Amlogic Meson G12B (A311D) Revision 29:b (10:2)
DRAM:  3.8 GiB

MMC:   
sd@ffe03000: 0, sd@ffe05000: 1, mmc@ffe07000: 2
Loading Environment from MMC... 
*** Warning - bad CRC, using default environment


In:    serial@3000
Out:   serial@3000
Err:   serial@3000
Net:   eth0: ethernet@ff3f0000
Verify GPT: success!
switch to partitions #0, OK
mmc2(part 0) is current device

MMC read: dev # 2, block # 1024, count 4096 ... 
4096 blocks read: OK
There is no valid bmp file at the given address
Hit any key to stop autoboot:  2 
 1 
 0 
Verify GPT: success!
dev: pinctrl@14
dev: pinctrl@40
gpio: pin 88 (gpio 88) value is 1
Loading Android boot partition...
switch to partitions #0, OK
mmc2(part 0) is current device
Running without AVB...

MMC read: dev # 2, block # 23552, count 65536 ... 
65536 blocks read: OK
Preparing FDT...
  Reading DTB for vim3...
  Reading DTBO for vim3...

MMC read: dev # 2, block # 6144, count 16384 ... 
16384 blocks read: OK
  Applying DTBOs...
0x48f (1167)
Running Android...
## Booting Android Image at 0x01080000 ...
Kernel load addr 0x11080000 size 20875 KiB
Kernel command line: no_console_suspend console=ttyAML0,115200 earlycon printk.devkmsg=on androidboot.boot_devices=soc/ffe07000.mmc init=/init firmware_class.path=/vendor/firmware androidboot.hardware=yukawa androidboot.selinux=permissive buildvariant=userdebug
RAM disk load addr 0x11000000 size 1333 KiB
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
   Uncompressing Kernel Image

   Loading Ramdisk to 7feb2000, end 7ffff158 ... OK
   Loading Device Tree to 000000007fe2f000, end 000000007feb1fff ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.10.74-ge7ee32103b2f-dirty (andy_kuo@bobee) (Android (6875598, based on r399163b) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d), LLD 11.0.5 (/buildbot/tmp/tmpx1DlI_ 87f1315dfbea7c137aa2e6d362dbb457e388158d)) #16 SMP PREEMPT Wed Aug 10 17:26:06 CST 2022
... ...
// From the console logs, it seams the logs are the same no matter I insert the usb dongle or not

Seems you use the AOSP version, this version doesn’t support to boot system from the USB storage.

You have to reflash the Android with 4.9 kernel or Ubuntu to eMMC if you want to boot system from the USB storage.

Hi numbqq,
Thanks for your quick reply. I tried to flash the official ubuntu image (vim3-ubuntu-20.04-server-linux-4.9-fenix-1.5-230425-emmc.img) into VIM3’s eMMC as you mentioned.
I tried the following steps:

  1. Boot VIM3 with eMMC ubuntu, it’s failed to boot up. The logs below show more details.
  2. Plug-in usb dongle with another ubuntu image, power up VIM3. It seems the logs the logs the same as it boots with eMMC. I didn’t see VIM3 boot from external usb dongle.
G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:0;READ:0;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: 161067

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

Board ID = 7
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: 0002be0e
eMMC boot @ 0
sw8 s
board id: 7
Load FIP HDR DDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
Get wrong ddr fw magic! Error!!
fw parse done
PIEI prepare done
00000000
emmc switch 1 ok
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

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 00000028 00000026 00000028 00000028 00000027 00000026 00000027 00000028 00000026 00000025 00000026 00000027 00000027 00000028 00000028 00000026 00000026 00000028 00000028 00000026 00000027 00000028 00000027 00000026 00000028 00000027 00000028 00000028 00000029 00000028 00000026 00000027 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0004 
 dram_vref_reg_value 0x 00000012
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== 398
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 0 ok
Load FIP HDR from eMMC, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from eMMC, src: 0x00078200, des: 0x01768000, size: 0x000ce800, part: 0
0.0;M3 CHK:0;cm4_sp_mode 0
MVN_1=0x00000000
MVN_2=0x00000000
[Image: g12b_v1.1.3390-6ac5299 2019-09-26 14:10:05 luan.yuan@droid15-sz]
OPS=0x10
ring efuse init
chipver efuse init
29 0b 10 00 01 25 14 00 00 11 39 32 34 54 31 50 
[0.018961 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE:  BL31: v1.3(release):4fc40b1
NOTICE:  BL31: Built : 15:58:17, May 22 2019
NOTICE:  BL31: G12A normal boot!
NOTICE:  BL31: BL33 decompress pass
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01 (Apr 25 2023 - 07:31:09)

DRAM:  3.8 GiB
Relocation Offset is: d6e42000
spi_post_bind(spifc): req_seq = 0
register usb cfg[0][1] = 00000000d7f39750
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.
MMC:   aml_priv->desc_buf = 0x00000000d3e32a70
aml_priv->desc_buf = 0x00000000d3e34db0
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, status=0x3ff2800
emmc/sd response timeout, cmd55, status=0x3ff2800
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x1, tx-dly 0, clock 40000000
aml_sd_retry_refix[983]:delay = 0x0,gadjust =0x2000
[mmc_startup] mmc refix success
init_part() 297: PART_TYPE_AML
[mmc_init] mmc init success
start dts,buffer=00000000d3e37620,dt_addr=00000000d3e37620
get_partition_from_dts() 91: ret 0
parts: 3
00:      logo	0000000000800000 1
01:   ramdisk	0000000002000000 1
02:    rootfs	ffffffffffffffff 4
init_part() 297: PART_TYPE_AML
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: 0x6c00000 
In:    serial
Out:   serial
Err:   serial
reboot_mode=cold_boot
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
_verify_dtb_checksum()-3477: calc 1bf1175c, store 1bf1175c
_verify_dtb_checksum()-3477: calc 1bf1175c, store 1bf1175c
dtb_read()-3694: total valid 2
update_old_dtb()-3675: do nothing
aml_i2c_init_port init regs for 0
fusb302_init: Device ID: 0x91
gpio: pin GPIOA_13 (gpio 77) value is 1
gpio: pin GPIOA_13 (gpio 77) value is 0
gpio: pin GPIOA_8 (gpio 72) value is 0

amlkey_init() enter!
[EFUSE_MSG]keynum is 1
vpu: clk_level in dts: 7
vpu: vpu_power_on
vpu: set clk: 666667000Hz, readback: 666666667Hz(0x100)
vpu: vpu_module_init_config
vpp: vpp_init
vpp: vpp osd2 matrix rgb2yuv..............
cvbs: cpuid:0x29
LCD_RESET PIN: 0
lcd: detect mode: tablet, key_valid: 0
lcd: detect lcd_clk_path: 1
lcd: load config from dts
lcd: pinctrl_version: 2
lcd: use panel_type=lcd_0
lcd: bl: pinctrl_version: 2
lcd: bl: name: backlight_pwm, method: 1
lcd: bl: aml_bl_power_ctrl: 0
Net:   dwmac.ff3f0000
amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 1
MACADDR:02:00:00:14:25:01(from chipid)

upgrade_step=2
reboot_mode:::: cold_boot

amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 1
[KM]Error:f[key_manage_query_size]L515:key[usid] not programed yet

mac address: c8:63:14:72:61:bc
[KM]Error:f[key_manage_query_size]L515:key[deviceid] not programed yet
edid preferred_mode is 1080p60hz[16]
hdr mode is 0
dv  mode is ver:0  len: 0
hdr10+ mode is 0
edid extension block number : 2
Dump EDID Rawdata
00ffffffffffff0010ac6640534543302215010380331d78ea0cb4a257519f27
0a5054a54b00714f8180d1c001010101010101010101023a801871382d40582c
4500fd1e1100001e000000ff00374335524a31384b304345530a000000fc0044
454c4c205032333131480a20000000fd00384c1e5311000a20202020202001be
02031b71230907078301000067030c002000802d43100403e2000f8c0ad08a20
e02d10103e9600a05a0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000018
Manufacturer: DEL Model 4066 Serial Number 809715027
EDID version: 1.3
Established timings supported:
  720x400@70Hz
  640x480@60Hz
  640x480@75Hz
  800x600@60Hz
  800x600@75Hz
  1024x768@60Hz
  1024x768@75Hz
  1280x1024@75Hz
Standard timings supported:
  1152x864@75Hz
  1280x1024@60Hz
  1920x1080@60Hz
Detailed mode (1) : Clock 148 MHz, 509 mm x 286 mm
               1920 2008 2052 2200 hborder 0
               1080 1084 1089 1125 vborder 0
               +hsync +vsync 
Serial number: 7C5RJ18K0CES
Monitor name: DELL P2311H
Monitor ranges (GTF): 56-76Hz V, 30-83kHz H, max dotclock 170MHz
Has 1 extension blocks
Checksum: 0xbe (valid)

CEA extension block
Extension version: 3
23 bytes of CEA data
    Linear PCM, max channels 2
  Vendor-specific data block, OUI 000c03 (HDMI)
    Supports_AI
    Maximum TMDS clock: 225MHz
    VIC  16 1920x1080@60Hz 
    VIC   4 1280x720@60Hz 
    VIC   3 720x480@60Hz 
    YCbCr quantization: (0)
    RGB quantization: (0)
    PT scan behaviour: (0)
    IT scan behaviour: (3)
    CE scan behaviour: (3)
Detailed mode (1) : Clock 27 MHz, 160 mm x 90 mm
                720  736  798  858 hborder 0
                480  489  495  525 vborder 0
               -hsync -vsync analog composite 
Checksum: 0x18 (valid)

khadas_support_mode 1080p60hz
bestmode is 1080p60hz, IEEEOUI 0x000c03
HDMI Mode
hpd_state=1
[OSD]load fb addr from dts:/meson-fb
[OSD]set initrd_high: 0x7f800000
[OSD]fb_addr for logo: 0x7f800000
[OSD]load fb addr from dts:/meson-fb
[OSD]fb_addr for logo: 0x7f800000
[OSD]VPP_OFIFO_SIZE:0xfff01fff
[CANVAS]canvas init
[CANVAS]addr=0x7f800000 width=5760, height=2160
card out
** Bad device mmc 0 **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
1080138 bytes read in 46 ms (22.4 MiB/s)
[OSD]osd_hw.free_dst_data: 0,1919,0,1079
[OSD]osd1_update_disp_freescale_enable
cvbs: outputmode[1080p60hz] is invalid
vpp: vpp_matrix_update: 2
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6  vid_clk_div = 1
hdmitx: set enc for VIC: 16
hdmitx phy setting done
enc_vpu_bridge_reset[1312]
rx version is 1.4 or below  div=10
vpp: Rx hdr_info.hdr_sup_eotf_smpte_st_2084 = 0

amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 1
[KM]Error:f[key_manage_query_size]L515:key[usid] not programed yet

mac address: c8:63:14:72:61:bc
[KM]Error:f[key_manage_query_size]L515:key[deviceid] not programed yet
gpio: pin GPIOAO_7 (gpio 7) value is 1
saradc: 0x285, hw_ver: 0x32 (VIM3.V12)
Product checking: pass! Hardware version: VIM3.V12
normal power on
boot wol: disable
port mode is usb3.0
Hit Enter or space or Ctrl+C key to stop autoboot -- :  1  0 
pll tsensor avg: 0x2204, u_efuse: 0x8112
temp1: 50
ddr tsensor avg: 0x222d, u_efuse: 0x80df
temp2: 52
device cool done
cfgload: start ...
cfgload: reading /boot.ini from mmc 0:1 ...
card out
** Bad device mmc 0 **
cfgload: no /boot.ini or empty file on mmc 0:1
cfgload: reading /boot/boot.ini from mmc 0:1 ...
card out
** Bad device mmc 0 **
cfgload: no /boot/boot.ini or empty file on mmc 0:1
cfgload: reading /boot.ini from mmc 1:1 ...
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
cfgload: no /boot.ini or empty file on mmc 1:1
cfgload: reading /boot/boot.ini from mmc 1:1 ...
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
cfgload: no /boot/boot.ini or empty file on mmc 1:1
cfgload: reading /boot/boot.ini from mmc 1:5 ...
10279 bytes read in 5 ms (2 MiB/s)
cfgload: applying boot.ini...
[#] Script a:d3e38fa0 l:10259 c:0 s:0 - run
Starting boot.ini...
saradc: 0x285, hw_ver: 0x32 (VIM3.V12)

mac address: c8:63:14:72:61:bc
uboot type: vendor
Scanning mmc 0:1...
card out
** Bad device mmc 0 **
Scanning mmc 0:5...
card out
** Bad device mmc 0 **
Scanning mmc 1:1...
** Unrecognized filesystem type **
Scanning mmc 1:5...
9169076 bytes read in 265 ms (33 MiB/s)
29245952 bytes read in 824 ms (33.8 MiB/s)
93256 bytes read in 9 ms (9.9 MiB/s)
4561 bytes read in 5 ms (890.6 KiB/s)
Import env.txt
Can not get u-boot part UUID, set to NULL
Booting legacy kernel...
port mode is usb3.0
Apply dtbo uart3
225 bytes read in 10 ms (21.5 KiB/s)
Apply dtbo pwm_f
345 bytes read in 9 ms (37.1 KiB/s)
Apply dtbo i2c3
223 bytes read in 8 ms (26.4 KiB/s)
Apply dtbo i2s
3330 bytes read in 8 ms (406.3 KiB/s)
Apply dtbo os08a10
1072 bytes read in 9 ms (116.2 KiB/s)
Apply dtbo watchdog
222 bytes read in 10 ms (21.5 KiB/s)
HDMI: Autodetect: 1080p60hz
## Loading init Ramdisk from Legacy Image at 13000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    9169012 Bytes = 8.7 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
   reserving fdt memory region: addr=1000000 size=17000
   Loading Ramdisk to 7ef41000, end 7f7ff874 ... OK
   Loading Device Tree to 000000001ffe6000, end 000000001fffffff ... OK

Starting kernel ...

uboot time: 5334356 us
[    0.365858@4] codec_mm_module_init
[    0.372645@4] clkmsr ffd18004.meson_clk_msr: failed to get msr ring reg0
[    0.550578@4] dmi: Firmware registration failed.
[    0.554169@4] lcd: error: failed to get null
[    0.554189@4] lcd: error: Out of clock range, reset to default setting
[    0.554265@4] lcd: error: lcd_debug_info_if is null
[    0.993076@3] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.014357@2] meson_cpufreq_init:don't find the node <dynamic_gp1_clk>
[    1.016184@2] meson_cpufreq_init:don't find the node <dynamic_gp1_clk>
[    1.017988@2] ff803000.serial: clock gate not found
[    1.073813@2] meson-remote ff808040.rc: don't find the node <led_blink>
[    1.074798@2] meson-remote ff808040.rc: don't find the node <led_blink_frq>
[    1.723039@0] efuse efuse:  open efuse clk gate error!!
[    1.756710@0] meson-fb meson-fb: create ion_client ffffffc09ac99540, handle=ffffffc09ac19a40
[    1.756715@0] meson-fb meson-fb: ion memory(0): created fb at 0x00000000e5800000, size 75 MiB
[    1.859285@1] di_get_vpu_clkb: get clk vpu error.
[    1.860460@1] get fclk_div5 err
[    1.861465@1] vdin_drv_probe: vdin cannot get msr clk !!!
[    1.867315@1] get fclk_div5 err
[    1.869982@1] vdin_drv_probe: vdin cannot get msr clk !!!
[    1.878021@1] amlvideo2 probe called
[    1.879102@2] amlvideo2 probe called
[    1.882711@2] Reserved memory: failed to init DMA memory pool at 0x00000000e3000000, size 0 MiB
[    1.894073@4] meson-mmc: >>>>>>>>hostbase ffffff80088f3000, dmode 
[    1.946252@1] meson-mmc: >>>>>>>>hostbase ffffff80088fc000, dmode 
[    1.987619@0] meson-mmc: >>>>>>>>hostbase ffffff8008b0a000, dmode 
[    1.990130@0] meson-mmc: Tuning transfer error: nmatch=0 tuning_err:0xffffffac
[    1.999604@0] meson-mmc: Tuning transfer error: nmatch=0 tuning_err:0xffffffac
[    2.007388@0] meson-mmc: Tuning transfer error: nmatch=0 tuning_err:0xffffffac
[    2.028090@0] cectx ff80023c.aocec: cec driver date:2019/6/13:early suspend not report pw status
[    2.028090@0] 
[    2.033141@0] cectx ff80023c.aocec: compatible:amlogic, aocec-g12a
[    2.039055@0] cectx ff80023c.aocec: cecb_ver:0x1
[    2.043695@0] cectx ff80023c.aocec: line_reg:0x1
[    2.048222@0] cectx ff80023c.aocec: line_bit:0x3
[    2.052822@0] cectx ff80023c.aocec: ee_to_ao:0x1
[    2.057735@0] cectx ff80023c.aocec: not find 'port_num'
[    2.062714@2] cectx ff80023c.aocec: using cec:1
[    2.067131@2] cectx ff80023c.aocec: no hdmirx regs
[    2.071877@2] cectx ff80023c.aocec: no hhi regs
[    2.076385@2] cectx ff80023c.aocec: not find 'output'
[    2.082858@2] cectx ff80023c.aocec: irq cnt:2
[    2.085866@2] cectx ff80023c.aocec: wakeup_reason:0x0
[    2.090825@2] cectx ff80023c.aocec: cev val1: 0x0;val2: 0x0
[    2.096317@2] cectx ff80023c.aocec: aml_cec_probe success end
[    2.554716@0] defendkey ff630218.defendkey: Reserved memory is not enough!
[    2.782759@2] asoc-aml-card auge_sound: control 2:0:0:I2SIn CLK:0 is already present
[    2.784855@2] snd_tdm ff642000.audiobus:tdma: ASoC: Failed to add I2SIn CLK: -16
[    2.792235@2] aml_dai_tdm_probe, failed add snd tdm controls
[    2.797860@2] asoc-aml-card auge_sound: control 2:0:0:I2SIn CLK:0 is already present
[    2.805570@2] snd_tdm ff642000.audiobus:tdmc: ASoC: Failed to add I2SIn CLK: -16
[    2.812936@2] aml_dai_tdm_probe, failed add snd tdm controls
[    3.190856@3] edt_ft5x06 3-0038: touchscreen probe failed
[    3.311663@3] thermal thermal_zone0: binding zone soc_thermal with cdev thermal-cpufreq-0 failed:-22
[    3.315203@3] thermal thermal_zone0: binding zo~

Hi numqq,
Do I need to try other images? Let me know if need I to try them, thanks

What you mean about this? It already boot up.

Hi numbqq,
Yes, it boots up, but it will be stuck while booting.
You could find the followings in the tail of my logs.

[    3.311663@3] thermal thermal_zone0: binding zone soc_thermal with cdev thermal-cpufreq-0 failed:-22
[    3.315203@3] thermal thermal_zone0: binding zo~

Hi numbqq,
From another ticket I mentioned in:

From Xiong.Zhang’s analysis, it has high probability the eMMC was broken, so I need a way to flash the ubuntu/android into the usb disk and boot system from the usb stick, then I could use my VIM3 to do something even if the eMMC was broken.
Could you help guide me how to reach this goal? Thanks in advance:)

Hello @Micky

Please remove all USB starages and TF cards and then try to flash Ubuntu to the eMMC.

Image: https://dl.khadas.com/products/vim3/firmware/ubuntu/emmc/vim3-ubuntu-20.04-gnome-linux-4.9-fenix-1.5-230425-emmc.img.xz

Docs: VIM3/3L Install OS into eMMC via USB Flash Tool [Khadas Docs]

Hi numbqq,
Got it, let me download and try it, will feedback to you later, thanks

Hi numbqq,
I flashed the image you mentioned, it will be stuck while booting up. Here is the log.

G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:0;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: 147824

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

Board ID = 7
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: 00028a54
eMMC boot @ 0
sw8 s
board id: 7
Load FIP HDR DDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
Get wrong ddr fw magic! Error!!
fw parse done
PIEI prepare done
00000000
emmc switch 1 ok
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

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 0000002b 00000028 0000002a 0000002a 00000029 00000028 00000029 00000029 00000028 00000027 00000028 00000028 00000029 0000002a 00000029 00000028 00000028 0000002a 0000002a 00000028 00000029 0000002a 00000029 00000028 00000029 00000029 0000002a 0000002a 0000002b 0000002a 00000028 00000029 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0004 
 dram_vref_reg_value 0x 00000012
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== 398
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 0 ok
Load FIP HDR from eMMC, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from eMMC, src: 0x00078200, des: 0x01768000, size: 0x000ce800, part: 0
0.0;M3 CHK:0;cm4_sp_mode 0
MVN_1=0x00000000
MVN_2=0x00000000
[Image: g12b_v1.1.3390-6ac5299 2019-09-26 14:10:05 luan.yuan@droid15-sz]
OPS=0x10
ring efuse init
chipver efuse init
29 0b 10 00 01 25 14 00 00 11 39 32 34 54 31 50 
[0.018961 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE:  BL31: v1.3(release):4fc40b1
NOTICE:  BL31: Built : 15:58:17, May 22 2019
NOTICE:  BL31: G12A normal boot!
NOTICE:  BL31: BL33 decompress pass
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01 (Apr 25 2023 - 08:03:44)

DRAM:  3.8 GiB
Relocation Offset is: d6e42000
spi_post_bind(spifc): req_seq = 0
register usb cfg[0][1] = 00000000d7f39750
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.
MMC:   aml_priv->desc_buf = 0x00000000d3e32a70
aml_priv->desc_buf = 0x00000000d3e34db0
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, status=0x3ff2800
emmc/sd response timeout, cmd55, status=0x3ff2800
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x1, tx-dly 0, clock 40000000
aml_sd_retry_refix[983]:delay = 0x0,gadjust =0x2000
[mmc_startup] mmc refix success
init_part() 297: PART_TYPE_AML
[mmc_init] mmc init success
start dts,buffer=00000000d3e37620,dt_addr=00000000d3e37620
get_partition_from_dts() 91: ret 0
parts: 3
00:      logo	0000000000800000 1
01:   ramdisk	0000000002000000 1
02:    rootfs	ffffffffffffffff 4
init_part() 297: PART_TYPE_AML
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: 0x6c00000 
In:    serial
Out:   serial
Err:   serial
reboot_mode=cold_boot
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
_verify_dtb_checksum()-3477: calc fb5daea5, store fb5daea5
_verify_dtb_checksum()-3477: calc fb5daea5, store fb5daea5
dtb_read()-3694: total valid 2
update_old_dtb()-3675: do nothing
aml_i2c_init_port init regs for 0
fusb302_init: Device ID: 0x91
CC connected in 1 as UFP
fusb302 detect chip.port_num = 0
gpio: pin GPIOA_13 (gpio 77) value is 1
gpio: pin GPIOA_13 (gpio 77) value is 0
gpio: pin GPIOA_8 (gpio 72) value is 0

amlkey_init() enter!
[EFUSE_MSG]keynum is 1
vpu: clk_level in dts: 7
vpu: vpu_power_on
vpu: set clk: 666667000Hz, readback: 666666667Hz(0x100)
vpu: vpu_module_init_config
vpp: vpp_init
vpp: vpp osd2 matrix rgb2yuv..............
cvbs: cpuid:0x29
LCD_RESET PIN: 0
lcd: detect mode: tablet, key_valid: 0
lcd: detect lcd_clk_path: 1
lcd: load config from dts
lcd: pinctrl_version: 2
lcd: use panel_type=lcd_0
lcd: bl: pinctrl_version: 2
lcd: bl: name: backlight_pwm, method: 1
lcd: bl: aml_bl_power_ctrl: 0
Net:   dwmac.ff3f0000
amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 1
MACADDR:02:00:00:14:25:01(from chipid)

upgrade_step=2
reboot_mode:::: cold_boot

amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 1
[KM]Error:f[key_manage_query_size]L515:key[usid] not programed yet

mac address: c8:63:14:72:61:bc
[KM]Error:f[key_manage_query_size]L515:key[deviceid] not programed yet
edid preferred_mode is <NULL>[0]
hdr mode is 0
dv  mode is ver:0  len: 0
hdr10+ mode is 0
HDMI cable is NOT connected
hpd_state=0
[OSD]load fb addr from dts:/meson-fb
[OSD]set initrd_high: 0x7f800000
[OSD]fb_addr for logo: 0x7f800000
[OSD]load fb addr from dts:/meson-fb
[OSD]fb_addr for logo: 0x7f800000
[OSD]VPP_OFIFO_SIZE:0xfff01fff
[CANVAS]canvas init
[CANVAS]addr=0x7f800000 width=5760, height=2160
card out
** Bad device mmc 0 **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
1080138 bytes read in 44 ms (23.4 MiB/s)
[OSD]osd_hw.free_dst_data: 0,1079,0,1919
[OSD]osd1_update_disp_freescale_enable
cvbs: outputmode[panel] is invalid
hdmitx: outputmode[panel] is invalid
vpp: vpp_matrix_update: 0
vpp: g12a/b post2(bit12) matrix: YUV limit -> RGB ..............
lcd: enable: TS050, mipi, 1080x1920@55.0Hz
lcd: tablet driver init(ver 20180718): mipi
lcd: lcd_pll_wait_lock: pll_lock=1, wait_loop=1
vpp: vpp_init_lcd_gamma_table
lcd: pixel_clk = 120.000MHz, bit_rate = 960.000MHz, lanebyteclk = 120.000MHz
lcd:  Waiting STOP STATE LANE
lcd: dsi init on
lcd: bl: set level: 100, last level: 0
lcd: bl: aml_bl_power_ctrl: 1
lcd: clear mute
vpp: Rx hdr_info.hdr_sup_eotf_smpte_st_2084 = 0

amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 1
[KM]Error:f[key_manage_query_size]L515:key[usid] not programed yet

mac address: c8:63:14:72:61:bc
[KM]Error:f[key_manage_query_size]L515:key[deviceid] not programed yet
gpio: pin GPIOAO_7 (gpio 7) value is 1
saradc: 0x285, hw_ver: 0x32 (VIM3.V12)
Product checking: pass! Hardware version: VIM3.V12
normal power on
boot wol: disable
port mode is usb3.0
Hit Enter or space or Ctrl+C key to stop autoboot -- :  1  0 
pll tsensor avg: 0x219b, u_efuse: 0x8112
temp1: 47
ddr tsensor avg: 0x21bb, u_efuse: 0x80df
temp2: 49
device cool done
cfgload: start ...
cfgload: reading /boot.ini from mmc 0:1 ...
card out
** Bad device mmc 0 **
cfgload: no /boot.ini or empty file on mmc 0:1
cfgload: reading /boot/boot.ini from mmc 0:1 ...
card out
** Bad device mmc 0 **
cfgload: no /boot/boot.ini or empty file on mmc 0:1
cfgload: reading /boot.ini from mmc 1:1 ...
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
cfgload: no /boot.ini or empty file on mmc 1:1
cfgload: reading /boot/boot.ini from mmc 1:1 ...
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
cfgload: no /boot/boot.ini or empty file on mmc 1:1
cfgload: reading /boot/boot.ini from mmc 1:5 ...
10279 bytes read in 5 ms (2 MiB/s)
cfgload: applying boot.ini...
[#] Script a:d3e38fa0 l:10259 c:0 s:0 - run
Starting boot.ini...
saradc: 0x285, hw_ver: 0x32 (VIM3.V12)

mac address: c8:63:14:72:61:bc
uboot type: vendor
Scanning mmc 0:1...
card out
** Bad device mmc 0 **
Scanning mmc 0:5...
card out
** Bad device mmc 0 **
Scanning mmc 1:1...
** Unrecognized filesystem type **
Scanning mmc 1:5...
9169199 bytes read in 265 ms (33 MiB/s)
29245952 bytes read in 829 ms (33.6 MiB/s)
93256 bytes read in 9 ms (9.9 MiB/s)
4561 bytes read in 5 ms (890.6 KiB/s)
Import env.txt
Can not get u-boot part UUID, set to NULL
Booting legacy kernel...
port mode is usb3.0
Apply dtbo uart3
225 bytes read in 9 ms (24.4 KiB/s)
Apply dtbo pwm_f
345 bytes read in 9 ms (37.1 KiB/s)
Apply dtbo i2c3
223 bytes read in 8 ms (26.4 KiB/s)
Apply dtbo i2s
3330 bytes read in 7 ms (463.9 KiB/s)
Apply dtbo os08a10
1072 bytes read in 9 ms (116.2 KiB/s)
Apply dtbo watchdog
222 bytes read in 10 ms (21.5 KiB/s)
HDMI: Autodetect: 1080p60hz
## Loading init Ramdisk from Legacy Image at 13000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    9169135 Bytes = 8.7 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
   reserving fdt memory region: addr=1000000 size=17000
   Loading Ramdisk to 7ef41000, end 7f7ff8ef ... OK
   Loading Device Tree to 000000001ffe6000, end 000000001fffffff ... OK

Starting kernel ...

uboot time: 5454590 us
[    0.365265@3] codec_mm_module_init
[    0.371704@3] clkmsr ffd18004.meson_clk_msr: failed to get msr ring reg0
[    0.550948@2] dmi: Firmware registration failed.
[    0.554784@2] lcd: error: failed to get null
[    0.554821@2] lcd: error: Out of clock range, reset to default setting
[    0.554894@2] lcd: error: lcd_debug_info_if is null
[    0.993853@2] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.015406@2] meson_cpufreq_init:don't find the node <dynamic_gp1_clk>
[    1.017181@2] meson_cpufreq_init:don't find the node <dynamic_gp1_clk>
[    1.018992@2] ff803000.serial: clock gate not found
[    1.074761@2] meson-remote ff808040.rc: don't find the node <led_blink>
[    1.075749@2] meson-remote ff808040.rc: don't find the node <led_blink_frq>
[    1.723808@0] efuse efuse:  open efuse clk gate error!!
[    1.757528@0] meson-fb meson-fb: create ion_client ffffffc09aed40c0, handle=ffffffc09b093e00
[    1.757532@0] meson-fb meson-fb: ion memory(0): created fb at 0x00000000e5800000, size 75 MiB
[    6.905197@0] di_get_vpu_clkb: get clk vpu error.
[    6.906480@1] get fclk_div5 err
[    6.907413@1] vdin_drv_probe: vdin cannot get msr clk !!!
[    6.913324@0] get fclk_div5 err
[    6.915919@0] vdin_drv_probe: vdin cannot get msr clk !!!
[    6.924323@0] amlvideo2 probe called
[    6.925018@0] amlvideo2 probe called
[    6.928967@0] Reserved memory: failed to init DMA memory pool at 0x00000000e3000000, size 0 MiB
[    6.941489@2] meson-mmc: >>>>>>>>hostbase ffffff80088f3000, dmode 
[    6.994780@0] meson-mmc: >>>>>>>>hostbase ffffff80088fc000, dmode 
[    7.036311@1] meson-mmc: >>>>>>>>hostbase ffffff8008b0a000, dmode 
[    7.038894@0] meson-mmc: Tuning transfer error: nmatch=0 tuning_err:0xffffffac
[    7.048130@0] meson-mmc: Tuning transfer error: nmatch=0 tuning_err:0xffffffac
[    7.056008@0] meson-mmc: Tuning transfer error: nmatch=0 tuning_err:0xffffffac
[    7.076615@1] cectx ff80023c.aocec: cec driver date:2019/6/13:early suspend not report pw status
[    7.076615@1] 
[    7.081967@1] cectx ff80023c.aocec: compatible:amlogic, aocec-g12a
[    7.087584@1] cectx ff80023c.aocec: cecb_ver:0x1
[    7.092290@1] cectx ff80023c.aocec: line_reg:0x1
[    7.096831@1] cectx ff80023c.aocec: line_bit:0x3
[    7.101378@2] cectx ff80023c.aocec: ee_to_ao:0x1
[    7.106118@2] cectx ff80023c.aocec: not find 'port_num'
[    7.111134@2] cectx ff80023c.aocec: using cec:1
[    7.115670@2] cectx ff80023c.aocec: no hdmirx regs
[    7.120410@2] cectx ff80023c.aocec: no hhi regs
[    7.124913@2] cectx ff80023c.aocec: not find 'output'
[    7.131385@2] cectx ff80023c.aocec: irq cnt:2
[    7.134404@2] cectx ff80023c.aocec: wakeup_reason:0x0
[    7.139353@2] cectx ff80023c.aocec: cev val1: 0x0;val2: 0x0
[    7.144854@2] cectx ff80023c.aocec: aml_cec_probe success end
[    7.597330@2] defendkey ff630218.defendkey: Reserved memory is not enough!
[    7.815540@1] asoc-aml-card auge_sound: control 2:0:0:I2SIn CLK:0 is already present
[    7.817639@1] snd_tdm ff642000.audiobus:tdma: ASoC: Failed to add I2SIn CLK: -16
[    7.825020@1] aml_dai_tdm_probe, failed add snd tdm controls
[    7.830647@1] asoc-aml-card auge_sound: control 2:0:0:I2SIn CLK:0 is already present
[    7.838355@1] snd_tdm ff642000.audiobus:tdmc: ASoC: Failed to add I2SIn CLK: -16
[    7.845745@2] aml_dai_tdm_probe, failed add snd tdm controls
[    8.215498@4] edt_ft5x06 3-0038: touchscreen probe failed
[    8.337622@2] thermal thermal_zone0: binding zone soc_thermal with cdev thermal-cpufreq-0 failed:-22
[    8.341162@2] thermal thermal_zone0: binding zon

Hello @Micky

How you supply the power ? Do you use our 24W PD adaptor?

Hi numbqq,
I think you found the root cause for the problem (failed to boot from eMMC ubuntu) on my vim3 :slight_smile:
I changed to your 24W PD power adapter, it could bring up successfully with the ubuntu image in eMMC.

The rest query from my side is the initial one, which is how to boot from U-disk image (ubuntu) when eMMC is flashed with image (ubuntu or android) ? Currently I found my vim3 will boot from eMMC by default, can I change it to boot from ubuntu in external U-disk?

Nice.

Just write the SD-USB image to USB storage and then insert the USB storage to USB host and power on the board then it will boot from USB storage.

SD-USB images: dl.khadas.com - Index of /products/vim3/firmware/ubuntu/generic/
Write image to USB storage: VIM3/3L Install OS into External Storage [Khadas Docs]

Hi numbqq,
Got it, let me try this way as you mentioned. Will update to you soon, thanks

Hi numbqq,
I recall you mentioned if I’m using AOSP version in eMMC, it doesn’t support to boot system from the USB storage. May I know the following info?

  1. Which Android/kernel starts to not support to boot system from the USB storage? the versions upper than kernel 4.9? Then I could avoid to use these versions in eMMC if I need to boot from USB storage.
  2. If I’m using ubuntu in eMMC, when I insert the USB storage to USB host, it will try to boot from USB storage first, correct? (ubuntu in eMMC doesn’t have the limitation as metioned in item1?)
  3. You mentioned “USB host”, there are two USB ports in my VIM3, are both of them USB host port?

Hi numbqq,
I flashed vim3-android-9-64bit-v230719.img into eMMC, and flashed vim3-ubuntu-22.04-server-linux-6.1-fenix-1.4-221229.img.xz into USB storage by the tool balenaEtcher. I found system will boot from eMMC, I tried to insert the USB storage into both USB port on my VIM3, the results are the same. Here is the boot log.

G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:0;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: 153015

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

Board ID = 8
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: 00029e9a
eMMC boot @ 0
sw8 s
board id: 8
Load FIP HDR DDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
Get wrong ddr fw magic! Error!!
fw parse done
PIEI prepare done
00000000
emmc switch 1 ok
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

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 00000026 00000026 00000027 00000027 00000026 00000025 00000025 00000027 00000026 00000024 00000027 00000025 00000025 00000025 00000028 00000026 00000025 00000025 00000026 00000026 00000024 00000024 00000026 00000026 00000025 00000027 00000026 00000026 00000025 00000026 00000026 00000024 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0004 
 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== 444
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 0 ok
Load FIP HDR from eMMC, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from eMMC, src: 0x00078200, des: 0x01768000, size: 0x000e4800, part: 0
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 15 19 00 00 15 31 34 32 58 33 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-gb6634a96e4-dirty (Jul 19 2023 - 20:54:20)

DRAM:  3.8 GiB
Relocation Offset is: d6e1d000
mmu cfg end: 0xe0000000
mmu cfg end: 0xe0000000
spi_post_bind(spifc): req_seq = 0
board init
register usb cfg[0][1] = 00000000d7f30708
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 = 0x00000000d3e0da70
aml_priv->desc_buf = 0x00000000d3e0fdb0
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=0x3ff2800
emmc/sd response timeout, cmd55, cmd->cmdarg=0x0, status=0x3ff2800
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() 297: PART_TYPE_AML
[mmc_init] mmc init success
start dts,buffer=00000000d3e12620,dt_addr=00000000d3e12620
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() 297: PART_TYPE_AML
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
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
_verify_dtb_checksum()-3354: calc 1b498a99, store 1b498a99
_verify_dtb_checksum()-3354: calc 1b498a99, store 1b498a99
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
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.ff3f0000 Waiting for PHY auto negotiation to complete.... done
The Best Window is index 38
[KM]Msg:isEncrypt=
[KM]Msg:keyAttr is 0x00000000
dwmac.ff3f0000amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 1

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

wipe_data=successful
wipe_cache=successful
upgrade_step=2
aml log : internal sys error!
reboot_mode:::: cold_boot
lcd: error: outputmode[576cvbs] is not support
hpd_state=0
do_hpd_detect: hdmimode=1080p60hz
do_hpd_detect: colorattribute=444,8bit
Saving Environment to aml-storage...
mmc env offset: 0x4d400000 
Writing to MMC(1)... done
no sink, fallback to 720p60hz[4]
hdr mode is 0
dv  mode is ver:0  len: 0
hdr10+ mode is 0
read hdmichecksum 0x00000000, colorattribute 444,8bit
read hdmimode 1080p60hz, colorspace <NULL>, colordepth <NULL>
do_get_parse_edid: autoMode = false, manualMode=16
isYuv4kSink: false, maxTMDSRate=150
do_get_parse_edid: non-yuv4k sink: inColorSpace: HDMI_COLOR_FORMAT_RGB
do_get_parse_edid: default inColorDepth: HDMI_COLOR_DEPTH_24B
TV is same, initial mode is: 576cvbs attr: 444,8bit
HDMI cable is NOT connected
Unknown command 'dovi' - try 'help'
[OSD]load fb addr from dts:/meson-fb
[OSD]set initrd_high: 0x7f800000
[OSD]fb_addr for logo: 0x7f800000
[OSD]load fb addr from dts:/meson-fb
[OSD]fb_addr for logo: 0x7f800000
[OSD]VPP_OFIFO_SIZE:0xfff01fff
[CANVAS]canvas init
[CANVAS]addr=0x7f800000 width=3840, height=2160
[OSD]osd_hw.free_dst_data: 0,719,0,575
[OSD]osd1_update_disp_freescale_enable
hdmitx: outputmode[576cvbs] is invalid
lcd: error: outputmode[576cvbs] is not support
hdr_packet
vpp: hdr_policy = 1
vpp: Rx hdr_info.hdr_sup_eotf_smpte_st_2084 = 0
s_version: U-Boot 2015.01-gb6634a96e4-dirty


normal power on
boot wol: disable
[reg_31] 0xd8a
[reg_16] 0x0
[reg_17] 0x7fff
[reg_19] 0x0
[reg_31] 0x0
[reg_31] 0xd40
[reg_22] 0x0
[reg_31] 0x0
saradc: 0x287, hw_ver: 0x32 (VIM3.V12)
gpio: pin GPIOAO_7 (gpio 7) value is 1
port mode is usb3.0
Command: bcb uboot-command 
Start read misc partition datas!
BCB hasn't any datas,exit!
s_version: U-Boot 2015.01-gb6634a96e4-dirty


Hit Enter or space or Ctrl+C key to stop autoboot -- :  1  0 
cfgload: start ...
cfgload: reading /boot.ini from mmc 0:1 ...
card out
** Bad device mmc 0 **
cfgload: no /boot.ini or empty file on mmc 0:1
cfgload: reading /boot.ini from mmc 1:1 ...
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
cfgload: no /boot.ini or empty file on mmc 1:1
cfgload: reading /boot/boot.ini from mmc 1:5 ...
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
cfgload: no /boot/boot.ini or empty file on mmc 1:5
cfgload: failed to read boot.ini on all partitions!
CONFIG_SYSTEM_AS_ROOT: systemroot 
system_mode: 1
active_slot: normal
avb2: 0
ee_gate_off ...
avb2: 0
## Booting Android Image at 0x03080000 ...
Kernel command line: androidboot.dtbo_idx=0 --cmdline root=/dev/mmcblk0p18 buildvariant=userdebug
[store]Is good fdt check header, no need decrypt!
active_slot is normal
load dtb from 0x1000000 ......
find 1 dtbos
dtbos to be applied: 0
Apply dtbo 0
   Uncompressing Kernel Image ... OK
   kernel loaded at 0x01080000, end = 0x0265f808
   Loading Device Tree to 000000001ffe5000, end 000000001ffffdb8 ... OK
fdt_fixup_memory_banks, reg:0000000000000000

Starting kernel ...

uboot time: 5570353 us
[    0.000000@0] Booting Linux on physical CPU 0x0
[    0.000000@0] Linux version 4.9.113-g7f3f7f3ef13b-dirty (xiong@server) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02) ) #1 SMP PREEMPT Wed Jul 19 19:50:41 CST 2023
[    0.000000@0] Boot CPU: AArch64 Processor [410fd034]
[    0.000000@0] earlycon: aml-uart0 at MMIO 0x00000000ff803000 (options '')
[    0.000000@0] bootconsole [aml-uart0] enabled
[    0.000000@0] 	07400000 - 07500000,     1024 KB, ramoops@0x07400000
[    0.000000@0] fdt_init_reserved_mem, start:0x0000000005000000, end:0x0000000005400000, len:4 MiB
[    0.000000@0] 	05000000 - 05400000,     4096 KB, linux,secmon
[    0.000000@0] fdt_init_reserved_mem, start:0x000000007f800000, end:0x0000000080000000, len:8 MiB
[    0.000000@0] 	7f800000 - 80000000,     8192 KB, linux,meson-fb
[    0.000000@0] 	d0000000 - d8000000,   131072 KB, linux,ion-dev
[    0.000000@0] 	cd800000 - d0000000,    40960 KB, linux,di_cma
[    0.000000@0] Reserved memory: created DMA memory pool at 0x00000000cd800000, size 0 MiB
[    0.000000@0] 	cd800000 - cd800000,        0 KB, linux,ppmgr
[    0.000000@0] 	ba400000 - cd800000,   315392 KB, linux,codec_mm_cma
[    0.000000@0] 	ba400000 - ba400000,        0 KB, linux,codec_mm_reserved
[    0.000000@0] 	b6400000 - ba400000,    65536 KB, linux,vdin0_cma
[    0.000000@0] 	b2400000 - b6400000,    65536 KB, linux,vdin1_cma
[    0.000000@0] 	b1400000 - b2400000,    16384 KB, linux,galcore
[    0.000000@0] 	a9400000 - b1400000,   131072 KB, linux,isp_cma
[    0.000000@0] 	a7c00000 - a9400000,    24576 KB, linux,adapt_cma
[    0.000000@0] cma: Reserved 8 MiB at 0x00000000a7400000
[    0.000000@0] psci: probing for conduit method from DT.
[    0.000000@0] psci: PSCIv1.0 detected in firmware.
[    0.000000@0] psci: Using standard PSCI v0.2 function IDs
[    0.000000@0] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000@0] psci: SMC Calling Convention v1.1
[    0.000000@0] percpu: Embedded 26 pages/cpu @ffffffc0a72e5000 s68952 r8192 d29352 u106496
[    0.000000@0] Detected VIPT I-cache on CPU0
[    0.000000@0] CPU features: enabling workaround for ARM erratum 845719
[    0.000000@0] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 870912
[    0.000000@0] Kernel command line: init=/init console=ttyS0,115200 no_console_suspend earlycon=aml-uart,0xff803000 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 hdr_policy=1 hdr_priority= otg_device=1 reboot_mode_android=normal logo=osd0,loaded,0x3d800000 fb_width=1920 fb_height=1080 vout2=,enable vout=576cvbs,enable panel_type=lcd_1 lcd_ctrl=0x00000083 hdmitx=,444,8bit hdmimode=1080p60hz nativeui=disable hdmichecksum=0x00000000 dolby_vision_on=0 frac_rate_policy=1 hdmi_read_edid=1 cvbsmode=576cvbs osd_reverse=0 video_reverse=0 irq_check_en=0 androidboot.selinux=permissive androidboot.firstboot=0 jtag=disable wol_enable=0 spi_state=0 fusb302_state=1 hwver=VIM3.V12 factory_mac=c8:63:14:72:4c:d0 lcd_exist=0 ext_board_exist=0 androidboot.hardware=amlogic androidboot.bootloader=U-Boot 2015.01-gb6634a96e4-dirty androidboot.build.expect.baseband=N/A androidboot.serialno=c86314724cd0 mac=c8:63:14:72:4c:d0 androidboot.mac=c8:63:14:72:4c:d0 khadas_mipi_id=0 khadas_came
[    0.000000@0] am_vecm: boot hdr_policy: 1
[    0.000000@0] fb: osd0
[    0.000000@0] fb: loaded
[    0.000000@0] fb: 0x3d800000
[    0.000000@0] fb: logo_info.fb_width=1920
[    0.000000@0] fb: logo_info.fb_height=1080
[    0.000000@0] vout: error: get_vout2_init_mode: 
[    0.000000@0] vout: vout2: enable: 1
[    0.000000@0] vout: 576cvbs
[    0.000000@0] vout: enable: 1
[    0.000000@0] lcd: panel_type: lcd_1
[    0.000000@0] lcd: lcd_ctrl: 0x00000083
[    0.000000@0] vout: get hdmimode: 1080p60hz
[    0.000000@0] jason hdmichecksum: 0x00000000
[    0.000000@0] vout: get hdmi checksum: 0x00000000
[    0.000000@0] vout: get cvbsmode: 576cvbs
[    0.000000@0] vpp_axis_reverse: bootargs is 0
[    0.000000@0] DI: di_read_canvas_reverse: bootargs is 0.
[    0.000000@0] vdin_get_video_reverse: bootargs is 0.
[    0.000000@0] phlock_phase_config: bootargs is 0.
[    0.000000@0] init_wol_state, wol_enable=0
[    0.000000@0] jason lcd_exist: 0
[    0.000000@0] ext_board_exist: 0

......

Hi numbqq,
I flashed vim3-android-9-64bit-v230719.img into eMMC, and flashed vim3-ubuntu-22.04-server-linux-6.1-fenix-1.4-221229.img.xz into micro-sd card by the tool balenaEtcher. I found system will boot from micro-sd. Here is the boot log.

G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:0;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: 197848

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

Board ID = 8
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: 00034dbc
eMMC boot @ 0
sw8 s
board id: 8
Load FIP HDR DDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
Get wrong ddr fw magic! Error!!
fw parse done
PIEI prepare done
00000000
emmc switch 1 ok
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

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 00000026 00000026 00000027 00000027 00000026 00000025 00000024 00000027 00000025 00000024 00000026 00000024 00000025 00000025 00000027 00000025 00000025 00000025 00000026 00000026 00000024 00000024 00000025 00000026 00000024 00000026 00000026 00000026 00000025 00000026 00000026 00000023 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0004 
 dram_vref_reg_value 0x 00000016
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== 444
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 0 ok
Load FIP HDR from eMMC, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from eMMC, src: 0x00078200, des: 0x01768000, size: 0x000e4800, part: 0
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 15 19 00 00 15 31 34 32 58 33 50 
[0.016073 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-gb6634a96e4-dirty (Jul 19 2023 - 20:54:20)

DRAM:  3.8 GiB
Relocation Offset is: d6e1d000
mmu cfg end: 0xe0000000
mmu cfg end: 0xe0000000
spi_post_bind(spifc): req_seq = 0
board init
register usb cfg[0][1] = 00000000d7f30708
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 = 0x00000000d3e0da70
aml_priv->desc_buf = 0x00000000d3e0fdb0
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=0x3ff2800
emmc/sd response timeout, cmd55, cmd->cmdarg=0x0, status=0x3ff2800
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() 297: PART_TYPE_AML
[mmc_init] mmc init success
start dts,buffer=00000000d3e12620,dt_addr=00000000d3e12620
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() 297: PART_TYPE_AML
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
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
_verify_dtb_checksum()-3354: calc 1b498a99, store 1b498a99
_verify_dtb_checksum()-3354: calc 1b498a99, store 1b498a99
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
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.ff3f0000 Waiting for PHY auto negotiation to complete.... done
The Best Window is index 39
[KM]Msg:isEncrypt=
[KM]Msg:keyAttr is 0x00000000
dwmac.ff3f0000amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 1

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

wipe_data=successful
wipe_cache=successful
upgrade_step=2
aml log : internal sys error!
reboot_mode:::: cold_boot
lcd: error: outputmode[null] is not support
hpd_state=0
do_hpd_detect: hdmimode=1080p60hz
do_hpd_detect: colorattribute=444,8bit
Saving Environment to aml-storage...
mmc env offset: 0x4d400000 
Writing to MMC(1)... done
no sink, fallback to 720p60hz[4]
hdr mode is 0
dv  mode is ver:0  len: 0
hdr10+ mode is 0
read hdmichecksum 0x00000000, colorattribute 444,8bit
read hdmimode 1080p60hz, colorspace <NULL>, colordepth <NULL>
do_get_parse_edid: autoMode = false, manualMode=16
isYuv4kSink: false, maxTMDSRate=150
do_get_parse_edid: non-yuv4k sink: inColorSpace: HDMI_COLOR_FORMAT_RGB
do_get_parse_edid: default inColorDepth: HDMI_COLOR_DEPTH_24B
TV is same, initial mode is: 576cvbs attr: 444,8bit
HDMI cable is NOT connected
Unknown command 'dovi' - try 'help'
[OSD]load fb addr from dts:/meson-fb
[OSD]set initrd_high: 0x7f800000
[OSD]fb_addr for logo: 0x7f800000
[OSD]load fb addr from dts:/meson-fb
[OSD]fb_addr for logo: 0x7f800000
[OSD]VPP_OFIFO_SIZE:0xfff01fff
[CANVAS]canvas init
[CANVAS]addr=0x7f800000 width=3840, height=2160
[OSD]osd_hw.free_dst_data: 0,719,0,575
[OSD]osd1_update_disp_freescale_enable
hdmitx: outputmode[576cvbs] is invalid
lcd: error: outputmode[576cvbs] is not support
hdr_packet
vpp: hdr_policy = 1
vpp: Rx hdr_info.hdr_sup_eotf_smpte_st_2084 = 0
s_version: U-Boot 2015.01-gb6634a96e4-dirty


normal power on
boot wol: disable
[reg_31] 0xd8a
[reg_16] 0x0
[reg_17] 0x7fff
[reg_19] 0x0
[reg_31] 0x0
[reg_31] 0xd40
[reg_22] 0x0
[reg_31] 0x0
saradc: 0x287, hw_ver: 0x32 (VIM3.V12)
gpio: pin GPIOAO_7 (gpio 7) value is 1
port mode is usb3.0
Command: bcb uboot-command 
Start read misc partition datas!
BCB hasn't any datas,exit!
s_version: U-Boot 2015.01-gb6634a96e4-dirty


Hit Enter or space or Ctrl+C key to stop autoboot -- :  1  0 
cfgload: start ...
cfgload: reading /boot.ini from mmc 0:1 ...
card in
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 40000000
[set_emmc_calc_fixed_adj][875]find fixed adj_delay=20
init_part() 282: PART_TYPE_DOS
[mmc_init] mmc init success
reading /boot.ini
10279 bytes read in 3 ms (3.3 MiB/s)
cfgload: applying boot.ini...
[#] Script a:d3e18680 l:10259 c:0 s:0 - run
Starting boot.ini...

saradc: 0x287, hw_ver: 0x32 (VIM3.V12)

mac address: c8:63:14:72:4c:d0
uboot type: vendor
Scanning mmc 0:1...
reading uInitrd
10666284 bytes read in 577 ms (17.6 MiB/s)
reading zImage
22921224 bytes read in 1240 ms (17.6 MiB/s)
reading dtb.img
78561 bytes read in 7 ms (10.7 MiB/s)
reading /boot/env.txt
** Unable to read file /boot/env.txt **
reading env.txt
4561 bytes read in 4 ms (1.1 MiB/s)
Import env.txt
Booting mainline kernel...
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND

port mode is usb3.0
Apply dtbo uart3
reading /dtb/amlogic/overlays/kvim3/uart3.dtbo
345 bytes read in 7 ms (47.9 KiB/s)
Apply dtbo pwm_f
reading /dtb/amlogic/overlays/kvim3/pwm_f.dtbo
** Unable to read file /dtb/amlogic/overlays/kvim3/pwm_f.dtbo **
Apply dtbo i2c3
reading /dtb/amlogic/overlays/kvim3/i2c3.dtbo
415 bytes read in 8 ms (49.8 KiB/s)
Apply dtbo i2s
reading /dtb/amlogic/overlays/kvim3/i2s.dtbo
520 bytes read in 8 ms (63.5 KiB/s)
Apply dtbo os08a10
reading /dtb/amlogic/overlays/kvim3/os08a10.dtbo
** Unable to read file /dtb/amlogic/overlays/kvim3/os08a10.dtbo **
Apply dtbo watchdog
reading /dtb/amlogic/overlays/kvim3/watchdog.dtbo
** Unable to read file /dtb/amlogic/overlays/kvim3/watchdog.dtbo **
HDMI: Autodetect: 1080p60hz
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
## Loading init Ramdisk from Legacy Image at 13000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    10666220 Bytes = 10.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
active_slot is normal
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 04080000
   Booting using the fdt blob at 0x4080000
find 1 dtbos
No androidboot.dtbo_idx configured
And no dtbos will be applied
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
   reserving fdt memory region: addr=4080000 size=14000
   Loading Ramdisk to 7edd3000, end 7f7ff0ec ... OK
   Loading Device Tree to 000000001ffe9000, end 000000001fffffff ... OK
fdt_fixup_memory_banks, reg:0000000000000000

Starting kernel ...

uboot time: 7320208 us
[    4.781558] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4359-sdio for chip BCM4359/9
[    5.283271] panfrost ffe40000.gpu: error -ENODEV: _opp_set_regulators: no regulator (mali) found
[    5.285467] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[    5.297837] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4359/9 wl0: Feb 22 2022 19:34:20 version 9.87.51.11.82 (g383358a) FWID 01-cd4b2098
[   37.199906] ieee80211 phy0: brcmf_dongle_roam: WLC_SET_ROAM_TRIGGER error (-52)

Ubuntu 22.04.1 LTS Khadas ttyAML0

Khadas login: 

If you have android it eMMC you may need to try Keys mode to boot from the USB storage.

https://docs.khadas.com/products/sbc/vim3/install-os/boot-into-upgrade-mode#key-mode