Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Android 版本: JellyBean 4.1.2

主机环境配置

给编译主机安装以下软件包

Code Block
languagebash
themeMidnight
sudo apt-get update 
sudo apt-get install git-core flex bison gperf libesd0-dev zip gawk libwxgtk2.6-dev \
		zlib1g-dev build-essential tofrodos libx11-dev libncurses5-dev \
		lib32readline-gplv2-dev  libstdc++6 lib32z1 ia32-libs \
		g++-multilib libx11-dev uboot-mkimage libxml2-utils xsltproc \
		texinfo quilt autoconf mtd-utils libncurses5-dev

...

Code Block
languagebash
themeMidnight
source ~/.bashrc

Android源码包获取

ftp://ftp.phytec.cn/AM335x/Android/phyCORE-AM335X-JellyBean-PD14.1.0_extracted_sources.tgz

...

Code Block
languagebash
themeMidnight
cd [Android-BSP]
sudo cp build/core/root.mk Makefile

Android BSP 编译

导入编译环境变量

Code Block
languagebash
themeMidnight
cd [Android-BSP]
export PATH=${PWD}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:${PATH}

编译Bootloaders, kernel 和 android系统

Code Block
languagebash
themeMidnight
cd [Android-BSP]
make TARGET_PRODUCT=pcm051 rowboat_clean
make TARGET_PRODUCT=pcm051 OMAPES=4.x -j<N>


Note

<N> 替换成编译主机的CPU线程数

创建文件系统

Code Block
languagebash
themeMidnight
make TARGET_PRODUCT=pcm051 fs_tarball

执行该操作后, 在out/target/product/pcm051/rootfs.tar.bz2 目录下就有对应的文件系统.

生成nand的文件系统

Code Block
languagebash
themeMidnight
./mkrootfs