Which Android version have stable VIM3 Android TV AOSP source build

I have followed the instructions from Khadas_VIM3 · Wiki · BayLibre / amlogic / Android TV / aosp / device / amlogic / yukawa · GitLab for creating an AOSP build for VIM3L. This build is from master branch.

I want to build for Android 10 or Android 11. I would like to know which version is stable for VIM3L Android TV.
Someone kindly help me to find a stable tag to download the AOSP and the flashing instructions.

Thank you so much

@tenk.wang please follow up this problem

@jyothishkg VIM3 has not Android TV branch, you can use this command to try it.

make TARGET_USE_TABLET_LAUNCHER=false TARGET_VIM3L=true TARGET_KERNEL_USE=5.4 -j24

Thank you.
Actually I used the same command for making android TV.
But master branch is already Tiramisu.
I need Android 11. Would you point me a stable version( release tag ) of Android 11 for Vim3L TV ?

Download AOSP Android11

android11和aosp master编译刷了启动都卡在SurfaceFlinger,是什么原因

@smith11 能发一下log吗?分支都正确吗?

log是这个,感觉应该是GPU驱动的版本不对
01-01 00:00:21.592 436 436 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 436 (surfaceflinger), pid 436 (surfaceflinger)
01-01 00:00:21.834 485 485 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-01 00:00:21.834 485 485 F DEBUG : Build fingerprint: ‘Android/yukawa/sei610:Tiramisu/AOSP.MASTER/eng.yuguox.20210908.155414:userdebug/test-keys’
01-01 00:00:21.834 485 485 F DEBUG : Revision: ‘0’
01-01 00:00:21.834 485 485 F DEBUG : ABI: ‘arm64’
01-01 00:00:21.834 485 485 F DEBUG : Timestamp: 1970-01-01 00:00:21.643680925+0000
01-01 00:00:21.834 485 485 F DEBUG : Process uptime: 1s
01-01 00:00:21.834 485 485 F DEBUG : Cmdline: /system/bin/surfaceflinger
01-01 00:00:21.834 485 485 F DEBUG : pid: 436, tid: 436, name: surfaceflinger >>> /system/bin/surfaceflinger <<<
01-01 00:00:21.834 485 485 F DEBUG : uid: 1000
01-01 00:00:21.834 485 485 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
01-01 00:00:21.834 485 485 F DEBUG : Abort message: ‘eglQueryStringImplementationANDROID(EGL_VERSION) failed’
01-01 00:00:21.834 485 485 F DEBUG : x0 0000000000000000 x1 00000000000001b4 x2 0000000000000006 x3 0000ffffdafc8bf0
01-01 00:00:21.834 485 485 F DEBUG : x4 51434d406d6e6873 x5 51434d406d6e6873 x6 51434d406d6e6873 x7 7f7f7f7f7f7f7f7f
01-01 00:00:21.834 485 485 F DEBUG : x8 00000000000000f0 x9 0000e3e491d1a6a0 x10 0000000000000001 x11 0000e3e491dc32c8
01-01 00:00:21.834 485 485 F DEBUG : x12 0000ffffdafc8bc0 x13 0000000000000038 x14 0000ffffdafc8d90 x15 0000000000000040
01-01 00:00:21.834 485 485 F DEBUG : x16 0000e3e491dc5d28 x17 0000e3e491da0780 x18 0000000000000000 x19 00000000000000ac
01-01 00:00:21.834 485 485 F DEBUG : x20 00000000000001b4 x21 00000000000000b2 x22 00000000000001b4 x23 00000000ffffffff
01-01 00:00:21.834 485 485 F DEBUG : x24 0000e3e498162000 x25 0000000000000000 x26 0000000000000000 x27 0000000000000000
01-01 00:00:21.834 485 485 F DEBUG : x28 0000000000000000 x29 0000ffffdafc8c70
01-01 00:00:21.834 485 485 F DEBUG : lr 0000e3e491d4a794 sp 0000ffffdafc8bd0 pc 0000e3e491d4a7c4 pst 0000000000000000
01-01 00:00:21.835 485 485 F DEBUG : backtrace:
01-01 00:00:21.835 485 485 F DEBUG : #00 pc 00000000000517c4 /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) (BuildId: 9eab4e2bac16c222e6e304250cb10bad)
01-01 00:00:21.835 485 485 F DEBUG : #01 pc 00000000000063ac /system/lib64/liblog.so (__android_log_default_aborter+12) (BuildId: 4cabb9e6e44890b24f044e7fe7b89351)
01-01 00:00:21.835 485 485 F DEBUG : #02 pc 0000000000006ec4 /system/lib64/liblog.so (__android_log_assert+308) (BuildId: 4cabb9e6e44890b24f044e7fe7b89351)
01-01 00:00:21.835 485 485 F DEBUG : #03 pc 000000000018bfa4 /system/lib64/libsurfaceflinger.so (android::renderengine::gl::GLESRenderEngine::create(android::renderengine::RenderEngineCreationArgs const&)+4740) (BuildId: 9548a8a3d49901024426b01695ad1f0b)
01-01 00:00:21.835 485 485 F DEBUG : #04 pc 000000000018ab88 /system/lib64/libsurfaceflinger.so (android::renderengine::RenderEngine::create(android::renderengine::RenderEngineCreationArgs const&)+168) (BuildId: 9548a8a3d49901024426b01695ad1f0b)
01-01 00:00:21.835 485 485 F DEBUG : #05 pc 00000000000f0ca8 /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::init()+184) (BuildId: 9548a8a3d49901024426b01695ad1f0b)
01-01 00:00:21.835 485 485 F DEBUG : #06 pc 00000000000021c0 /system/bin/surfaceflinger (main+352) (BuildId: 6ca197ff74680518ebc9e118f71ce748)
01-01 00:00:21.835 485 485 F DEBUG : #07 pc 000000000004a050 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96) (BuildId: 9eab4e2bac16c222e6e304250cb10bad)
01-01 00:00:25.894 570 570 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 570 (surfaceflinger), pid 570 (surfaceflinger)

用的是aosp master编译的,全世界其他人编译出来应该也有这个问题

@smith11 master分支现在是Android12了,我上周编译都还可以开机。可能又更新了吧,你还是用Android11 的分支吧。

问题查清了,应该是编译的时候没有带TARGET_VIM3=true 这个宏,导致编译了其他的GPU driver

1 Like

I tried this. Followed all steps
Build successful.
Images and tool/update are generated.
Then I follow all the steps to flash uboot first and then the images( Khadas_VIM3 · Wiki · BayLibre / amlogic / Android TV / aosp / device / amlogic / yukawa · GitLab

But after flashing and rebooting the device, there is no display via HDMI. I dont know what could be the problem ?

Your work in progress branch and the patch work to the android 11 still works fine right ?

Hi @tenk.wang
I use this way build for VIM3 board as below
make TARGET_USE_TABLET_LAUNCHER=false TARGET_VIM3L=true TARGET_KERNEL_USE=5.4 -j24
But I follow up step all done
1.flash Uboot

cd path/to/aosp/device/amlogic/yukawa/bootloader/
./tools/update write u-boot_kvim3_noab.bin 0xfffa0000 0x10000
./tools/update run 0xfffa0000
./tools/update bl2_boot u-boot_kvim3_noab.bin
fastboot oem format
fastboot flash bootloader u-boot_kvim3_noab.bin
fastboot erase bootenv
fastboot reboot bootloader

2.flash img
cd out/target/product/yukawa
fastboot flash boot boot.img
fastboot flash super super.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
fastboot flash recovery recovery.img
fastboot flash dtbo dtbo-unsigned.img
fastboot reboot
finally I can not use IR remote to control TV. Do you know why ?

@fiveshit you need add patch in kernel source code.

--- a/arch/arm64/configs/meson_defconfig
+++ b/arch/arm64/configs/meson_defconfig
@@ -486,7 +486,7 @@ CONFIG_REGULATOR_RK808=y
 CONFIG_REGULATOR_S2MPS11=y
 CONFIG_REGULATOR_VCTRL=y
 CONFIG_RC_CORE=y
-# CONFIG_RC_MAP is not set
+CONFIG_RC_MAP=y
 CONFIG_LIRC=y
 CONFIG_BPF_LIRC_MODE2=y
 CONFIG_RC_DECODERS=y

Hi @tenk.wang
I try to download kernel and rebuild it.

export AOSP_TOPDIR=/path/to/your/aosp/source
cd ${AOSP_TOPDIR}
git clone https://android.googlesource.com/platform/prebuilts/gas/linux-x86 prebuilts/gas/linux-x86
git clone https://android.googlesource.com/kernel/hikey-linaro -b android-amlogic-bmeson-5.4
export PATH=${AOSP_TOPDIR}/prebuilts/clang/host/linux-x86/clang-r399163b/bin:$PATH
export PATH=${AOSP_TOPDIR}/prebuilts/gas/linux-x86:$PATH
export PATH=${AOSP_TOPDIR}/prebuilts/misc/linux-x86/lz4:$PATH
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
export LLVM=1
cd hikey-linaro
make meson_defconfig

modify .config file
CONFIG_ION=y
CONFIG_ION_SYSTEM_HEAP=y
CONFIG_ION_CMA_HEAP=y

make DTC_FLAGS="-@" -j24

then I build fail “arch/arm64/kernel/vdso/Makefile:60: recipe for target ‘arch/arm64/kernel/vdso/vdso.so.dbg’ failed”

@fiveshit

cd ${AOSP_TOPDIR}
git clone https://android.googlesource.com/kernel/hikey-linaro -b android-amlogic-bmeson-5.4

export PATH=${AOSP_TOPDIR}/prebuilts/clang/host/linux-x86/clang-r399163b/bin:$PATH
export PATH=${AOSP_TOPDIR}/prebuilts/gas/linux-x86:$PATH
export PATH=${AOSP_TOPDIR}/prebuilts/misc/linux-x86/lz4:$PATH
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
export LLVM=1

cd hikey-linaro
make meson_defconfig
make DTC_FLAGS="-@" -j24

The arch/arm64/configs/meson_defconfig file has

CONFIG_ION=y
CONFIG_ION_SYSTEM_HEAP=y
CONFIG_ION_CMA_HEAP=y

@fiveshit
Modify hikey-linaro/Makefile, try it.

diff --git a/Makefile b/Makefile
index 8dcbf17..e4cea65 100644
--- a/Makefile
+++ b/Makefile
@@ -410,7 +410,7 @@ KBUILD_HOSTLDLIBS   := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
 
 # Make variables (CC, etc...)
 CPP            = $(CC) -E
-ifneq ($(LLVM),)
+ifeq ($(LLVM),)
 CC             = clang
 LD             = ld.lld
 AR             = llvm-ar
1 Like

HI @tenk.wang
It’s working. Thanks a lot