Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2885492
  • 博文数量: 674
  • 博客积分: 17881
  • 博客等级: 上将
  • 技术积分: 4849
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-17 10:15
文章分类

全部博文(674)

文章存档

2013年(34)

2012年(146)

2011年(197)

2010年(297)

分类: LINUX

2012-07-13 10:53:44

#0.build environment for android4.0.3 whith ubuntu10.04 64bit

#(1)java6.0,
udo add-apt-repository "deb  lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk

#(2)##64-bit (recommended)
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc
##On Ubuntu 10.10:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
##On Ubuntu 11.10:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so

(or
###32-bit (experimental)
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown libxml2-utils xsltproc
)
##(3)The recommended approach is to create a file /etc/udev/rules.d/51-android.rules (as the root user) and to copy the following lines in it. must be replaced by the actual username of the user who is authorized to access the phones over USB.

# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="nation"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="nation"
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="nation"
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="nation"
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="nation"
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="nation"
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="nation"
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="nation"
# adb protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="nation"
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="nation"

#note:nation is the your user name of ubuntu

##(4)
export PATH=$PATH:/usr/local/arm/arm-2010q1/bin
export CROSS_COMPILE=arm-none-linux-gnueabi-

#1.android4.0.3 download and make
#(1)download

mkdir ~/bin
export PATH=~/bin:$PATH
curl  > ~/bin/repo
chmod a+x ~/bin/repo

mkdir android4.0
cd android4.0
repo init -u  -b android-4.0.3_r1
repo sync

#(2)make
. build/envsetup.sh

lunch full_panda-eng

make -j4

2.#kernel download and make

git clone 

git branch -a

git checkout remotes/origin/android-omap-panda-3.0#(omap4430:pandaboard)

export CROSS_COMPILE=arm-none-linux-gnueabi-

make ARCH=arm distclean

make ARCH=arm panda_defconfig

make ARCH=arm uImage
(注:可将编译出来的zImage 重名为kernel然后替换android/out/.../panda/下的kernel后重新编译一下即是用上了自己编译的kernel了)
#3.fastboot download image(利用fastboot烧SD卡)
ca android/ICS/

source build/envsetup.sh
lunch full_panda-eng

sudo device/ti/panda/usbboot device/ti/panda/bootloader.bin
sudo out/host/linux-x86/bin/fastboot oem format
sudo out/host/linux-x86/bin/fastboot flash xloader device/ti/panda/xloader.bin
sudo out/host/linux-x86/bin/fastboot flash bootloader device/ti/panda/bootloader.bin

sudo out/host/linux-x86/bin/fastboot erase cache
out/host/linux-x86/bin/fastboot flash userdata
out/host/linux-x86/bin/fastboot flashall

(注:pandaboard开机时需要按一个键进入fastboot模式)

###3 make android4.0.3 error
(1)android源码编译出错
[out/host/linux-x86/obj/EXECUTABLES/emulator-arm intermediates/emulator-arm] Error 1
解决方法:
#You are not doing anything wrong, this is a GCC 4.6 restriction.

#Here is what you need to do for 4.0.3:
build/core/combo/HOST_linux-x86.mk:61 HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
build/core/combo/javac.mk:15 COMMON_JAVAC := javac -J-Xmx512M -target 1.5 -source 1.5 -Xmaxerrs 9999999   #add"-source 1.5"
frameworks/base/libs/util/Android.mk: 63 LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive  #add "-fpermissiv"
libcore/luni/src/main/java/java/lang/Enum.java: 128 return ordinal - o.ordinal ();
external/gtest/include/gtest/internal/gtest-param-util.h:40 #include (after #include ) #add " #include "
(2)一直在adnroid字样logo中无法进入界面

下载imgtec-panda-iml74k-cfb7bdad.tar.gz(本人的资源库中有得下)
tar xvf imgtec-panda-iml74k-cfb7bdad.tar.gz

cd imgtec-panda-iml74k-cfb7bdad

cp imgtec-panda-iml74k-cfb7bdad.sh android/ICS/(这是用户具体的ICS系统目录下)

./imgtec-panda-iml74k-cfb7bdad.sh

至此重新编译系统即可HDIM输入android4.0.的界面

http://blog.csdn.net/nation_chen/article/details/7183850 

阅读(1133) | 评论(0) | 转发(1) |
0

上一篇:Timed GPIO

下一篇:OMAP4开发资源总结

给主人留下些什么吧!~~