nanopi内核编译:
编译环境:VMware+ubuntu
交叉编译器:gcc-linaro-arm.tar.xz
内核源码:linux-3.4 BSP(全志H3厂商全志科技提供)
步骤:
1.从github上克隆lichee源码
$ git clone https://github.com/friendlyarm/h3_lichee.git lichee
2.安装交叉编译器
访问此处下载地址的toolchain目录,下载交叉编译器gcc-linaro-arm.tar.xz,将该压缩包放置在lichee/brandy/toochain/目录下即可,无需解压。
3.编译lichee源码
$ cd lichee
$ ./build.sh -p sun8iw7p1 -b nanopi-h3
(1) 遇到的问题:

编译不同之处为脚本打印:
echo "*******************************"
错误提示:arm-linux-gnueabi-gcc: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
解决方法:
$ apt-get install lib32z1 lib32ncurses5
$ apt-get install lib32stdc++6
(2)重新编译,遇到的问题:

错误提示:"mkimage" command not found - U-Boot images will not be built
解决方法:
sudo apt-get install uboot-mkimage
sudo apt-get install u-boot-tools
(4)重新编译,遇到的问题:

错误提示:../scripts/build_rootfs.sh:line 19:fakeroot:command not found
解决方法:
sudo apt-get install fakeroot
重新编译,遇到的问题:

错误提示:awk:line 2:function strtonum never defined
解决方法:
sudo apt-get install gawk
重新编译
4.编译成功

本文详细介绍了在VMware环境下使用Ubuntu和交叉编译器gcc-linaro-arm,针对全志H3平台的NanoPi进行内核编译的过程。包括lichee源码的克隆、交叉编译器的安装、lichee源码的编译以及解决编译过程中遇到的各种错误的方法。
200

被折叠的 条评论
为什么被折叠?



