./make all
- python not found:
sudo apt install python
Error: arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dts:148.1-8 Label or path rt5651 not found
Error: arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dts:158.1-15 Label or path hdmi_dp_sound not found
Error: arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dts:250.1-11 Label or path route_edp not found
FATAL ERROR: Syntax error parsing input tree
make[1]: *** [scripts/Makefile.lib:314:arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dtb] 错误 1
make: *** [arch/arm64/Makefile:122:rockchip/rk3399-sapphire-excavator-edp.dtb] 错误 2
make: *** 正在等待未完成的任务....
使用./build.sh时,编译kernel错误,后来使用./make.sh就没有这些错误了。
另外,编译时要先安装编译相关的库,参照网址
http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4/zh#.E7.BC.96.E8.AF.91.E5.B9.B6.E7.94.9F.E6.88.90Image.E6.96.87.E4.BB.B6
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 openjdk-8-jdk
sudo apt-get install exfat-fuse exfat-utils device-tree-compiler liblz4-tool
- prebuilts/clang/host/linux-x86/clang-4053586/bin/clang++.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
sudo apt-get install libncurses5
- ninja: build stopped: subcommand failed.
vi prebuilts/sdk/tools/jack-admin
JACK_SERVER_COMMAND="java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -Xmx4096m -cp $LAUNCHER_JAR $LAUNCHER_NAME"
添加参数-Xmx4096m
prebuilts/sdk/tools/jack-admin stop-server
rm ~/.jack-server
- 编译过程中,多次出现jack-server被杀死导致编译错误的情况,
只能重新编译。
我是先把boot kernel 分别编译成功后,又单独编译了android
./make boot 单独编译boot
./make kernel 单独编译kernel
./make android 单独编译android
这三个都编译完成后,再整体编译一遍,主要是打包工作
./make all
最后整个代码编译完成后,差不多140G
编译过程中多次出现空间不足(我在mac mini上装了双系统,分了150G给ubuntu)
各种删东西,最后把代码树里的.git给删掉,才最终编译成功。
坑啊。。
############2019/9/9更新#######
build/core/Makefile:35: warning: overriding commands for target `out/target/product/rk3399/vendor/lib/libjpeghwdec.so'
build/core/base_rules.mk:390: warning: ignoring old commands for target `out/target/product/rk3399/vendor/lib/libjpeghwdec.so'
build/core/Makefile:35: warning: overriding commands for target `out/target/product/rk3399/vendor/lib64/libjpeghwenc.so'
build/core/base_rules.mk:390: warning: ignoring old commands for target `out/target/product/rk3399/vendor/lib64/libjpeghwenc.so'
[ 50% 1/2] glob art
[ 0% 1/18096] Lex: applypatch <= bootable/recovery/edify/lexer.ll
FAILED: out/target/product/rk3399/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp
/bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/target/product/rk3399/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp bootable/recovery/edify/lexer.ll"
flex-2.5.39: loadlocale.c:130:_nl_intern_locale_data: ?? 'cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' ???
Aborted (core dumped)
[ 0% 4/18096] Ensuring Jack server is installed and started
Installing jack server in "/home/gspot/.jack-server"
Warning:
JKS 密钥库使用专用格式。建议使用 "keytool -importkeystore -srckeystore /home/gspot/.jack-server/server.jks -destkeystore /home/gspot/.jack-server/server.jks -deststoretype pkcs12" 迁移到行业标准格式 PKCS12。
Warning:
JKS 密钥库使用专用格式。建议使用 "keytool -importkeystore -srckeystore /home/gspot/.jack-server/client.jks -destkeystore /home/gspot/.jack-server/client.jks -deststoretype pkcs12" 迁移到行业标准格式 PKCS12。
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m -cp /home/gspot/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
ninja: build stopped: subcommand failed.
09:44:00 ninja failed with: exit status 1
#### failed to build some targets (01:18 (mm:ss)) ####
Build android failed!
在build/envsetup.sh脚本中最后添加一句话
export LC_ALL=C