Hi, I'm trying to create a port of Android to the gumstix Overo Earth platform with the Palo43 touchscreen (www.gumstix.com). I have attached the entire procedure that I have followed so far below. I would appreciate it if someone could help me with completing this port.
My immediate problem and the point that I am currently stuck at, is as follows: I have created a set of patch files from the generic android-2.6.29 branch, but then came across the following post that all the android stuff for 2.6.29 is located under the driver/staging/android directory. How should I re-arrange it and create a new set of patch files to move all this to the correct location (not sure which the correct location is)? I use the following commands to create the first set of patch files: $ mkdir android $ cd android $ git clone git://android.git.kernel.org/kernel/common.git kernel $ cd kernel $ git checkout --track -b android-2.6.29 origin/android-2.6.29 $ git format-patch v2.6.30-rc1 How do I create a set of patches to move the required files to the correct location. I came across another post that talked about some missing files, like ashmem, etc. How cam I get this complete list of files and create a working patch? Best regards, Elvis How to port Android to the Overo TI OMAP 3503 platform ----------------------------------------------------------------------------------- Overview This document describe the procedure to patch the Overo linux kernel to run the Android platform on the Overo Earth. Procedure Step 01.00: Set up the Overo build environment. These instructions will assume that you are installing the build system in your home directory under "overo-oe". If you decide to put it elsewhere you will need to make appropriate alterations to the steps below. First we will create the "overo-oe" directory and cd into it: $ mkdir -p ~/overo-oe $ cd ~/overo-oe Then we will install the OE metatdata, and check out the overo branch (you can safely ignore the warnings you will get from the git commands): $ git clone git://gitorious.org/gumstix-oe/mainline.git org.openembedded.dev $ cd org.openembedded.dev $ git checkout --track -b overo origin/overo The next step installs BitBake: $ cd ~/overo-oe $ svn co svn://svn.berlios.de/bitbake/branches/bitbake-1.8/ bitbake Step 01.01: Create the OE configuration files and profile. We now will create a profile script and the configuration files required to tailor OE to our needs. To make this a somewhat easier task, there is a template for the required files in the openembedded installation we just did. Copy these files to your overo-oe directory: $ cp -r org.openembedded.dev/contrib/gumstix/build . If you have followed the example installation and placed the build system in overo-oe in your home directory, you are now ready to proceed to the next step. If you have installed the build system in a different location you will need to edit overo-oe/build/profile and change the definition of OVEROTOP as appropriate. Step 01.02: Setup source code caching. As part of the build process OpenEmbedded downloads source code tarballs for the linux kernel, compiler, and other software packages. By default this source code cache will be placed in overo-oe/sources. If you would like this cache to be located elsewhere, now is the time to edit build/conf/site.conf and set DL_DIR as appropriate. For example, if you would like to cache the sources in /usr/share/ sources, perform the following steps: Add new group for cache management and add operating user to this group. $ sudo groupadd oe $ sudo usermod -a -G oe {your_username} Next make source code storing directory and set owner and permission appropriately. $ sudo mkdir /usr/share/sources $ sudo chgrp oe /usr/share/sources $ sudo chmod 0775 /usr/share/sources $ sudo chmod ug+s /usr/share/sources Edit the buid/conf/site.conf and set DL_DIR to /usr/share/sources as follows: DL_DIR = "/usr/share/sources" Step 01.03: Setup environment variables. Press ctrl+h to display all hidden files. Setup environment variables by modifying you bash profile. Copy the contents of ~/gumstix-oe/extras/profile to you .bashrc file. $ cp ~/.bashrc ~/bashrc.bak $ cat ~/overo-oe/build/profile >> ~/.bashrc Step 01.04: Modify the OE sources overo-oe/conf/auto.conf overo-oe/conf/local.conf overo-oe/org.openembedded.dev/conf/machine/overo3503-palo43.conf overo-oe/org.openembedded.dev/conf/distro/android-1.0.conf Search for the omap3-console-image.bb file by typing the following command find org.openembedded.dev -name *.bb | grep “omap*” This should be located in the following folder: overo-oe/org.openembedded.dev/recipies/images/ Create a copy of the following file: recipies/images/omap3-console-image.bb and save it as recipies/images/omap3-android-image.bb Step 02.00: Download the android-2.6.29 kernel sources. Adapted from instructions outlined in Get source (Android Open Source Project). Step 02.01: Create an empty directory to hold your working files: $ mkdir android $ cd android We’re only interested in getting the Android Kernel sources, so type the following command: $ git clone git://android.git.kernel.org/kernel/common.git kernel Step 02.02: Check out the android-2.6.29 kernel files. Run the following command to checkout the android-2.6.29 kernel files: $ cd kernel $ git checkout --track -b android-2.6.29 origin/android-2.6.29 For a full list of available android kernel versions, go to http://android.git.kernel.org/?p=kernel/common.git;a=summary. Step 04.00: Make a set of patches between the linux-2.6.30-rc1 and android-2.6.29 kernel sources. To make a set of patches between the two kernel versions, type the following command: $ git format-patch v2.6.30-rc1 Step 04.01: Remove the unnecessary patches, for example, bluetooth, mmc, pm, yaff, etc. For the Gizmo-DO, we will need to incorporate the TSC2046 touchscreen chip. For the Palo43. we will need to incorporate the TI ADS7846 touchscreen driver. [TODO: Add a download link to the reduced patch set.] List of android components to be included in the build: android-binder android-ram_console android more printk formats lowmemory killer changes to the kernel when electing not to use a swap: android-alarm-driver Step 04.02: Put the patches in the recipes/linux/linux-omap3-2.6.29 folder and add them to the SRC_URI of the linux-omap3_2.6.29.bb recipe. To make things easier, get the list of file names by typing ls > patchfilelist.txt, and copy paste all the file names to the linux- omap3_2.6.29.bb recipe. Step 04.03: Modify the defconfig file in the linux-omap3-2.6.29/overo folder, and add the Android configuration entires. 2.6.29 based Android Kernel features Belows is kernel feature for the 2.6.29 based android kernel: 01). GoldFish : Qemutrace , FB Driver/RTC/Power/Nand/MMC/Events/tty/ audio for godlfish 02). pmem : Android pmem allocator 03). yaffs : mtdif2 04). kernel debugger 05). android USB : USB Gadget driver for android. 06). HAL : TI Wifi Control Functions , Bluetooth (RFCOMM-L2CAP Socket) 07). Android Shared Memory (ASHMEM) 08). Paranoid Network 09). Binder: mmap fix , more offset validation 10). Power : User Wake Lock , Wake Lock , Early Suspend , FB Eearlysuspend 11). Logger Subsystem 12). Low Memory Killer: /sys/module/lowmemorykiller/parameters/adj and minfree 11). Etc : Timed GPIO / Timed Output Required enabled config options After building a standard defconfig, ensure that these options are enabled in your .config or defconfig if they are not already. Based off the msm_defconfig. You should keep the rest of the default options enabled in the defconfig unless you know what you are doing. ANDROID_PARANOID_NETWORK ASHMEM CONFIG_FB_MODE_HELPERS CONFIG_FONT_8x16 CONFIG_FONT_8x8 CONFIG_YAFFS_SHORT_NAMES_IN_RAM DAB EARLYSUSPEND FB FB_CFB_COPYAREA FB_CFB_FILLRECT FB_CFB_IMAGEBLIT FB_DEFERRED_IO FB_TILEBLITTING HIGH_RES_TIMERS INOTIFY INOTIFY_USER INPUT_EVDEV INPUT_GPIO INPUT_MISC LEDS_CLASS LEDS_GPIO LOCK_KERNEL LkOGGER LOW_MEMORY_KILLER MISC_DEVICES NEW_LEDS NO_HZ POWER_SUPPLY PREEMPT RAMFS RTC_CLASS RTC_LIB SWITCH SWITCH_GPIO TMPFS UID_STAT UID16 USB_FUNCTION USB_FUNCTION_ADB USER_WAKELOCK VIDEO_OUTPUT_CONTROL WAKELOCK YAFFS_AUTO_YAFFS2 YAFFS_FS YAFFS_YAFFS1 YAFFS_YAFFS2 Required disabled config options CONFIG_YAFFS_DISABLE_LAZY_LOAD DNOTIFY Recommended enabled config options ANDROID_PMEM ANDROID_RAM_CONSOLE ANDROID_RAM_CONSOLE_ERROR_CORRECTION SCHEDSTATS DEBUG_PREEMPT DEBUG_MUTEXES DEBUG_SPINLOCK_SLEEP DEBUG_INFO FRAME_POINTER CPU_FREQ CPU_FREQ_TABLE CPU_FREQ_DEFAULT_GOV_ONDEMAND CPU_FREQ_GOV_ONDEMAND CRC_CCITT EMBEDDED INPUT_TOUCHSCREEN I2C I2C_BOARDINFO LOG_BUF_SHIFT=17 SERIAL_CORE SERIAL_CORE_CONSOLE Step 04.04: Rebuild the overo kernel. Go to the linux-omap3-2.6.29.bb file, and change the PR variable to a higher release number, e.g PR = "r1" and then re-run the bitbake command. Run the following command to rebuild the overo kernel with the android patches: bitbake -c clean linux-omap3-2.6.29 bitbake linux-omap3-2.6.29 If you are in the phase where you are debugging compiler errors, use the following command: bitbake -c compiler -f path/to/file which will force a recompile, skipping the fetch and patching phases, and the later staging and installation phases. Once you have it compiling and are working on logic errors, use bitbake to package up the software by running the following command: bitbake -c rebuild linux-omap3-2.6.29 after each editing session. If you don’t want to bump the PR in the recipe with each edit, use the following command: ipkg -force-reinstall install linux-omap3-2.6.29 Step 05.00: Compile Android kernel from the source. Download and install a Java JDK to build the Android sources. jdk-6u12-linux-i586-rpm.bin Go to the android directory and sync the repository to get all the android sources. $ cd android $ repo init -u git://android.git.kernel.org/platform/manifest.git $ repo sync Note: We have forced the kernel/common branch to android-2.6.29, from the previous steps. Else, as of April 14th 2009, the kernel/common branch defaults to android-2.6.27. $ make --~--~---------~--~----~------------~-------~--~----~ unsubscribe: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel -~----------~----~----~----~------~----~------~--~---