Minimal-FS Build Guide
From OMAPpedia
- Host Environment
Ubuntu is the recommended Linux distribution for this setup. Other distributions are available, however the configurations listed in this wiki currently only covers Ubuntu. Ubuntu is available for download at: https://help.ubuntu.com/community/Installation
Note: Around 10GB of hard disk space is required to build one release of Android.
- Tools/Packages
Below is a list of packages needed for building, testing, and/or debugging a OMAP development platform. These packages can be download from host's distribution package management system or through "apt-get install command".
Contents |
[edit] Working around Ubuntu's Firewall
"Git" is a great tool and does work behind proxy's / firewalls with a little help. There are many ways to do this however this section will only cover "corkscrew".
- Corkscrew
Download "corkscrew" at Corkscrew and un-tar it.
cd corkscrew-2.0 ./configure make cp corkscrew ~/bin/corkscrew
This can be placed anywhere as long as it is in PATH. Next create the following simple shell script called git-proxy in ~/bin directory (or some place listed in PATH).Replace items inbetween "<...> with the correct information.
#!/bin/sh exec/corkscrew $*
Save the file and give it execute permissions
chmod u+x git-proxy
Run it to test it. It should give the usage statement for corkscrew.
Now tell git you want to use a proxy. Replace the stuff between the "<...>" and don't leave out the single quotes.
git config --global core.gitproxy '/git-proxy'
This will setup "git" to always use the proxy for all git commands, with all git trees. To set the proxy for just a specific git tree execute instead something similar to the following. The below command configures "git" to use the proxy for all URLs with a kernel.org suffix.
git config --global core.gitproxy '"/git-proxy"; for kernel.org' 'for kernel.org$'
- Ubuntu's Firewall setting
Configure Ubuntu's "Network Proxy" appropriately to get access to source code
- System-->Preferences-->Network Proxy
- Set the following parameters:
- Select: "Proxy Configuration"
- Select: "Manual proxy configuration"
- Check mark: "Use the same proxy for all protocols
- Enter following data: HTTP proxy:
Port: - Close
Configure the Proxy for the package manager:
- System -> Administrator -> Synaptic Package Manager
- Login -> Settings -> Preferences
- Network tab -> Add the HTTP proxy and port number in order to get the package manager to be able to get past the firewall.
Configure "http_proxy" and "ftp_proxy" environmental variable: If there is a need to use a proxy server to access the web set the environment variables "http_proxy" and "ftp_proxy". This will allow "apt-get" etc. to use this environment variable value. Below would be the ideal way of assigning values for "http_proxy":
export http_proxy=”: ” export ftp_proxy=" : "
Add this to ~/.bashrc so that everytime the machine is rebooted this variable does not have to be exported.
[edit] ARM Cross Compiler
CodeSourcery ARM Compiler version 2009q3-67 is used for building different distributions on OMAP platforms. Visit www.codesourcery.com for more information.
The current cross compiler build release can be downloaded 2009q3-67. Different versions may be required depending on build requirements.
- Select the IA32 GNU/Linux TAR one (2c2b324f0a84916afd9920029286eb10)
The previous cross compiler build release can be downloaded 2008q3-72.
- Select the IA32 GNU/Linux TAR one (75465352c9ee21c06c8e0c4709969d42)
Add Compiler directory to PATH:
export PATH=$PATH://bin/
[edit] Bootloader
For more information regarding bootloader visit the Bootloader Project
The OMAP4 dedicated instructions are described below:
- Version tagging into u-boot and x-loader trees: some stable release are tagged into u-boot and x-loader trees. It is advised to use the most recent (higher number) of these stable tags, and the same number for u-boot and x-loader (this will guarantee they are aligned). The tags to use for OMAP4 are: L24.x (with x being the highest value). Note that these tags are applied in the omap4_dev branch of the u-boot and x-loader trees.
- setup folders:
mkdir bootloader cd bootloader
- Get u-boot and checkout the omap4_dev branch:
git clone git://git.omapzoom.org/repo/u-boot.git cd u-boot git checkout
- Build u-boot for OMAP4
make ARCH=arm distclean make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4430sdp_config make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
=> Generates: ./u-boot.bin
- get x-loader and checkout the omap4_dev branch:
cd .. git clone git://git.omapzoom.org/repo/x-loader.git cd x-loader git checkout
(note that both u-boot and x-loader folders must be at the same directory level)
- build x-loader for OMAP4:
make ARCH=arm distclean make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4430sdp_config make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- ift
=> Generates ./MLO
The generated MLO and u-boot.bin files will have to be copied on the SD card.
Note: To get the list of L24.x tags, once in the cloned u-boot or x-loader folder, type:
git tag | grep L24
[edit] Building Linux Kernel
- Download and check out kernel using git
- OMAP4
$ git clone git://dev.omapzoom.org/pub/scm/integration/kernel-omap4.git
- OMAP3
$ git clone git://dev.omapzoom.org/pub/scm/integration/kernel-omap3.git
Visit Source Trees page for a list of all source tress available.
- Git check-out
$ git branch -a (list all branches available) $ git checkout -b
Visit the Development Toolbox for more links on "git".
- Selecting a Board config file
Supported platform config files are listed in the configs directory
$ ls/arch/arm/configs/
Select a OMAP Platform
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm
- Changing configuration options
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm menuconfig
- Building kernel
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage uImage located atarch/arm/boot/
Note: CROSS_COMPILE can be added to your environment variables.