Vim3 android 11 build failure

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

android 11.0 32 bit

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

android 11.0 32 bit:(Non main maintenance version)

$ repo init -u https://github.com/khadas/android_manifest.git -b khadas-vim3-r-32bit

Please describe your issue below:

try to build kvim3 and kvim3l with android 11 branch following offical document

kvim3 target build failed and kvim3l target build succeed

Post a console log of your issue below:


root@7657ae6fea5c:/src# lunch kvim3-userdebug
03:18:31 Build sandboxing disabled due to nsjail error.
vendor/amlogic/common/wifi_bt/bluetooth/configs/bluetooth.mk:26: warning: BLUETOOTH_MODULE is multibt
vendor/amlogic/common/wifi_bt/bluetooth/configs/bluetooth.mk:30: warning: BLUETOOTH_INF is not set
device/khadas/common/core_amlogic.mk:162: warning: BOARD_COMPILE_ATV is false
device/khadas/common/dolby_ms12/dolby_ms12.mk:16: warning: 'Dolby MS12 2.4 will be installed'
device/khadas/common/products/mbox/g12a/device.mk:144: warning: 'using audio_policy_configuration_ms12_dtshd.xml'
device/khadas/common/sepolicy.mk:1: warning: current build platform is 11

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=kvim3
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.8.0-107-generic-x86_64-Ubuntu-20.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RD2A.211001.002
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/khadas/common hardware/amlogic vendor/amlogic/common vendor/amlogic/kvim3
============================================
root@7657ae6fea5c:/src# make otapackage
03:18:33 Warning: high -j34 count compared to 31GB of RAM
03:18:33 If you run into segfaults or other errors, try a lower -j value
03:18:33 Build sandboxing disabled due to nsjail error.
vendor/amlogic/common/wifi_bt/bluetooth/configs/bluetooth.mk:26: warning: BLUETOOTH_MODULE is multibt
vendor/amlogic/common/wifi_bt/bluetooth/configs/bluetooth.mk:30: warning: BLUETOOTH_INF is not set
device/khadas/common/core_amlogic.mk:162: warning: BOARD_COMPILE_ATV is false
device/khadas/common/dolby_ms12/dolby_ms12.mk:16: warning: 'Dolby MS12 2.4 will be installed'
device/khadas/common/products/mbox/g12a/device.mk:144: warning: 'using audio_policy_configuration_ms12_dtshd.xml'
device/khadas/common/sepolicy.mk:1: warning: current build platform is 11
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=kvim3
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.8.0-107-generic-x86_64-Ubuntu-20.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RD2A.211001.002
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/khadas/common hardware/amlogic vendor/amlogic/common vendor/amlogic/kvim3
============================================
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
wvcasSrcPath:vendor/amlogic/common/widevinecas not exist, use wvcas prebuilt to build
wvcas: widevine_oemcrypto_level != 1, not include wvcas prebuilt
libsecmemSrcPath:vendor/amlogic/common/libsecmem not exist, use secmem prebuilt to build
mediahalSrcPath:%s not exist, use mediahal_sdk to build media_hal
CheckDefaults sdkVersion: 30
PasshroughDefaults sdkVersion: 30
sdkVersion: 30
stagefright: enable_swcodec is true
sdkVersion: 30
-DANDROID_PLATFORM_SDK_VERSION=30
device/khadas/kvim3/preinstall/preinstall.mk was modified, regenerating...
vendor/amlogic/common/wifi_bt/bluetooth/configs/bluetooth.mk:26: warning: BLUETOOTH_MODULE is multibt
vendor/amlogic/common/wifi_bt/bluetooth/configs/bluetooth.mk:30: warning: BLUETOOTH_INF is not set
device/khadas/common/core_amlogic.mk:162: warning: BOARD_COMPILE_ATV is false
device/khadas/common/dolby_ms12/dolby_ms12.mk:16: warning: 'Dolby MS12 2.4 will be installed'
device/khadas/common/products/mbox/g12a/device.mk:144: warning: 'using audio_policy_configuration_ms12_dtshd.xml'
device/khadas/common/sepolicy.mk:1: warning: current build platform is 11
device/khadas/kvim3/preinstall/preinstall.mk was modified, regenerating...
[100% 2/2] initializing build system ...
vendor/amlogic/common/wifi_bt/bluetooth/configs/bluetooth.mk:26: warning: BLUETOOTH_MODULE is multibt
vendor/amlogic/common/wifi_bt/bluetooth/configs/bluetooth.mk:30: warning: BLUETOOTH_INF is not set
device/khadas/common/core_amlogic.mk:162: warning: BOARD_COMPILE_ATV is false
device/khadas/common/dolby_ms12/dolby_ms12.mk:16: warning: 'Dolby MS12 2.4 will be installed'
device/khadas/common/products/mbox/g12a/device.mk:144: warning: 'using audio_policy_configuration_ms12_dtshd.xml'
device/khadas/common/sepolicy.mk:1: warning: current build platform is 11
[  3% 7/189] including build/make/target/board/Android.mk ...
device/khadas/common/build_kernel_modules.mk:113: warning: TARGET_PREBUILT_KERNEL=device/khadas/kvim3-kernel/4.9/Image.gz
device/khadas/common/factory.mk:124: warning: echo "radio add dt and bootloader"
device/khadas/common/factory.mk:303: warning: will keep out/target/product/kvim3/aml_upgrade_package.img
device/khadas/common/factory.mk:405: warning: will keep out/target/product/kvim3/kvim3-fastboot-flashall-eng.root.zip
03:19:04 Disallowed PATH tool "ifconfig" used: []string{"ifconfig", "eth0"}
03:19:04 See https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools for more information.
03:19:04 Process tree:
03:19:04 → /src/out/soong_ui --make-mode otapackage
03:19:04  → prebuilts/build-tools/linux-x86/bin/ckati --ninja --ninja_dir=out --ninja_suffix=-kvim3 --no_ninja_prelude --regen --ignore_optional_include=out/%.P --detect_android_echo --color_warnings --gen_all_targets --use_find_emulator --werror_find_emulator --no_builtin_rules --werror_suffix_rules --warn_real_to_phony --warn_phony_looks_real --werror_real_to_phony --werror_phony_looks_real --werror_writable --top_level_phony --kati_stats --writable out/ -f build/make/core/main.mk --werror_implicit_rules --werror_overriding_commands SOONG_MAKEVARS_MK=out/soong/make_vars-kvim3.mk SOONG_ANDROID_MK=out/soong/Android-kvim3.mk TARGET_DEVICE_DIR=device/khadas/kvim3 KATI_PACKAGE_MK_DIR=out/target/product/kvim3/obj/CONFIG/kati_packaging
03:19:04   → /bin/bash -c ifconfig eth0|grep -oE '([0-9]{1,3}\.?){4}'|head -n 1
03:19:04    → ifconfig eth0
03:19:04 Disallowed PATH tool "ifconfig" used: []string{"ifconfig", "eth0"}
03:19:04 See https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools for more information.
03:19:04 Process tree:
03:19:04 → /src/out/soong_ui --make-mode otapackage
03:19:04  → prebuilts/build-tools/linux-x86/bin/ckati --ninja --ninja_dir=out --ninja_suffix=-kvim3 --no_ninja_prelude --regen --ignore_optional_include=out/%.P --detect_android_echo --color_warnings --gen_all_targets --use_find_emulator --werror_find_emulator --no_builtin_rules --werror_suffix_rules --warn_real_to_phony --warn_phony_looks_real --werror_real_to_phony --werror_phony_looks_real --werror_writable --top_level_phony --kati_stats --writable out/ -f build/make/core/main.mk --werror_implicit_rules --werror_overriding_commands SOONG_MAKEVARS_MK=out/soong/make_vars-kvim3.mk SOONG_ANDROID_MK=out/soong/Android-kvim3.mk TARGET_DEVICE_DIR=device/khadas/kvim3 KATI_PACKAGE_MK_DIR=out/target/product/kvim3/obj/CONFIG/kati_packaging
03:19:04   → /bin/bash -c ifconfig eth0|grep -oE '([0-9]{1,3}\.?){4}'|head -n 1
03:19:04    → ifconfig eth0
[ 40% 77/189] including hardware/amlogic/Android.mk ...
/bin/bash: line 0: cd: hardware/amlogic/LibAudio/amadec/firmware: No such file or directory
"---------ott audio mode, compiler configure 2 channels output by default--------"
"ifconfig" is not allowed to be used. See https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools for more information.
************************************************************
pdk or not:
target board:  g12b
git version:   "24d7fb2fe51d7f1f2d51fb98494bf264fa4bbfaf"
uncomment:     0 files
last changed:  "Date:   Mon May 20 19:18:32 2024 +0800"
build time:    " Tue Apr 21 03:19:04 Asia 2026"
builder name:  " "
branch name:   "* (no branch)"
build mode:    userdebug
host name:     "7657ae6fea5c"
"ifconfig" is not allowed to be used. See https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools for more information.
host IP:       ""
path:          "/src/hardware/amlogic/camera/v3/fake-pipeline2/tests"
************************************************************
hardware/amlogic/memtrack/Android.mk:28: warning: "the value of BUILD_KERNEL_4_9 is true"
hardware/amlogic/memtrack/Android.mk:38: warning: "the valaue of SKIP_COUNT_ION is true"
[ 96% 182/189] including vendor/amlogic/common/Android.mk ...
inputsource: platform 'amlogic'
vendor/amlogic/common/external/ffmpeg/Android.mk:33: warning: "Build2 ffmpeg-aml at : "30
"the value of BOARD_INSTALL_VULKAN is true"
TARGET_PRODUCT is kvim3
vendor/amlogic/common/tools/secureboot_sign/Android.mk:4: warning: LOCAL_PATH is vendor/amlogic/common/tools/secureboot_sign
vendor/amlogic/common/tools/secureboot_sign/Android.mk:5: warning: BUILD_NUMBER_FROM_FILE $(cat out/soong/build_number.txt)
vendor/amlogic/common/tools/secureboot_sign/Android.mk:42: warning: BUILT_TARGET_FILES_PACKAGE
hello mtk
qcabt
hello qca
hello qca test
FAILED: ninja: 'device/khadas/kvim3-kernel/4.9/kvim3.dtb', needed by 'out/target/product/kvim3/dt.img', missing and no known rule to make it
03:19:12 ninja failed with: exit status 1

#### failed to build some targets (39 seconds) ####

root@7657ae6fea5c:/src#

root@7657ae6fea5c:/src# ls -all device/khadas/
total 28
drwxrwxr-x 6 root root 4096 Apr 21 01:58 .
drwxrwxr-x 7 root root 4096 Apr 17 07:18 ..
lrwxrwxrwx 1 root root 38 Apr 17 07:18 .git → ../../.repo/projects/device/khadas.git
-rw-rw-r-- 1 root root 414 Apr 17 07:18 .gitignore
drwxrwxr-x 30 root root 4096 Apr 17 07:18 common
drwxrwxr-x 11 root root 4096 Apr 21 01:56 kvim3
drwxrwxr-x 11 root root 4096 Apr 17 07:18 kvim3l
drwxrwxr-x 5 root root 4096 Apr 21 01:58 kvim3l-kernel

There is no kvim3-kernel directory after sync. anyone can help?

@juicebeer ,
Go to the device/khadas/ directory, run git checkout ./ and check if there is a checkout file. If not, run git branch -a and send me the printed log.

There is no checkout file.

git checkout ./
Updated 0 paths from the index
xxx@localserver ~/u/c/k/d/khadas (khadas-vim3-r-32bit)> ls -all
total 28
drwxrwxr-x  6 xxx xxx 4096 Apr 21 16:52 ./
drwxrwxr-x  7 xxx xxx 4096 Apr 17 15:18 ../
drwxrwxr-x 30 xxx xxx 4096 Apr 21 16:52 common/
lrwxrwxrwx  1 xxx xxx   38 Apr 17 15:18 .git -> ../../.repo/projects/device/khadas.git/
-rw-rw-r--  1 xxx xxx  414 Apr 21 16:52 .gitignore
drwxrwxr-x 11 xxx xxx 4096 Apr 21 16:52 kvim3/
drwxrwxr-x 11 xxx xxx 4096 Apr 21 16:52 kvim3l/
drwxrwxr-x  5 xxx xxx 4096 Apr 21 16:52 kvim3l-kernel/
xxx@localserver ~/u/c/k/d/khadas (khadas-vim3-r-32bit)> git branch -a
  khadas-vim3-pie
* khadas-vim3-r-32bit
  remotes/github/HEAD -> github/Vim
  remotes/github/Nougat
  remotes/github/Oreo
  remotes/github/Vim
  remotes/github/khadas-vim1s-r
  remotes/github/khadas-vim3-p-64bit
  remotes/github/khadas-vim3-pie
  remotes/github/khadas-vim3-r-32bit
  remotes/github/khadas-vim4-r
  remotes/github/khadas-vim4-r-64bit
  remotes/github/khadas-vims-nougat
  remotes/github/khadas-vims-pie
  remotes/m/khadas-vim3-r-32bit

You can check GitHub - khadas/android_device_khadas at khadas-vim3-r-32bit · GitHub

There is no kvim3-kernel directory. Git check is fine.

vim3_build.sh (1.3 KB)
@juicebeer ,
This folder is generated by compilation. You can try using the script above. I can compile it successfully here. The command to run the script is:

./vim3_build.sh n

Thans for your reply. I found the root cause.

When you build the Android Kernel (above), the Linux Kernel will also be built simultaneously.

This sentence is easy to be misunderstood, I thought “./mk TARGET -v 4.9“ should be run in bootloader/uboot directory, and It do works well without any error.

when runing in root directory, all works now. Thanks for your support.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.