本帖最后由 蓝天-彭 于 2017-1-3 15:46 编辑
1.搭建Ubuntu12.04 下android编译环境
1.1.安装JDK$wgetdl.cubieboard.org/software/tools/android/jdk1.6.0_45.tar.gz 解压:$sudotar -xvf jdk1.6.0_45.tar.gz $sudo vim ~/.bashrc 增加: JAVA_HOME=/jdk_path exportJRE_HOME=/jdk_path/jre exportPATH=$JAVA_HOME/binJRE_HOME/binPATH jdk_path为你下载解压后的jdk路径 保存后使其生效且验证是否成功: $source~/.bashrc&&java -version
出现上图所示证明成功。 1.2.安装编译所需包(Ubuntu12.04):$sudoapt-get update $sudoapt-get upgrade $sudoapt-get install build-essential u-boot-tools uboot-mkimagebinutils-arm-linux-gnueabihf $sudoapt-get install gcc g++ gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihfg++-multilib $sudoapt-get install cpp-arm-linux-gnueabihf libusb-1.0-0 libusb-1.0-0-dev wget fakeroot $sudoapt-get install kernel-package zlib1g-dev libncurses5-devbuild-essential $sudoapt-get install texinfo texlive ccache zlib1g-dev gawk bison flexgettext uuid-dev $sudoapt-get install ia32-libs git gnupg flex bison gperf build-essentialzip $sudoapt-get install curl libc6-dev x11proto-core-dev libx11-dev:i386lib32ncurses5-dev $sudoapt-get install libreadline6-dev:i386 mingw32 tofrodos python-markdown $sudoapt-get install libxml2-utils xsltproc zlib1g-dev:i386 libgl1-mesa-dev
2.下载Android源码包在百度云下载源码压缩包: 3.编译解压源码: $sudotar -zxvf A10-android4.0.tar.gz 进入源码目录:$cdA10-android4.0/ 编译: $sourcebuild/envsetup.sh $lunch
输入4(选择cubieboard-eng)
整体编译: $make-j8 编译等待........ 编译完成:
如上图所示表示编译完成。 打包固件: $tools/pack-cm.sh
固件生成路径:A10-android4.0/tools/pack/sun4i_crane_cubieboard.img
|