iMx51-android源代码Git管理操作手册及编译

 

 

一,       从Git仓库中下载iMx51-android源程序

(1) 下载repo工具:

1, mkdir ~/android-imx

2, cd ~/android-imx

3, curl http://android.git.kernel.org/repo > ./repo

4, chmod a+x ./repo

 

 说明:如果系统环境中存在repo工具,则3,4步可以省略。

 

(2)下载iMx51-android code

5, repo init -u git://192.168.10.225/imx/arm/platform/manifest.git

6, cd  .repo/manifests

7, git branch -a

8, git checkout origin/froyo-imx -b froyo-imx

9, cd ~/android-imx

10, repo sync

 

 说明:下载完之后,在目录 ~/android-imx下,包括了kernel_imx,和uboot-imx

 

二,Git操作

(1)    提交修改:

1, git checkout korg/froyo -b froyo

2, git commit -a -s -m "所提交内容的描述"

3, git push

 

(2)    更新git服务器的内容到本地。

1, git pull

2, cd  ~/android-imx

repo sync

 

(3)    常用其它相关的命令:

1, git-log    查看修改日志

2, git-status  查看状态

3, git diff    比较不同

 

 

 

 

三,编译

 

(1)    设置编译环境:(imx-android-r9.2.tar.gz工具可从233上获得)

1,      export ARCH=arm
2,      export CROSS_COMPILE=/opt/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
3,      export PATH=/opt/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin:$PATH

 

(2)    编译Uboot-imx

 

1,cd ~/android-imx/bootable/bootloader/uboot-imx

2,make distclean

3,make mx51_bbg_android_config

4,make

5,sudo dd if=./u-boot.bin of=./u-boot-no-padding.bin bs=1024 skip=1

6,sync

 

(3)    编译kernel-imx

 

export PATH=~/android-imx/bootable/bootloader/uboot-imx/tools:$PATH

1,cd ~/android-imx/kernel_imx

2,make imx5_android_defconfig

3,make uImage

4,cd ~/android-imx/kernel_imx/arch/arm/boot

5,~/android-imx/bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T kernel -C none -a 0x90008000 -e 0x90008000 -n "Android Linux Kernel" -d ./zImage ./uImage

 

(4)    编译android

 

1,cd ~/android-imx

2,make PRODUCT-imx51_bbg-eng 2>&1 | tee build_imx51_bbg_android.log

3,cd  android-imx/out/target/product/imx51_bbg

4,~/android-imx/bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T ramdisk -C none -a 0x90308000 -n "Android Root Filesystem" -d ./ramdisk.img ./uramdisk.img

 

 

Git指南:http://www.vogella.com/articles/Git/article.html#firstgitresult

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值