20221226编译Toybrick的TB-RK3588X开发板的Android12系统3
2022/12/26 18:27
编译指令:
1、cat android12-rk3588.tar.gz.* >android12-rk3588.tar.gz
2、tar -zxvf android12-rk3588.tar.gz,解压缩后生成android12-rk3588-new目录
3、android12-rk3588-new
4、
source build/envsetup.sh
lunch rk3588_s-userdebug
./build.sh -AUCKu -d rk3588-toybrick-x0-android
https://blog.csdn.net/m0_37039448/article/details/120327611
RK3568 Android 11 切换单git仓编译报错问题
编译的时候需要处理.git的问题:
Z:\android12\android12-rk3588-new\hardware\rockchip\libhwjpeg\Android.bp
genrule {
name: "gen_hwjpeg_version",
srcs: [
"version.h.template",
"genversion.sh",
//".git/HEAD",
],
cmd: "bash $(location genversion.sh) > $(out)",
out: ["version.h"],
}
Z:\android12\android12-rk3588-new\hardware\rockchip\libmpimmz\Android.bp
genrule {
name: "gen_mmz_version",
srcs: libmpimmz_src + [
"version.sh",
"version.h.template",
//".git/"
],
out: ["version.h"],
cmd: "bash $(location version.sh) < $(in) > $(out)",
}
Z:\android12\android12-rk3588-new\vendor\rockchip\hardware\interfaces\codec2\Android.bp
genrule {
name: "c2_version",
srcs: [
"version.h.template",
"version.sh",
//".git/HEAD",
],
cmd: "bash $(location version.sh) > $(out)",
out: ["C2RKVersion.h"],
}
rootroot@rootroot-MS-7885:~$
rootroot@rootroot-MS-7885:~$ cd android12-rk3588-new/
rootroot@rootroot-MS-7885:~/android12-rk3588-new$ ll
total 232
drwxr-xr-x 40 rootroot rootroot 4096 12月 23 17:18 ./
drwxr-xr-x 22 rootroot rootroot 4096 12月 24 08:07 ../
lrwxrwxrwx 1 rootroot rootroot 19 2月 22 2022 Android.bp -> build/soong/root.bp
drwxr-xr-x 35 rootroot rootroot 4096 2月 22 2022 art/
drwxr-xr-x 14 rootroot rootroot 4096 2月 22 2022 bionic/
drwxr-xr-x 4 rootroot rootroot 4096 2月 22 2022 bootable/
drwxr-xr-x 2 rootroot rootroot 4096 2月 23 2022 .bootstrap/
lrwxrwxrwx 1 rootroot rootroot 26 2月 22 2022 bootstrap.bash -> build/soong/bootstrap.bash*
drwxr-xr-x 7 rootroot rootroot 4096 2月 22 2022 build/
lrwxrwxrwx 1 rootroot rootroot 23 2月 22 2022 BUILD -> build/bazel/bazel.BUILD
-r-xr-xr-x 1 rootroot rootroot 9024 3月 28 2022 build.sh*
-r-xr-xr-x 1 rootroot rootroot 14109 2月 22 2022 .classpath*
drwxr-xr-x 3 rootroot rootroot 4096 2月 22 2022 compatibility/
drwxr-xr-x 13 rootroot rootroot 4096 3月 28 2022 cts/
drwxr-xr-x 7 rootroot rootroot 4096 2月 22 2022 dalvik/
drwxr-xr-x 5 rootroot rootroot 4096 2月 22 2022 developers/
drwxr-xr-x 19 rootroot rootroot 4096 3月 28 2022 development/
drwxr-xr-x 11 rootroot rootroot 4096 2月 22 2022 device/
drwxr-xr-x 357 rootroot rootroot 12288 3月 28 2022 external/
drwxr-xr-x 16 rootroot rootroot 4096 2月 22 2022 frameworks/
drwxr-xr-x 17 rootroot rootroot 4096 2月 22 2022 hardware/
drwxr-xr-x 4 rootroot rootroot 4096 3月 30 2022 IMAGE/
-r--r--r-- 1 rootroot rootroot 162 2月 22 2022 javaenv.sh
drwxr-xr-x 5 rootroot rootroot 4096 2月 22 2022 kernel/
drwxr-xr-x 26 rootroot rootroot 4096 3月 17 2022 kernel-4.19/
drwxr-xr-x 27 rootroot rootroot 4096 3月 30 2022 kernel-5.10/
drwxr-xr-x 19 rootroot rootroot 4096 2月 22 2022 libcore/
drwxr-xr-x 9 rootroot rootroot 4096 2月 22 2022 libnativehelper/
lrwxrwxrwx 1 rootroot rootroot 19 3月 8 2022 libOpenCL.so -> egl/libGLES_mali.so
-r--r--r-- 1 rootroot rootroot 92 2月 22 2022 Makefile
drwxr-xr-x 10 rootroot rootroot 4096 2月 22 2022 mkcombinedroot/
-r-xr-xr-x 1 rootroot rootroot 10151 2月 22 2022 mkimage_ab.sh*
-r-xr-xr-x 1 rootroot rootroot 8544 2月 22 2022 mkimage.sh*
drwxr-xr-x 2 rootroot rootroot 4096 3月 30 2022 out/
drwxr-xr-x 9 rootroot rootroot 4096 2月 22 2022 packages/
drwxr-xr-x 5 rootroot rootroot 4096 2月 22 2022 pdk/
drwxr-xr-x 9 rootroot rootroot 4096 2月 22 2022 platform_testing/
drwxr-xr-x 34 rootroot rootroot 4096 3月 29 2022 prebuilts/
-r-xr-xr-x 1 rootroot rootroot 519 2月 22 2022 restore_patches.sh*
drwxr-xr-x 8 rootroot rootroot 4096 3月 29 2022 rkbin/
drwxr-xr-x 4 rootroot rootroot 4096 2月 22 2022 RKDocs/
drwxr-xr-x 4 rootroot rootroot 4096 2月 22 2022 rkst/
drwxr-xr-x 4 rootroot rootroot 4096 2月 22 2022 RKTools/
drwxr-xr-x 2 rootroot rootroot 4096 3月 30 2022 rockdev/
drwxr-xr-x 21 rootroot rootroot 4096 2月 22 2022 sdk/
drwxr-xr-x 45 rootroot rootroot 4096 2月 22 2022 system/
drwxr-xr-x 11 rootroot rootroot 4096 2月 22 2022 test/
drwxr-xr-x 4 rootroot rootroot 4096 2月 22 2022 toolchain/
drwxr-xr-x 23 rootroot rootroot 4096 2月 22 2022 tools/
drwxr-xr-x 27 rootroot rootroot 4096 3月 30 2022 u-boot/
drwxr-xr-x 6 rootroot rootroot 4096 2月 22 2022 vendor/
lrwxrwxrwx 1 rootroot rootroot 27 2月 22 2022 WORKSPACE -> build/bazel/bazel.WORKSPACE
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$ source build/envsetup.sh
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$ lunch rk3588_s-userdebug
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=12
TARGET_PRODUCT=rk3588_s
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-135-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=SP2A.220305.012
OUT_DIR=out
============================================
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$ date
2022年 12月 24日 星期六 08:33:30 CST
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$ ./build.sh -AUCKu -d rk3588-toybrick-x0-android && date
will build android
will build u-boot
will build kernel with Clang
will build kernel
will build update.img
-------------------KERNEL_VERSION:5.10
-------------------KERNEL_DTS:rk3588-toybrick-x0-android
Force use clang and llvm to build kernel-5.10
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=12
TARGET_PRODUCT=rk3588_s
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-135-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=SP2A.220305.012
OUT_DIR=out
============================================
start build uboot
CLEAN dts/../arch/arm/dts
CLEAN dts
CLEAN examples/standalone
CLEAN tools
CLEAN tools/lib tools/common
CLEAN spl/arch spl/board spl/cmd spl/common spl/disk spl/drivers spl/dts spl/env spl/fs spl/lib spl/u-boot.cfg spl/u-boot-spl spl/u-boot-spl.bin spl/u-boot-spl.dtb spl/u-boot-spl-dtb.bin spl/u-boot-spl.lds spl/u-boot-spl.map spl/u-boot-spl-nodtb.bin spl/u-boot-spl.sym tpl/arch tpl/board tpl/common tpl/disk tpl/drivers tpl/dts tpl/fs tpl/u-boot.cfg tpl/u-boot-spl.lds tpl/u-boot-tpl tpl/u-boot-tpl.bin tpl/u-boot-tpl.map tpl/u-boot-tpl-nodtb.bin tpl/u-boot-tpl.sym
CLEAN u-boot-nodtb.bin u-boot.lds u-boot.dtb u-boot.cfg.configs u-boot.map u-boot.bin u-boot.cfg u-boot.srec u-boot-dtb.bin u-boot u-boot.sym System.map u-boot-nodtb.bin bl31_0x00040000.bin bl31_0xff100000.bin u-boot.bin tee.bin rk3588_spl_loader_v1.06.109.bin u-boot-dtb.bin bl31_0xff009000.bin bl31_0x000f0000.bin resource.img uboot.img
#### build completed successfully (2 seconds) ####
CLEAN scripts/basic
CLEAN scripts/dtc
CLEAN scripts/kconfig
CLEAN include/config include/generated spl tpl
CLEAN .config .config.old include/autoconf.mk include/autoconf.mk.dep include/config.h
#### build completed successfully (1 seconds) ####
#### build completed successfully (2 seconds) ####
grep: .config: No such file or directory
## make rk3588_defconfig -j48
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
UPD include/config.h
CFG u-boot.cfg
GEN include/autoconf.mk.dep
CFG spl/u-boot.cfg
CFG tpl/u-boot.cfg
GEN include/autoconf.mk
GEN tpl/include/autoconf.mk
GEN spl/include/autoconf.mk
CHK include/config/uboot.release
CHK include/generated/timestamp_autogenerated.h
UPD include/generated/timestamp_autogenerated.h
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
SHIPPED scripts/dtc/dtc-lexer.lex.c
SHIPPED scripts/dtc/dtc-parser.tab.c
SHIPPED scripts/dtc/dtc-parser.tab.h
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTCC scripts/dtc/dtc-lexer.lex.o
UPD include/config/uboot.release
CHK include/generated/version_autogenerated.h
UPD include/generated/version_autogenerated.h
CC lib/asm-offsets.s
CC arch/arm/lib/asm-offsets.s
CHK include/config.h
CFG u-boot.cfg
CHK include/generated/asm-offsets.h
CHK include/generated/generic-asm-offsets.h
UPD include/generated/asm-offsets.h
UPD include/generated/generic-asm-offsets.h
LDS u-boot.lds
HOSTLD scripts/dtc/dtc
HOSTCC tools/gen_eth_addr
HOSTCC tools/gen_ethaddr_crc.o
WRAP tools/lib/crc8.c
HOSTCC tools/mkenvimage.o
HOSTCC tools/os_support.o
WRAP tools/lib/crc32.c
HOSTCC tools/aisimage.o
HOSTCC tools/atmelimage.o
WRAP tools/common/bootm.c
HOSTCC tools/default_image.o
WRAP tools/lib/fdtdec_common.c
WRAP tools/lib/fdtdec.c
HOSTCC tools/fit_common.o
WRAP tools/common/image-fit.c
HOSTCC tools/fit_image.o
HOSTCC tools/image-host.o
WRAP tools/common/image.c
HOSTCC tools/imximage.o
HOSTCC tools/imagetool.o
HOSTCC tools/kwbimage.o
WRAP tools/lib/md5.c
HOSTCC tools/lpc32xximage.o
HOSTCC tools/mxsimage.o
HOSTCC tools/omapimage.o
HOSTCC tools/pblimage.o
HOSTCC tools/pbl_crc32.o
HOSTCC tools/vybridimage.o
LD .tmp_vmlinux.kallsyms1
KSYMS .tmp_vmlinux.kallsyms1.S
AS .tmp_vmlinux.kallsyms1.S
LD .tmp_vmlinux.kallsyms2
KSYMS .tmp_vmlinux.kallsyms2.S
AS .tmp_vmlinux.kallsyms2.S
LD vmlinux
SORTTAB vmlinux
SYSMAP System.map
OBJCOPY arch/arm64/boot/Image
MODPOST modules-only.symvers
GEN Module.symvers
CC [M] drivers/media/usb/gspca/gspca_main.mod.o
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/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmdhd.ko
LD [M] drivers/net/phy/realtek.ko
LD [M] drivers/net/ethernet/realtek/r8168/r8168.ko
Image: resource.img (with rk3588-toybrick-x0-android.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 (05:10 (mm:ss)) ####
/home/rootroot/android12-rk3588-new
Build kernel ok!
cp: cannot create regular file '/home/rootroot/android12-rk3588-new/out/target/product/rk3588_s/kernel': No such file or directory
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/rootroot/android12-rk3588-new
start build android
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=rk3588_s
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-135-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=SP2A.220305.012
OUT_DIR=out
============================================
09:00:03 Entire data directory removed.
09:00:03 Deleted images and staging directories.
#### build completed successfully (2 seconds) ####
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=rk3588_s
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-135-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=SP2A.220305.012
OUT_DIR=out
============================================
[100% 259/259] 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
libRkTeeWeaver want to conditional Compile
libgralloc_priv want to conditional Compile
libmpimmz conditional Compile
librga want to conditional Compile
librknnrt want to conditional Compile
Rockchip conditional compile
Optee Version: v2
>>>>>>>>>>>>>>>>>>>>> rk3588
librknnrt enabled on RK3588
librknnrt enabled on RK3588
librknnrt enabled on RK3588
[hardware/rockchip/libgralloc frameworks/native/include system/core/libsync system/core/libsync/include external/libdrm/include/drm] 32
error: hardware/rockchip/libmpimmz/Android.bp:24:1: module "gen_mmz_version": module source path "hardware/rockchip/libmpimmz/.git" does not exist
error: vendor/rockchip/hardware/interfaces/codec2/Android.bp:1:1: module "c2_version": module source path "vendor/rockchip/hardware/interfaces/codec2/.git/HEAD" does not exist
error: hardware/rockchip/libhwjpeg/Android.bp:1:1: module "gen_hwjpeg_version": module source path "hardware/rockchip/libhwjpeg/.git/HEAD" does not exist
09:01:23 soong bootstrap failed with: exit status 1
#### failed to build some targets (01:20 (mm:ss)) ####
Build android failed!
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$ make -j24
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=rk3588_s
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-135-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=SP2A.220305.012
OUT_DIR=out
============================================
error: hardware/rockchip/libmpimmz/Android.bp:29:9: expected bool, list, or string value; found "#"
#### failed to build some targets (2 seconds) ####
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$ make -j24
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=rk3588_s
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-135-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=SP2A.220305.012
OUT_DIR=out
============================================
[100% 1/1] 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
libRkTeeWeaver want to conditional Compile
libgralloc_priv want to conditional Compile
libmpimmz conditional Compile
librga want to conditional Compile
librknnrt want to conditional Compile
Rockchip conditional compile
librknnrt enabled on RK3588
librknnrt enabled on RK3588
librknnrt enabled on RK3588
Optee Version: v2
>>>>>>>>>>>>>>>>>>>>> rk3588
[hardware/rockchip/libgralloc frameworks/native/include system/core/libsync system/core/libsync/include external/libdrm/include/drm] 32
error: vendor/rockchip/hardware/interfaces/codec2/Android.bp:1:1: module "c2_version": module source path "vendor/rockchip/hardware/interfaces/codec2/.git/HEAD" does not exist
error: hardware/rockchip/libhwjpeg/Android.bp:1:1: module "gen_hwjpeg_version": module source path "hardware/rockchip/libhwjpeg/.git/HEAD" does not exist
09:11:40 soong bootstrap failed with: exit status 1
#### failed to build some targets (44 seconds) ####
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$ make -j24
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=rk3588_s
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-135-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=SP2A.220305.012
OUT_DIR=out
============================================
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
libRkTeeWeaver want to conditional Compile
libgralloc_priv want to conditional Compile
libmpimmz conditional Compile
librga want to conditional Compile
librknnrt want to conditional Compile
Rockchip conditional compile
librknnrt enabled on RK3588
librknnrt enabled on RK3588
librknnrt enabled on RK3588
Optee Version: v2
>>>>>>>>>>>>>>>>>>>>> rk3588
[hardware/rockchip/libgralloc frameworks/native/include system/core/libsync system/core/libsync/include external/libdrm/include/drm] 32
[100% 2/2] initializing build system ...
device/rockchip/common/prebuild.mk:2: warning: Generating manifest snapshot at out/commit_id.xml...
device/rockchip/common/prebuild.mk:3: warning: You can disable this by removing this and setting BOARD_RECORD_COMMIT_ID := false in BoardConfig.mk
[ 1% 7/354] including build/make/target/board/Android.mk ...
build fstab file with device/rockchip/common/scripts/fstab_tools/fstab.in....
rebuilding dtbo image with device/rockchip/rk3588/rk3588_s/dt-overlay.in....
build parameter.txt with device/rockchip/common/scripts/parameter_tools/parameter.in....
[ 28% 100/354] including external/rk_tee_user/v2/Android.mk ...
'building rk_tee_user v2'
[ 45% 162/354] including hardware/rockchip/camera_engine_rkisp/Android.mk ...
TARGET_BOARD_PLATFORM=rk3588
[ 47% 169/354] including hardware/rockchip/libhwjpeg/Android.mk ...
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
cat: /home/rootroot/.gitconfig: No such file or directory
[ 61% 217/354] including system/sepolicy/Android.mk ...
system/sepolicy/Android.mk:57: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.
system/sepolicy/Android.mk:62: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
[ 99% 353/354] finishing build rules ...
^
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt:56:36: warning: 'constructor Handler()' is deprecated. Deprecated in Java
private val handler: Handler = Handler()
^
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt:81:47: warning: no cast needed
1f - (it.animatedFraction as Float),
^
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/DeviceControlsControllerImpl.kt:94:51: warning: 'CONTROLS_ENABLED: String' is deprecated. Deprecated in Java
if (secureSettings.getInt(Settings.Secure.CONTROLS_ENABLED, 1) == 0) {
^
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tv/VpnStatusObserver.kt:43:24: warning: 'get(Class<T!>!): T!' is deprecated. Deprecated in Java
Dependency.get(SecurityController::class.java)
^
frameworks/base/packages/SystemUI/src/com/android/systemui/util/kotlin/nullability.kt:29:1: warning: expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of functional types
inline fun <T> Optional<T>.getOrNull(): T? = orElse(null)
^
[ 99% 130942/130962] //frameworks/base/packages/SystemUI:SystemUI r8 [common]
Warning: Missing class android.compat.annotation.UnsupportedAppUsage (referenced from: void com.android.systemui.people.widget.PeopleBackupHelper.writeNewStateDescription(android.os.ParcelFileDescriptor))
Missing class android.support.annotation.Keep (referenced from: kotlinx.coroutines.android.AndroidExceptionPreHandler)
Missing class org.jetbrains.annotations.NotNull (referenced from: java.util.List com.android.keyguard.FontInterpolator$VarFontKey.sortedAxes and 4935 other contexts)
Missing class org.jetbrains.annotations.Nullable (referenced from: android.graphics.fonts.Font com.android.keyguard.FontInterpolator$InterpKey.l and 1143 other contexts)
[100% 130962/130962] Target super fs image for debug: out/target/product/rk3588_s/super.img
2022-12-24 11:44:52 - build_super_image.py - INFO : Building super image from info dict...
2022-12-24 11:44:52 - sparse_img.py - INFO : Total of 234585 4096-byte output blocks in 18 input chunks.
2022-12-24 11:44:52 - sparse_img.py - INFO : Total of 37347 4096-byte output blocks in 6 input chunks.
2022-12-24 11:44:52 - sparse_img.py - INFO : Total of 81549 4096-byte output blocks in 6 input chunks.
2022-12-24 11:44:52 - sparse_img.py - INFO : Total of 924 4096-byte output blocks in 2 input chunks.
2022-12-24 11:44:52 - sparse_img.py - INFO : Total of 168 4096-byte output blocks in 2 input chunks.
2022-12-24 11:44:52 - sparse_img.py - INFO : Total of 64 4096-byte output blocks in 4 input chunks.
2022-12-24 11:44:52 - sparse_img.py - INFO : Total of 61123 4096-byte output blocks in 5 input chunks.
2022-12-24 11:45:01 - build_super_image.py - INFO : Done writing image out/target/product/rk3588_s/super.img
#### build completed successfully (02:28:36 (hh:mm:ss)) ####
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$ ./build.sh -u
will build update.img
-------------------KERNEL_VERSION:5.10
-------------------KERNEL_DTS:rk3588-evb1-lp4-v10
Force use clang and llvm to build kernel-5.10
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=12
TARGET_PRODUCT=rk3588_s
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-135-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=SP2A.220305.012
OUT_DIR=out
============================================
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 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
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/rootroot/android12-rk3588-new
Repacking header 2 boot...
make and copy android images
TARGET_PRODUCT=rk3588_s
TARGET_BASE_PARAMETER_IMAGE==device/rockchip/common/baseparameter/v2.0/baseparameter.img
HIGH_RELIABLE_RECOVERY_OTA=
BOARD_AVB_ENABLE=false
system filesysystem is ext4
create dtbo.img...
done.
create rockdev/Image-rk3588_s/resource.img...
done.
create rockdev/Image-rk3588_s/boot.img...
done.
create rockdev/Image-rk3588_s/boot-debug.img...
done.
skip copy images: /home/rootroot/android12-rk3588-new/out/target/product/rk3588_s/vendor_boot.img
skip copy images: /home/rootroot/android12-rk3588-new/out/target/product/rk3588_s/vendor_boot-debug.img
create rockdev/Image-rk3588_s/recovery.img...
done.
create rockdev/Image-rk3588_s/super.img...
done.
skip copy images: /home/rootroot/android12-rk3588-new/out/target/product/rk3588_s/userdata.img
create vbmeta.img...
BOARD_AVB_ENABLE is false, use default vbmeta.img
create misc.img.... done.
create uboot.img...
u-boot/trust.img not fount! Please make it from u-boot first!
create loader...
create config.cfg...
create baseparameter...done.
Make image ok!
Make update.img
packing update.img with Image -RK3588
regenernate package-file-tmp...
start to make update.img...
Android Firmware Package Tool v2.0
------ PACKAGE ------
Add file: ./package-file
package-file,Add file: ./package-file done,offset=0x800,size=0x29a,userspace=0x1
Add file: ./Image/MiniLoaderAll.bin
bootloader,Add file: ./Image/MiniLoaderAll.bin done,offset=0x1000,size=0x641c0,userspace=0xc9
Add file: ./Image/parameter.txt
parameter,Add file: ./Image/parameter.txt done,offset=0x65800,size=0x282,userspace=0x1
Add file: ./Image/uboot.img
uboot,Add file: ./Image/uboot.img done,offset=0x66000,size=0x400000,userspace=0x800
Add file: ./Image/misc.img
misc,Add file: ./Image/misc.img done,offset=0x466000,size=0xc000,userspace=0x18
Add file: ./Image/dtbo.img
dtbo,Add file: ./Image/dtbo.img done,offset=0x472000,size=0x1bb,userspace=0x1
Add file: ./Image/vbmeta.img
vbmeta,Add file: ./Image/vbmeta.img done,offset=0x472800,size=0x1000,userspace=0x2
Add file: ./Image/boot.img
boot,Add file: ./Image/boot.img done,offset=0x473800,size=0x2438800,userspace=0x4871
Add file: ./Image/recovery.img
recovery,Add file: ./Image/recovery.img done,offset=0x28ac000,size=0x44bf800,userspace=0x897f
Add file: ./Image/baseparameter.img
baseparameter,Add file: ./Image/baseparameter.img done,offset=0x6d6b800,size=0x100000,userspace=0x200
Add file: ./Image/super.img
super,Add file: ./Image/super.img done,offset=0x6e6b800,size=0x647405ac,userspace=0xc8e81
Add CRC...
Make firmware OK!
------ OK ------
********rkImageMaker ver 2.0********
Generating new image, please wait...
Writing head info...
Writing boot file...
Writing firmware...
Generating MD5 data...
MD5 data generated successfully!
New image generated successfully!
Making update.img OK.
Make update image ok!
/home/rootroot/android12-rk3588-new
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$ ./build.sh -u^C
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
rootroot@rootroot-MS-7885:~/android12-rk3588-new$
【处理笔记本电脑16GB的问题】
有些超薄的笔记本电脑是板载的16GB的内存,无法升级。
在都快编译完成的时候,出现问题:
[ 98% 128933/131220] //packages/providers/ContactsProvider:ContactsProvider r8 [common]
Warning: Missing class com.google.errorprone.annotations.CanIgnoreReturnValue (referenced from: java.lang.Object com.google.common.base.AbstractIterator.endOfData() and 106 other contexts)
Missing class com.google.errorprone.annotations.CompatibleWith (referenced from: boolean com.google.common.collect.Multimap.containsEntry(java.lang.Object, java.lang.Object) and 1 other context)
Missing class com.google.errorprone.annotations.DoNotMock (referenced from: com.google.common.collect.ImmutableCollection$Builder and 5 other contexts)
Missing class com.google.errorprone.annotations.ForOverride (referenced from: boolean com.google.common.base.Equivalence.doEquivalent(java.lang.Object, java.lang.Object) and 1 other context)
Missing class com.google.errorprone.annotations.concurrent.GuardedBy (referenced from: void com.google.common.collect.MapMakerInternalMap$Segment.drainKeyReferenceQueue(java.lang.ref.ReferenceQueue) and 5 other contexts)
Missing class com.google.errorprone.annotations.concurrent.LazyInit (referenced from: com.google.common.collect.ImmutableSet com.google.common.collect.ImmutableMap.entrySet and 5 other contexts)
[ 98% 128962/131220] //packages/modules/Connectivity/Tethering:InProcessTethering r8 [common apex30]
Warning: Library class com.android.internal.util.IndentingPrintWriter extends program class android.util.IndentingPrintWriter
[ 98% 128993/131220] //packages/apps/DeskClock:DeskClock r8 [common]
Warning: Missing class org.jetbrains.annotations.NotNull (referenced from: com.android.alarmclock.DigitalAppWidgetCityViewsFactory$Companion com.android.alarmclock.DigitalAppWidgetCityViewsFactory.Companion and 1458 other contexts)
Missing class org.jetbrains.annotations.Nullable (referenced from: java.util.List com.android.alarmclock.DigitalAppWidgetCityViewsFactory$RefreshRunnable.mCities and 417 other contexts)
[ 98% 129013/131220] //frameworks/base/packages/EasterEgg:EasterEgg kotlinc [common]
warni
出问题之后,直接:
make -j24
./build.sh -u
就可以生成update.img了。
我看到资料,貌似编译andorid10(RK3399平台)最少需要16GB内存,否则就会出错!