NanoPi K2 (Amlogic S905) Ubuntu 16.04 编译Android 5.1系统源码
1. 下载源码
在这里下载https://www.mediafire.com/folder/8xn2iirciznqh/S905压缩包,或者使用repo进行下载。按照https://wiki.friendlyarm.com/wiki/index.php/NanoPi_K2/zh这里下载。
2. 编译
编译的方法https://wiki.friendlyarm.com/wiki/index.php/NanoPi_K2/zh,为防止链接失效,我这里备份一下:
// #################################引用分隔线###############################################
编译Android
搭建编译环境
搭建编译Android的环境建议使用64位的Ubuntu 16.04,安装需要的包即可。
sudo apt-get install bison g++-multilib git gperf libxml2-utils make python-networkx zip
sudo apt-get install flex libncurses5-dev zlib1g-dev gawk minicom
更多说明可查看 https://source.android.com/source/initializing.html 。
下载Android5.1源代码
Android源代码的下载需要使用repo,其安装和使用请查看 https://source.android.com/source/downloading.html 。
mkdir android && cd android
repo init -u https://github.com/friendlyarm/android_manifest.git -b nanopi-k2-lollipop
repo sync
其中“android”是指工作目录。
编译系统
source build/envsetup.sh
lunch nanopi_k2-userdebug
make -j8
编译成功完成后,目录 out/target/product/nanopi-k2 下包含可用于烧写的image文件。
filename par