VIM3/VIM3L AOSP Android 14.0 Upside Down Cake

Hi, I performed the steps as you suggested with no luck. Kernel do not boot up.

Couple of points I see:

  • I pressed R button after: fastboot erase bootenv && fastboot oem format && fastboot reboot bootloader
  • I pressed R button after: fastboot flash boot_a boot.img …fastboot flash vbmeta_b vbmeta.img

After last R button I pressed enter button to setup using Serial debugger:

setenv force_avb 1
saveenv

I am doing anything wrong?

@nadales

fastboot erase bootenv && fastboot oem format && fastboot reboot bootloader

You need to press the R key after executing this

1 Like

@xiong.zhang I tried the whole setup and found missing partition outputs looking to serial console. Is any previous step I need to perform to get proper partition table?

Logs from last step (flashing img files):
Flashing sparse image at offset 304128
Flashing Sparse Image
… wrote 782131200 bytes to ‘super’
Starting download of 29675668 bytes




downloading of 29675668 bytes finished
Flashing sparse image at offset 304128
Flashing Sparse Image
… wrote 30224384 bytes to ‘super’
** Bad device specification mmc userdata_a **
** Bad device specification mmc userdata_a **
Couldn’t find partition mmc userdata_a
Starting download of 2314516 bytes

downloading of 2314516 bytes finished
Flashing sparse image at offset 6628352
Flashing Sparse Image
… wrote 19013632 bytes to ‘userdata’
** Bad device specification mmc dtbo_a_a **
** Bad device specification mmc dtbo_a_a **
Couldn’t find partition mmc dtbo_a_a
Starting download of 4600 bytes

downloading of 4600 bytes finished
Flashing Raw Image
… wrote 4608 bytes to ‘dtbo_a’
** Bad device specification mmc dtbo_b_a **
** Bad device specification mmc dtbo_b_a **
Couldn’t find partition mmc dtbo_b_a
Starting download of 4600 bytes

downloading of 4600 bytes finished
Flashing Raw Image
… wrote 4608 bytes to ‘dtbo_b’
** Bad device specification mmc misc_a **
** Bad device specification mmc misc_a **
Couldn’t find partition mmc misc_a
Erasing blocks 5120 to 6144 due to alignment
… erased 524288 bytes from ‘misc’
** Bad device specification mmc frp_a **
** Bad device specification mmc frp_a **
Couldn’t find partition mmc frp_a
Erasing blocks 6144 to 7168 due to alignment
… erased 524288 bytes from ‘frp’
** Bad device specification mmc metadata_a **
** Bad device specification mmc metadata_a **
Couldn’t find partition mmc metadata_a
Starting download of 45132 bytes

downloading of 45132 bytes finished
Flashing sparse image at offset 6595584
Flashing Sparse Image
… wrote 45056 bytes to ‘metadata’
** Bad device specification mmc vbmeta_a_a **
** Bad device specification mmc vbmeta_a_a **
Couldn’t find partition mmc vbmeta_a_a
Starting download of 4096 bytes

downloading of 4096 bytes finished
Flashing Raw Image
… wrote 4096 bytes to ‘vbmeta_a’
** Bad device specification mmc vbmeta_b_a **
** Bad device specification mmc vbmeta_b_a **
Couldn’t find partition mmc vbmeta_b_a
Starting download of 4096 bytes

downloading of 4096 bytes finished
Flashing Raw Image
… wrote 4096 bytes to ‘vbmeta_b’

Hi, I’ve just uploaded the binaries to the board with some modifications to add a new system service, and a new app to test the system service. What’s happening is that when I open the ADB and try to execute almost any default common command, I’ve got the following error:

Captura de pantalla 2024-09-23 a las 13.17.56

I’ve just followed all the processes described in the post, is there anything I need to add to the compilation?

Hey guys, just realize that @xiong.zhang instructions were based on Ubuntu and I am working with Windows.

Could be needed any change to use generated mke2fs?

Hello, the above instructions need to be executed on Ubuntu. The burn package we provide contains mke2fs, which can be used directly

1 Like

I am able to run these commands in Ubuntu (WSL2) but get following error when running fastboot format metadata:

/home/nadales/workspace/vim3-u-aosp-v240613/mke2fs failed with status 1
fastboot: error: Cannot generate image for metadata

Could you help me with this new issue?
I am using a Basic VIM3 board (no L).

@nadales Here is the solution

1 Like

Thanks, now process is completed (problem was mke2fs does not have execution permission).

Now I have another problem, it seems kernel keeps restarting.

There are several errors shown using serial port.

but this is the extract of a finish and restart:

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 13 21 00 00 15 31 34 32 58 33 50
[0.900373 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... OK

@nadales The folder we uploaded contains mke2fs

Here is the solution

Unfortunately this step does not solve my issue.

I have done that step and double checked that force_avb is 1 after reset.

Here is the last log:


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... OK
In:    usbkbd,serial
Out:   vidconsole,serial
Err:   vidconsole,serial
Net:   eth0: ethernet@ff3f0000
Hit any key to stop autoboot:  0
Verify GPT: success!
dev: pinctrl@14
dev: pinctrl@40
gpio: pin 88 (gpio 88) value is 1
syntax error
Loading Android boot partition...
switch to partitions #0, OK
mmc2(part 0) is current device
misc partition number:0x2
Android boot failed, error -22.
A/B cmdline addition: androidboot.slot_suffix=_
## Android Verified Boot 2.0 version 1.1.0
read_is_device_unlocked not supported yet
Can't find partition 'vbmeta_'
Can't find partition 'boot_'
avb_slot_verify.c:638: ERROR: boot_: Error loading footer.
I/O error occurred during verification
AVB verification failed.
mmc - MMC sub system

Usage:
mmc info - display info of the current MMC device
mmc read addr blk# cnt
mmc write addr blk# cnt
mmc erase blk# cnt
mmc rescan [mode]
mmc part - lists available partition on current mmc device
mmc dev [dev] [part] [mode] - show or set current mmc device [partition] and set mode
  - the required speed mode is passed as the index from the following list
    [MMC_LEGACY, MMC_HS, SD_HS, MMC_HS_52, MMC_DDR_52, UHS_SDR12, UHS_SDR25,
    UHS_SDR50, UHS_DDR50, UHS_SDR104, MMC_HS_200, MMC_HS_400, MMC_HS_400_ES]
mmc list - lists available devices
mmc wp [PART] - power on write protect boot partitions
  arguments:
   PART - [0|1]
       : 0 - first boot partition, 1 - second boot partition
         if not assigned, write protect all boot partitions
mmc hwpartition <USER> <GP> <MODE> - does hardware partitioning
  arguments (sizes in 512-byte blocks):
   USER - <user> <enh> <start> <cnt> <wrrel> <{on|off}>
        : sets user data area attributes
   GP - <{gp1|gp2|gp3|gp4}> <cnt> <enh> <wrrel> <{on|off}>
        : general purpose partition
   MODE - <{check|set|complete}>
        : mode, complete set partitioning completed
  WARNING: Partitioning is a write-once setting once it is set to complete.
  Power cycling is required to initialize partitions after set to complete.
mmc setdsr <value> - set DSR register value

Failed to boot Android...

Is there this prompt after burning

@xiong.zhang Does the LE Audio working on this Android 14 release/image?

@xiong.zhang Also, how can I download/repo the code from China?

May not be applicable

@xiong.zhang I meet following error, how to resolve it?

$ source build/envsetup.sh && lunch yukawa-user/yukawa-userdebug

build/make/core/version_util.mk:29: warning: Invalid TARGET_PLATFORM_VERSION ‘userdebug’, must be one of
In file included from build/make/core/config.mk:359:
In file included from build/make/core/envsetup.mk:68:
In file included from build/make/core/version_defaults.mk:110:
build/make/core/version_util.mk:30: error: UP1A UP1B UP2A UP2B UD1A UD1B UD2A UD2B UQ1A UQ1B UQ2A UQ2B UQ3A UQ3B VP1A.
18:13:13 dumpvars failed with: exit status 1

@xiong.zhang I checked the make repo info:

~/android/khadas-aosp-14/build/make ] $ git branch -vv
* (no branch) e57083f098 Version bump to UP1A.231105.003.A1 [core/build_id.mk]

Is this correct? Or any way to figure out the problem?

You only need to select one for this,Yukawa user or Yukawa user debug

Gotta, this is the problem. Thanks.

@xiong.zhang At the end of compiling, I notice a error:

2024-11-25 12:21:46 - build_super_image.py - INFO    : Building super image from info dict...
2024-11-25 12:21:46 - common.py - INFO    :   Running: "/home/XXX/android/khadas-aosp-14/out/host/linux-x86/bin/lpmake --metadata-size 65536 --super-name super --metadata-slots 3 --virtual-ab --device super:3221225472 --group db_dynamic_partitions_a:1600126976 --group db_dynamic_partitions_b:1600126976 --partition system_a:readonly:1413971968:db_dynamic_partitions_a --image system_a=out/target/product/yukawa/system.img --partition system_b:readonly:33308672:db_dynamic_partitions_b --image system_b=out/target/product/yukawa/system_other.img --partition vendor_a:readonly:149164032:db_dynamic_partitions_a --image vendor_a=out/target/product/yukawa/vendor.img --partition vendor_b:readonly:0:db_dynamic_partitions_b --sparse --output out/target/product/yukawa/super.img"
2024-11-25 12:21:48 - common.py - INFO    : lpmake I 11-25 12:21:46 1598765 1598765 builder.cpp:1093] [liblp] Partition system_a will resize from 0 bytes to 1413971968 bytes
lpmake I 11-25 12:21:46 1598765 1598765 builder.cpp:1093] [liblp] Partition system_b will resize from 0 bytes to 33308672 bytes
lpmake I 11-25 12:21:46 1598765 1598765 builder.cpp:1093] [liblp] Partition vendor_a will resize from 0 bytes to 149164032 bytes
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
2024-11-25 12:21:48 - build_super_image.py - INFO    : Done writing image out/target/product/yukawa/super.img

There are several Invalid sparse file format at header magic in the log, will this affect the result making artifacts wrong? Or this make no sense to the result?