《Android-linux-sunxi51591.pdf》由会员分享,可在线阅读,更多相关《Android-linux-sunxi51591.pdf(7页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、2014年7月26日Android-linux-sunxi.orghttp:/linux-sunxi.org/Android1/7AndroidFrom linux-sunxi.orgBuilding Android(operating system)(http:/en.wikipedia.org/wiki/Android_%28operating_system%29)for an embedded A10device can be done in a variety of ways.One method is to use the repo tool fromgoogle and point
2、 to a git repository.Here is one example of building and flashing Android on the cubieboard.This samemethod should apply to other A10 boards.Contents1 Android repo setup instructions for Android on A102 Detailed instructions for Ubuntu 12.04(and variants)2.1 Introduction2.2 SET BASIC PATH AND ENVIRO
3、NMENT SETTINGS2.3 X-INSTALL JAVA DEVELOPMENT KIT FROM ORACLE2.4 X-PREPARE THE ANDROID NEEDED TOOLS AND LIBS(FOR 12.04)2.5 X-PREPARE THE ANDROID NEEDED TOOLS AND LIBS(FOR 12.10)2.6 X-IS TIME TO BUILD ANDROID FROM SOURCES3 Install LiveSuit on Linux(64bit)4 Flash nand flash on your board5 Tips and tric
4、ks5.1 Uploading files from Android to a tftp server6 See alsoAndroid repo setup instructions for Android on A101)Install Java 1.6 JDK(recently Oracle has made this more difficult,but you cando it following these instructions:(http:/ the binary here:Oracle Java 1.6(http:/ repo tool(http:/ the sources
5、 and sync the android repository(this will download a largeamount of files and take a while)mkdir cubie_android_ics&cd cubie_android_icsrepo init-u https:/ ics-cubieboard cp.repo/manifests/local_manifest.xml.repo/2014年7月26日Android-linux-sunxi.orghttp:/linux-sunxi.org/Android2/74)Fix the bad manifest
6、:(fixed now,so skip this step)sudo cd cubie_android_ics/.reposudo leafpad local_manifest.xmlNow change this line and save the modified manifest:to:5)sync the repository:repo sync 6)build android-(Note:you will need around 40GB of free space to build android)source build/envsetup.sh lunch 4#option 4
7、is cubieboard-engmake-j4#there maybe errors like to ask you make update-api7)Create the install image:chmod+x./tools/pack-cm.sh./tools/pack-cm.sh You will see:-image is at-/home/username/cubie/allwinner-pack-tools/pack/sun4i_linux_cubieboard.imgDetailed instructions for Ubuntu 12.04(andvariants)(cou
8、rtesy of Silverio Diquigiovanni)IntroductionIn that document I will describe step by step all operations needed to build androidICS for AllWinner cubieboard using XUBUNTU 12.04-64Bit Precise Pangolin LTS.Sameinfo are valid for all UBUNTU 12.04-64Bit distros like LUBUNTU,KUBUNTU and so on.Ive also tr
9、ied,with success,to use XUBUNTU 12.10-64bit so some parts are also12.10 related.2014年7月26日Android-linux-sunxi.orghttp:/linux-sunxi.org/Android3/7PS:Thats a document for DUMMIES/NOOBS so dont care if I was so pedant in somestep description.To keep simple my job Ive installed XUBUNTU in a VMware Virtu
10、al Machine,actuallyin VMware Fusion with Mac OS X Lion as host computer.To work fine the virtualmachine should have at least 4GB of ram and a disk of least 40GB.Also SWAP disk isimportant and mine was set to 2GB.More than one CPU are apprecied.PS:Ive used a virtual machine because some things on XUB
11、UNTU evironment need to beforced and I would not to use that for my daily jobs,but you can choose to use your working machine.So:-Get xubuntu 12.04-64Bit from xubuntu repositories and install it in a virtualmachine.Remember to update it.-Install VMware Tools(if you need them-notnecessary).SET BASIC
12、PATH AND ENVIRONMENT SETTINGScd/mkdir-p androidmkdir-p android/binADD export paths for android develop environmentnano/.bashrc#add this line at file tailexport PATH=$PATH:/home/shine/android/binCLOSE and REOPEN terminal consoleX-INSTALL JAVA DEVELOPMENT KIT FROM ORACLEDOWNLOAD and INSTALL reposudo a
13、pt-get install curlcurl https:/dl- /android/bin/repochmod a+x/android/bin/repoDOWNLOAD and INSTALL jdk-6u24-linux-x64.bin from oracle download pagecd/Downloads/chmod+x jdk-6u24-linux-x64.bin./jdk-6u24-linux-x64.bin 2014年7月26日Android-linux-sunxi.orghttp:/linux-sunxi.org/Android4/7sudo mkdir/usr/lib/j
14、vmsudo mv jdk1.6.0_24/usr/lib/jvmsudo update-alternatives-install/usr/bin/java java/usr/lib/jvm/jdk1.6.0_24/bin/java 1sudo update-alternatives-install/usr/bin/javac javac/usr/lib/jvm/jdk1.6.0_24/bin/javac 1sudo update-alternatives-install/usr/bin/javaws javaws/usr/lib/jvm/jdk1.6.0_24/bin/javaws 1sud
15、o update-alternatives-config javasudo update-alternatives-config javacsudo nano/etc/environment#add this line at file tailJAVA_HOME=/usr/lib/jvm/jdk1.6.0_24source/etc/environmentX-PREPARE THE ANDROID NEEDED TOOLS AND LIBS(FOR 12.04)sudo apt-get install git gnupg flex bison gperf build-essential zip
16、curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g+-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386sudo ln-s/usr/lib/i386-linux-gnu/mesa/libGL.so.1/usr/lib/i386-linux-gnu/libGL.soX-PREPAR
17、E THE ANDROID NEEDED TOOLS AND LIBS(FOR 12.10)sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g+-mult
18、ilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2
19、-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python sudo ln-s/usr/lib/i386-linux-gnu/mesa/libGL.so.1/usr/lib/i386-linux-gnu/libGL.soUnfortunately ICS dont compile with gcc(Ubuntu/Linaro 4.7.2-2ubuntu1)4.7.2already installed on(*)ubuntu so we need to manually install 4.4 version
20、 withfollowing command:sudo apt-get install gcc-4.4 g+-4.4 g+-4.4-multilib gcc-4.4-multiliband manually change the softlink with:.2014年7月26日Android-linux-sunxi.orghttp:/linux-sunxi.org/Android5/7X-IS TIME TO BUILD ANDROID FROM SOURCESmkdir-p/android/build/Cubieboardcd/android/build/Cubieboard/wget h
21、ttp:/dl.cubieboard.org/software/a10-cubieboard/android/cubieboard_opentv.tar.gz(also look at http:/ we will check that cubieboard_opentv.tar.gz match what used by that document:md5sum cubieboard_opentv.tar.gz$-d36631c98f30ebc0f43eeafeba8201ec cubieboard_opentv.tar.gztar-zxf cubieboard_opentv.tar.gzc
22、d cubieboard-tv-sdk/A this point is necessary to fix a but in cubieboard_opentv script and precisely tofollowing file:nano frameworks/base/media/libstagefright/Android.mksearch LOCAL_STATIC_LIBRARIES and add to list:libstagefright_rtsp so you get:LOCAL_STATIC_LIBRARIES:=libstagefright_color_conversi
23、on libstagefright_aacenc libstagefright_amrnbenc libstagefright_amrwbenc libstagefright_avcenc libstagefright_m4vh263enc libstagefright_matroska libstagefright_timedtext libvpx libstagefright_mpeg2ts libstagefright_id3 libFLAC libstagefright_rtsp .Time to build all from cubieboard_opentv root path:)
24、.build/envsetup.sh lunch#(perhaps typo?Maybe launch?-simos)make-j4and create the.img that is suitable for LiveSuittools/pack-cm.shInstall LiveSuit on Linux(64bit)2014年7月26日Android-linux-sunxi.orghttp:/linux-sunxi.org/Android6/7sudo apt-get install dkmsgit clone https:/ cubieboardunzip allwinner-pack
25、-tools/tools/Livesuit-linux.zipchmod+x LiveSuit_For_Linux64/LiveSuit.run./LiveSuit_For_Linux64/LiveSuit.run#livesuit will be installed to/BinFlash nand flash on your boardsudo/Bin/LiveSuit/LiveSuit.sh#run livesuit1)Livesuit GUI will start2)Choose the image we built just now(sun4i_linux_cubieboard.im
26、g)3)Disconnect all power to board,connect USB cable to board side,but not computer,then hold down usb boot button on your board,and plug in USB to computer-a newdevice should be detected.If using a virtual machine you may need to modify your.vmx file to include the skip reset usb-quirk option.Instea
27、d of this method,youcan follow the instructions to get into FEL mode.4)It should ask to format the partition first,say yes.5)You should see the progress bar increasing.6)flashing should complete in about 3-4 minutesTips and tricksUploading files from Android to a tftp serverAndroid will expose a she
28、ll on serial line.You will not get a promtp,justtype in some command and press Enter to see if the shell is really there.Set up network,replace XXX with YYY ip addr add 192.168.0.XXX/24 dev eth0 ip link set eth0 up ip route add 0.0.0.0/0 via 192.168.0.YYY dev eth0Use tftp,replace ZZZ.NOTE:Your tftp
29、root directory should be world writable and there should be aworld writable file with the name$TFTPROOT/path/to/file.txt on the server,otherwise it will not work.busybox tftp-p-l/path/to/file.txt 192.168.0.ZZZSee also2014年7月26日Android-linux-sunxi.orghttp:/linux-sunxi.org/Android7/7Building Jellybean for cubieboard.Retrieved from http:/linux-sunxi.org/index.php?title=Android&oldid=7537Categories:TutorialAndroidThis page was last modified on 27 March 2014,at 00:46.This page has been accessed 35,828 times.Content is available under Creative Commons Attribution unless otherwise noted.
限制150内