Which system do you use? Android, Ubuntu, OOWOW or others?
** Android 12 **
Which version of system do you use? Khadas official images, self built images, or others?
** Khadas official source and images **
Please describe your issue below:
$ Clean install of Ubuntu 18.04
Install Google Environment: https://source.android.com/source/initializing.html.
$ sudo apt-get install bison g++-multilib git gperf libxml2-utils make python-networkx zip
$ sudo apt-get install flex curl libncurses5-dev libssl-dev zlib1g-dev gawk minicom
$ sudo apt-get install exfat-fuse exfat-utils device-tree-compiler liblz4-tool
$ sudo apt-get install openjdk-8-jdk
$ sudo apt install git-lfs
$ mkdir -p WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ repo init -u https://github.com/khadas/android_manifest.git -b khadas-edge2-android12
$ repo sync -j4
$ cd ~/WORKING_DIRECTORY/external/camera_engine_rkaiq
$ ~/WORKING_DIRECTORY/external/camera_engine_rkaiq$ git lfs pull
Git LFS: (4 of 4 files) 208.97 MB / 208.97 MB
$ cd ~/WORKING_DIRECTORY/prebuilts/module_sdk
$ ~/WORKING_DIRECTORY/prebuilts/module_sdk$ git lfs pull
Git LFS: (3 of 3 files) 936.69 MB / 936.69 MB
$ cd ~/WORKING_DIRECTORY/users/Edge2$ cd device/khadas/rk3588
$ ~/WORKING_DIRECTORY/device/khadas/rk3588$ git lfs pull
Git LFS: (1 of 1 files) 211.07 MB / 211.07 MB
$ cd ~/WORKING_DIRECTORY
UPDATE: Ubuntu 18.04 - it has outdated lz4 and therefore instead of doing apt-get install liblz4-tool - it is required to download sources and compile manually:
wget https://github.com/lz4/lz4/archive/refs/tags/v1.9.4.zip
unzip v1.9.4.zip
cd 1.9.4 && make && make install
$ source build/envsetup.sh
$ lunch kedge2-userdebug
$ ./build.sh -CKAUu
Post a console log of your issue below:
asus@asus-N501JW:~/WORKING_DIRECTORY$ ./build.sh -CKAUu
...
...
CC [M] drivers/net/ethernet/realtek/r8168/r8168.mod.o
CC [M] drivers/net/phy/realtek.mod.o
CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmdhd.mod.o
LZ4C arch/arm64/boot/Image.lz4
LD [M] drivers/media/usb/gspca/gspca_main.ko
LD [M] drivers/net/ethernet/realtek/r8168/r8168.ko
LD [M] drivers/net/phy/realtek.ko
LD [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmdhd.ko
Image: resource.img (with rk3588s-khadas-edge2.dtb logo.bmp logo_kernel.bmp) is ready
Image: boot.img (with Image resource.img) is ready
Image: zboot.img (with Image.lz4 resource.img) is ready
#### build completed successfully (16:39 (mm:ss)) ####
/home/asus/WORKING_DIRECTORY
Build kernel ok!
package resoure.img with charger images
Pack ./tools/images/ & ../kernel-5.10/resource.img to resource.img ...
Unpacking old image(../kernel-5.10/resource.img):
rk-kernel.dtb logo.bmp logo_kernel.bmp 3
Pack to resource.img successed!
Packed resources:
rk-kernel.dtb battery_1.bmp battery_2.bmp battery_3.bmp battery_4.bmp battery_5.bmp battery_fail.bmp logo.bmp logo_kernel.bmp battery_0.bmp 10
./resource.img with battery images is ready
/home/asus/WORKING_DIRECTORY
./build.sh: line 173: [: =: unary operator expected
start build android
13:51:02 ************************************************************
13:51:02 You are building on a machine with 15.5GB of RAM
13:51:02
13:51:02 The minimum required amount of free memory is around 16GB,
13:51:02 and even with that, some configurations may not work.
13:51:02
13:51:02 If you run into segfaults or other errors, try reducing your
13:51:02 -j value.
13:51:02 ************************************************************
build/make/core/soong_config.mk:195: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.
build/make/core/soong_config.mk:196: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=12
TARGET_PRODUCT=kedge2
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-150-generic-x86_64-Ubuntu-18.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=SQ3A.220705.003.A1
OUT_DIR=out
============================================
13:51:04 Entire data directory removed.
13:51:04 Deleted images and staging directories.
#### build completed successfully (2 seconds) ####
13:51:04 ************************************************************
13:51:04 You are building on a machine with 15.5GB of RAM
13:51:04
13:51:04 The minimum required amount of free memory is around 16GB,
13:51:04 and even with that, some configurations may not work.
13:51:04
13:51:04 If you run into segfaults or other errors, try reducing your
13:51:04 -j value.
13:51:04 ************************************************************
build/make/core/soong_config.mk:195: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.
build/make/core/soong_config.mk:196: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=12
TARGET_PRODUCT=kedge2
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-150-generic-x86_64-Ubuntu-18.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=SQ3A.220705.003.A1
[100% 268/268] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --out "out/soong" -n "out" -d "out/soong/build.ninja.d" -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
audioflinger want to conditional Compile
devicefactory want to conditional Compile
libRkTeeWeaver want to conditional Compile
libaudioclient want to conditional Compile
libaudiohal want to conditional Compile
libeptz want to conditional Compile
libgralloc_priv want to conditional Compile
libmpimmz conditional Compile
librga want to conditional Compile
librknnrt want to conditional Compile
librockx want to conditional Compile
managerdefault want to conditional Compile
Rockchip conditional compile
libeptz enabled on RK3588
libeptz enabled on RK3588
libeptz enabled on RK3588
[hardware/rockchip/libgralloc frameworks/native/include system/core/libsync system/core/libsync/include external/libdrm/include/drm] 32
librknnrt enabled on RK3588
librknnrt enabled on RK3588
librknnrt enabled on RK3588
Optee Version: v2
>>>>>>>>>>>>>>>>>>>>> rk3588
librockx enabled on RK3588
librockx enabled on RK3588
librockx enabled on RK3588
Killed
13:53:32 soong bootstrap failed with: exit status 1
#### failed to build some targets (02:28 (mm:ss)) ####
Build android failed!
Anyone else having this issue? Thanks!