VIM3/VIM3L AOSP Android 14.0 Upside Down Cake

@xiong.zhang thank you for your instructions/ efforts!!!

I also see what @3id_L is seeing.
Specifically, the screen shows “Failed to boot Android” with my Vim3L using uboot
Android boot failed, error -22

For reference, I am using
https://dl.khadas.com/products/vim3l/firmware/android/vim3l-userdebug-u-aosp-v240115.tar.xz
Do you have the noab version of uboot handy?
u-boot_kvim3l_noab.bin
The tar file only contains u-boot_kvim3l_ab.bin

guessing we dont need cache.img and recover.img as noted in
Khadas_VIM3 · Wiki · BayLibre / amlogic / Android TV / aosp / device / amlogic / yukawa · GitLab?

I tried to generate u-boot per the instructions above and failed with

  • cat /tmp/tmp.SySAUZEWFc/acs.bin /tmp/tmp.SySAUZEWFc/zero_tmp

  • cat /tmp/tmp.SySAUZEWFc/bl2_zero.bin /tmp/tmp.SySAUZEWFc/bl21_zero.bin

  • rm /tmp/tmp.SySAUZEWFc/zero_tmp

  • fip_package/aml_encrypt --bl30sig --input /tmp/tmp.SySAUZEWFc/bl30_new.bin --output /tmp/tmp.SySAUZEWFc/bl30_new.bin.g12.enc --level v3

  • fip_package/aml_encrypt --bl3sig --input /tmp/tmp.SySAUZEWFc/bl30_new.bin.g12.enc --output /tmp/tmp.SySAUZEWFc/bl30_new.bin.enc --level v3 --type bl30

  • fip_package/aml_encrypt --bl3sig --input fip_package/bl31.img --output /tmp/tmp.SySAUZEWFc/bl31.img.enc --level v3 --type bl31

  • fip_package/aml_encrypt --bl3sig --input u-boot-vim3l.bin --compress lz4 --output /tmp/tmp.SySAUZEWFc/bl33.bin.enc --level v3 --type bl33

fip_package/aml_encrypt bl3sig fail[18512]!

@xiong.zhang

Great to see Android 14 for Vim3, thanks a lot!

I also cannot make it boot though.

For me, the prebuilts work fine (vim3-userdebug-u-aosp-v240115.tar.xz ). The device boots, the screen shows up when HDMI is connected, and adb works as well. Unfortunately, scrcpy does not work but gives a segfault.

However, building AOSP from source does not work at all.
I tried both a default build and also with rebuilding the kernel, following the instructions from above.
The VIM3 then tries to boot a couple of times from each boot partition, before it also shows ‘Android boot failed, error -22’.

Any ideas?

Hello, because it is a preview version, some of the functions may not be complete, I’m really sorry
After you build it, what’s wrong with the recording partition?

We only have ab version now

it’s great to see the so detail share about the build step.

it’s very nice for a new beginner like me.

but right now i have a problem.

when I finsh the Build. the console show the follows error:

after I ignore this message. I keep execute burning step.

I found the “super.img” support had 14 sections, but I only have 13.

root@IE2590:/home/andrew_jen/Documents/AOSP_14# fastboot flash super super.img && fastboot flash userdata userdata.img
target reported max download size of 117440512 bytes
sending sparse 'super' 1/13 (109916 KB)...
OKAY [  7.140s]
writing 'super' 1/13...
OKAY [  4.117s]
sending sparse 'super' 2/13 (114684 KB)...
OKAY [  7.402s]
writing 'super' 2/13...
OKAY [  4.306s]
sending sparse 'super' 3/13 (114684 KB)...
OKAY [  7.523s]
writing 'super' 3/13...
OKAY [  4.501s]
sending sparse 'super' 4/13 (114684 KB)...
OKAY [  7.433s]
writing 'super' 4/13...
OKAY [  4.379s]
sending sparse 'super' 5/13 (114684 KB)...
OKAY [  7.411s]
writing 'super' 5/13...
OKAY [  4.284s]
sending sparse 'super' 6/13 (112672 KB)...
OKAY [  7.302s]
writing 'super' 6/13...
OKAY [  4.180s]
sending sparse 'super' 7/13 (105260 KB)...
OKAY [  6.866s]
writing 'super' 7/13...
OKAY [  4.119s]
sending sparse 'super' 8/13 (111540 KB)...
OKAY [  7.258s]
writing 'super' 8/13...
OKAY [  4.228s]
sending sparse 'super' 9/13 (103920 KB)...
OKAY [  6.745s]
writing 'super' 9/13...
OKAY [  3.910s]
sending sparse 'super' 10/13 (106812 KB)...
OKAY [  6.918s]
writing 'super' 10/13...
OKAY [  3.999s]
sending sparse 'super' 11/13 (114240 KB)...
OKAY [  7.390s]
writing 'super' 11/13...
OKAY [  4.510s]
sending sparse 'super' 12/13 (114685 KB)...
OKAY [  7.402s]
writing 'super' 12/13...
OKAY [  6.227s]
sending sparse 'super' 13/13 (45410 KB)...
OKAY [  2.922s]
writing 'super' 13/13...
OKAY [  2.432s]
finished. total time: 144.904s
target reported max download size of 117440512 bytes

it cause my KVIM3 keep loop in this boot screen.

This error can be ignored, and the final result is to indicate the word of success
Do you have the following environment variables before compiling

export TARGET_VIM3=true
export TARGET_USE_TABLET_LAUNCHER=true

Hi xiong:

thx for your help~

the follows cmd is the step I did before I execute the make:

There seems to be no problem with the compilation instructions

1 Like

Thx for your confirm.

After execute:

time make -j50 2>&1 | tee build_vim3l_14_android.log

the artifacts will output at “./out/target/product/yukawa/”

and pick up the files in the red box with the follows picture and burn it. is that correct?

I honestly do not know – the building and flash process works as expected, but I keep getting the same boot loop / error -22 as the others.
It’s interesting that the prebuilt version works though, seems likes there is minor difference somewhere in the source code?

I have an update:
I reverted the device.mk and Manifest.xml in device/amlogic/yukawa to the git commit before changing to Manifest version 7 (the changes have been made ~4 weeks ago) and this time, the building works and the VIM3 boots just fine!

I used this commit: Files · ee173288b22c194a2663f05c1d1a917f7c6658eb · BayLibre / amlogic / Android TV / aosp / device / amlogic / yukawa · GitLab

@xiong.zhang could you somehow update the manifest or the instructions to reflect this changes and that people do run into the same problems? For now, I have not investigated myself why the new commit does not work.

Yes, but the super partition you mentioned has less, I verify it, I will compile one and see

I watched this local Device/Amlogic/YUKAWA path. commit ee173288b22c194a2663f05c1d1a917f7c6658eb is the same as you posted. When you can’t compile, is the latest Commit of this path? Submit a new code, and then it will not be compiled

Yes, exactly.
With ee173288b22c194a2663f05c1d1a917f7c6658eb of device/amlogic/yukawa it boots, but with the latest commit it doesn’t. (compiling works for both)

Okay, I will report this issue to BayLibre. Thank you for your support.

They know this problem exists, here are the original words

we are aware about this.
i have multiple fix under dev for TV and to enable mesa3d support,
instability should be fixed during next week.

Thanks @hanuka for figuring that out!!
Thanks xiong.zhang for offering to fix it.

@both, does wifi work with this build?

I assume the 6.1 kernel already has this patch?
https://lore.kernel.org/all/20210301161205.584625576@linuxfoundation.org/

I am using the Vim3 and Wi-Fi doesnt work out of the box for this build. I’ll let you know if I have time to fix it.
But yes, the kernel patch for the VIM3L is in 6.1 already – so that won’t be the problem.

Has anyone installed gapps on this build? If so, how?
Is it possible to sideload gapps?

Hi,
I tried to enable the SPI interface in the kernel, but I get the following bazel-build error:

ERROR: Unable to find drivers/spi/spi-meson-spicc.ko in any of the following directories:
  bazel-out/k8-fastbuild/bin/yukawa-device/yukawa/staging/lib/modules/6.1.25-android14-11-maybe-dirty/kernel
Unable to find drivers/spi/spi-meson-spifc.ko in any of the following directories:
  bazel-out/k8-fastbuild/bin/yukawa-device/yukawa/staging/lib/modules/6.1.25-android14-11-maybe-dirty/kernel
Target //yukawa-device:yukawa_dist failed to build

Does anyone have an idea what can go wrong? (I get the similar errors when enablng other kernel modules e.g., usbserial etc.)