编译报错信息:

FAILED: out/target/product/rk3399_Android11/recovery.img

/bin/bash -c "(out/host/linux-x86/bin/mkbootimg --kernel  out/target/product/rk3399_Android11/kernel   --ramdisk out/target/product/rk3399_Android11/ramdisk-recovery.img --cmdline \"console=ttyFIQ0 androidboot.baseband=N/A androidboot.wificountrycode=CN androidboot.veritymode=enforcing androidboot.hardware=rk30board androidboot.console=ttyFIQ0 androidboot.verifiedbootstate=orange firmware_class.path=/vendor/etc/firmware init=/init rootwait ro loop.max_part=7 buildvariant=userdebug\" --recovery_dtbo out/target/product/rk3399_Android11/rebuild-dtbo.img --dtb out/target/product/rk3399_Android11/dtb.img --os_version 11 --os_patch_level 2021-08-05 --second kernel/resource.img --header_version 2 --output  out/target/product/rk3399_Android11/recovery.img ) && (size=\$(for i in  out/target/product/rk3399_Android11/recovery.img; do stat -c \"%s\" \"\$i\" | tr -d '\\n'; echo +; done; echo 0); total=\$(( \$( echo \"\$size\" ) )); printname=\$(echo -n \" out/target/product/rk3399_Android11/recovery.img\" | tr \" \" +); maxsize=\$((   100663296-0)); if [ \"\$total\" -gt \"\$maxsize\" ]; then echo \"error: \$printname too large (\$total > \$maxsize)\"; false; elif [ \"\$total\" -gt \$((maxsize - 32768)) ]; then echo \"WARNING: \$printname approaching size limit (\$total now; limit \$maxsize)\"; fi )"

error: +out/target/product/rk3399_Android11/recovery.img too large (108756992 > 100663296)

[ 89% 94297/104981] soong_build docs out/soong/docs/soong_build.html

libRkTeeWeaver want to conditional Compile

libcameradevice want to conditional Compile

libgralloc_priv want to conditional Compile

librga want to conditional Compile

librockit want to conditional Compile

Rockchip conditional compile

Optee Version: v1

[hardware/rockchip/libgralloc] 30

>>>>>>>>>>>>>>>>>>>>>

libcameradevice curr board is rk356x

15:06:10 ninja failed with: exit status 1

#### failed to build some targets (58:30 (mm:ss)) ####

Build android failed!

解决方法:

搜索关键词:100663296 后确定需要修改的文件:

vim device/rockchip/common/BoardConfig.mk +180

按照如下修改方式可以解决:

  #BOARD_RECOVERYIMAGE_PARTITION_SIZE ?= 100663296    #等于96MB

  BOARD_RECOVERYIMAGE_PARTITION_SIZE ?= 115343360      #等于110MB

Logo

更多推荐