Revision: v1.0
1 Preparation
1.1 Create $HOME/cupcake
1.2 Create directories
drwxr-xr-x 2 hsiehwei hsiehwei 4096 2010-02-26 11:01 applications drwxr-xr-x 2 hsiehwei hsiehwei 4096 2010-02-26 12:27 bin drwxr-xr-x 2 hsiehwei hsiehwei 4096 2010-02-26 11:01 downloads drwxr-xr-x 2 hsiehwei hsiehwei 4096 2010-02-26 11:01 sdk drwxr-xr-x 17 hsiehwei hsiehwei 4096 2010-02-26 12:14 src drwxr-xr-x 2 hsiehwei hsiehwei 4096 2010-02-26 11:01 tools |
1.3 Prepare tools (GIT and others)
$ export PATH=$HOME/android/bin:$PATH $ sudo apt-get install git-core $ curl http://android.git.kernel.org/repo > ~/android/bin/repo $ chmod a+x ~/android/bin/repo $ sudo apt-get install python $ sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libreadline5-dev x11proto-core-dev libx11-dev liblzo2-dev $ sudo apt-get autoremove gcc g++ $ sudo apt-get install gcc-4.3 g++-4.3 $ sudo apt-get install uboot-mkimage /* Install Sun-Java-1.5.0 since jdk6 is NOT supported right now. But currently, Ubuntu 9.10 Karmic doesn’t maintain jdk1.5, therefore use Jaunty instead. */ $ sudo cp /etc/sources.list /etc/sources.list.karmic $ sudo vi /etc/sources.list /* Perform the following command in vi then save. */ :%s/karmic/jaunty/g /* Update package database */ $ sodu apt-get update /* Install jdk1.5 */ $ sudo apt-get install sun-java5-jdk $ sudo update-java-alternatives –l java-1.5.0-sun 53 /usr/lib/jvm/java-1.5.0-sun $ sudo update-java-alternatives –s java-1.5.0-sun |
1.4 Download Source Code
$ cd ~/cupcake /src $ repo init -u git://gitorious.org/android-on-freerunner/freerunner_platform_manifest.git -b cupcake /* This step would cost a lot time, and fails many times, please re-execute the above command when downloading stops. */ $ repo sync /* Update projects, copy downloaded code into current directory. Project-path can be found in src/.repo/manifests/default.xml, also in src/.repo/project.list */ $ repo sync /* Alternatively, use the following steps to build an automatic sync script. */ $ echo “#!/bin/bash” > syncall.sh $ cat .repo/project.list >> syncall.sh $ vi syncall.sh /* Perform the following command in vi then save. */ :%s:^\(\w\+\):repo sync \1:g $ chmod u+x syncall.sh $ ./syncall.sh |
1.5 Add GAO RFID Driver into the kernel
/* Add gao217003.c into kernel */ $ cd ~/cupcake/src $ cp path_to_gao217003.c kernel/drivers/usb/misc $ vi kernel/drivers/usb/misc/Kconfig /* Configure kconfig, add the following block in the end of the file. */
$ vi kernel/drivers/usb/misc/Makefile /* Configure makefile, add the following line into a proper place. */
/* Configure .config, add the following line into section of USB Miscellaneous drivers. */
|
2 Building
/* Build image */ $ cd ~/cupcake /src $ make clean TARGET_PRODUCT=freerunner $ make TARGET_SIMULATOR=false TARGET_PRODUCT=freerunner showcommands |
3 Flashing the Neo FreeRunner
/* Download and unpack the android-on-freerunner auto-installer from http://code.google.com/p/android-on-freerunner/, like android-on-freerunner-cupcake-0.1.1.tar.gz */ /* Replace kernel.img, system.img, userdata.img, ramdisk.img with just-built files from ~/cupcake/src/out/target/product/freerunner/ */ /* Copy those files to a microsd drive, and boot neo from the drive, the installation will start automatically */ /* The files we put into the driver look like: boot/ uImage-GTA02.bin (from android-on-freerunner-cupcake-0.1.1.tar.gz) kernel.img (we built) qi.img (from android-on-freerunner-cupcake-0.1.1.tar.gz) ramdisk.img (we built) system.img (we built) uImage (from android-on-freerunner-cupcake-0.1.1.tar.gz) uImage.bin (from android-on-freerunner-cupcake-0.1.1.tar.gz) userdata.img (we built) */ |
References:
[1] GIT Android on Freerunner, http://gitorious.org/android-on-freerunner
[2] Acndroid-on-freerunner, http://code.google.com/p/android-on-freerunner/
[5] Qi, http://wiki.openmoko.org/wiki/Qi
[6] Flashing the Neo FreeRunner, http://wiki.openmoko.org/wiki/Flashing_the_Neo_FreeRunner
[7] Neo FreeRunner 新手手冊 (9) 安裝 Android, SHR, FDOM, Debian 到 SD (SDHC) 卡, http://tony-tu.blogspot.com/2008/12/neo-freerunner-8-android-shr-fdom.html
[8] Android porting, http://wiki.openmoko.org/wiki/Android_porting
[16] http://www.mail-archive.com/android-freerunner@android.koolu.org/msg01049.html
沒有留言:
張貼留言