android4.0.3在pandaboard上的成功移植

来源:互联网 发布:flex2找不到软件 编辑:程序博客网 时间:2024/05/01 10:47
内核和文件系统代码下载均参照以下网址即可
http://source.android.com/source/downloading.html

详情见:http://blog.chinaunix.net/space.php?uid=495571&do=blog&id=3071261

环境设置:
在fedora15平台下,安装
jdk1.6.0_27,
设置环境变量:

export JAVA_HOME="/home/jdk1.6.0_27"
export PATH="/home/arm-2010q1/bin:$PATH"


第一步:下载linux内核源代码
Download the kernel source code: git clone https://android.googlesource.com/kernel/omap.git
    In the omap/ (kernel source) directory
        Switch to the correct branch: git branch -t remotes/origin/android-omap-panda-3.0.
        Set up the base make configuration: make panda_defconfig
        Configure the kernel as desired: make menuconfig
        Compile: make ARCH=arm CROSS_COMPILE=/path/to/android-source/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
    When done, cp arch/arm/boot/zImage /path/to/android-source/device/ti/panda/kernel (note, this will overwrite the existing kernel).
*此一步很重要,将zImage重命名为kernel,主要是采用自己的内核进行文件系统的编译。



第二步:下载android4.0.3源代码
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod 755 ~/bin/repo
export PATH=$PATH:~/bin/repo
cd ~
mkdir android
cd android
repo init -u https://android.googlesource.com/platform/manifest
repo sync -j4
#再下载 http://code.google.com/android/nexus/drivers.html#panda
wget https://dl.google.com/dl/android/aosp/imgtec-panda-iml74k-cfb7bdad.tgz
tar xzfv imgtec-panda-itl41d-dfebf249.tgz
./extract-imgtec-panda.sh 
将生成的vendor目录放到源代码根目录下
#source build/envsetup.sh
#lunch full_panda-eng
#make
等待编译完成即可


第三步:sd卡的烧写
烧写时需要先执行
#source buile/envsetup.sh
#lunch full_panda-eng
接下来的烧写步骤参考device/ti/panda/README
烧写所需要的boot.img  userdata.img  system.img  ramdisk.img均在
/out/target/product/panda中,此处的kernel文件应该就是自己编译好的kernel文件

第四步:fastboot的使用
1. 在x86机器上,可以参照device/ti/panda/README进行fastboot的烧写:
device/ti/panda/usbboot device/ti/panda/bootloader.bin
此一步必须在X86机器上进行,经测试是可行的,但在I386机器上,执行没有反应

2. 此处介绍i386或虚拟机上的fastboot启动:
在android2.3的基础上,sd卡已经被分区为boot和rootfs两个分区,boot分区中已经有
了mol、boot.bin、uImage三个文件,在启动正常的情况下,
按下开发板上的gpio_121按键,再插上电源
则串口提示:entered fastboot......
将板子上的minisub口接在计算机上,打开终端,输入
#fastboot devices
此处应该能检测到开发板
再按照device/ti/panda/README中的提示,进行
fastboot oem format
fastboot flash xloader device/ti/panda/xloader.bin
fastboot flash bootloader device/ti/panda/bootloader.bin
fastboot erase cache
fastboot flash userdata
fastboot flashall

注:如果是在网上直接下载的
pandaboard.android403.tar_.bz2 (87.15 MB)和pandaboard.android4.tar_.bz2 (84.6 MB)包,
解压后,应该将其中的内容拷贝到你的/out/target/product/panda路径下,因为fastboot执行fastboot flash userdata时,需要
的环境变量是由source buile/envsetup产生的,在此终端下,烧写所需文件均指向/out/target/product/panda目录下
完成
原创粉丝点击