内核编译报错:
错误1:
arch/arm64/Makefile:167: recipe for target 'kernel.img' failed
sudo apt-get install gcc-multilib
解决方法参考:
http://dev.t-firefly.com/thread-12595-1-8.html
二、编译环境搭建
本次Linux内核编译的主机系统是Ubuntu16.04。在进入内核编译之前,首先需要在主机系统上安装一些依赖包,
否则编译过程中会出现一系列问题。使用以下命令安装依赖的包:
sudo apt-get install build-essential lzop libncurses5-dev libssl-dev libc6:i386
其中,如果使用的是64位的Ubuntu,必须安装libc6:i386
接下来就可以下载firefly-rk3399的Linux内核和GCC交叉编译工具链了。可以在Ubuntu系统下使用Git工具克隆,
但是速度可能会比较慢,最好是直接从Github上下载压缩文件后再在Ubuntu系统中解压,如下图所示,其中linux-kernel-firefly是Linux内核源码,
prebuilts是交叉编译工具链。
错误2:
prebuilts/misc/linux-x86/bison/bison: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
[ 0% 17/50302] host Java: jarjar (out/host/common/obj/JAVA_LIBRARIES/jarjar_intermediates/classes)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
编译安装包时出现:
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or direcory。
下载安装如下两个库,问题解决
sudo apt-get install libstdc++6?
sudo apt-get install lib32stdc++6
解决方法参考:https://blog.csdn.net/pingxiaozhao/article/details/93637773
错误3
[ 0% 10/50287] Yacc: aidl <= system/tools/aidl/aidl_language_y.yy
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/bison/bison -d --defines=out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.h -o out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.cpp system/tools/aidl/aidl_language_y.yy"
[ 0% 10/50287] Lex: aidl <= system/tools/aidl/aidl_language_l.ll
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll"
flex-2.5.39:严重内部错误,exec of /usr/bin/m4 failed
[ 0% 10/50287] host Java: jsilver (out/host/common/obj/JAVA_LIBRARIES/jsilver_intermediates/classes)
注: external/jsilver/src/org/clearsilver/FactoryLoader.java使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
#### make failed to build some targets (57 seconds) ####
解决方法
参考:https://blog.csdn.net/kris_fei/article/details/53170215
sudo apt-get install bison
sudo apt-get install libxml2-utils
————————————————
版权声明:本文为CSDN博主「hlzs_01」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/hlzs_01/article/details/105144354