Template:Container 2

From OMAPpedia

Revision as of 18:45, 17 August 2010 by Hari s (Talk | contribs)
Jump to: navigation, search
Android Logov2.jpg
How to get started building your own binaries for the Android OS on your OMAP Platform
Overview Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8 Step 9

   

Step 2


This page describes how to build a bootloader for Android. The bootloader consists of uboot (u-boot.bin) and x-loader (MLO). There are 2 steps involved. First, get the source code. Second, build the source code.


Contents

Get Source

To continue with getting started on Android building your own binaries, look below under your specific platform. A typical set of commands used to get the bootloader source are:

mkdir -p <your directory path>/mydroid
cd <your directory path>/mydroid
export $MYDROID=`pwd`
repo init -u <Repo> -b <commit>
repo sync

OR

mkdir -p <your directory path>/mydroid
cd <your directory path>/mydroid
export $MYDROID=`pwd`
git checkout <Repo> -b <local-branch-name-here> <Branch>
git checkout <Commit>


PandaBoard

[U-BOOT]

Repo   : git://gitorious.org/pandaboard/u-boot.git
Branch : omap4_panda
Config : omap4430panda_config

[X-LOADER]

Repo   : git://gitorious.org/pandaboard/x-loader.git
Branch : omap4_panda
Config : omap4430panda_config


Blaze

Bootloader is part of the Android manifest for Blaze/OMAP4430. Refer to "Android Environment - Source versions and Manifest" in the main page to obtain the entire Android source code (This is the recommended method since it includes bootloader and filesystem). Once that is done, return to building uboot below.

If you are looking to download the bootloader separately, details are:

[U-BOOT]

Repo   : git://git.omapzoom.org/repo/u-boot.git
Branch : omap4_dev
Tag    : L24.7
Commit : 626aee14ccf5b5e49189ab2a4e256c58d5a4572f
Config : omap4430sdp_config

[X-LOADER]

Repo   : git://git.omapzoom.org/repo/x-loader.git
Branch : omap4_dev
Tag    : L24.7
Commit : 132029560a1f00cd0d43253d00ff92f00e13780b
Config : omap4430sdp_config

Building bootloader

Building uboot

Blaze

For Eclair OMAP 4430/Blaze, (reference release tags from L27.x)

$ cd $MYDROID/bootable/bootloader/u-boot
$ make distclean
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4430sdp_config
$ make
$ cp -Rfp ./tools/mkimage $HOME/bin


Zoom 3

For Eclair OMAP 3630 releases starting L25.INC2.5

$ cd $MYDROID/bootable/bootloader/u-boot
$ make distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3630zoom3_config
$ make CROSS_COMPILE=arm-none-linux-gnueabi-
$ cp $MYDROID/bootable/bootloader/u-boot/tools/mkimage ~/bin/

Note (for latest release at least): By default the toolchain (arm-none-linux-gnueabi-) is not in your path, you either have to sym link it to /usr/bin (ie ln -s $HOME/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi-gcc /usr/bin/arm-none-linux-gnueabi-gcc -- and do that for each tool), or, more easily, specify the full path in the CROSS_COMPILE flag (ie CROSS_COMPILE=$HOME/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi-) for each of the above make commands.

Zoom 2

For OMAP 3430 releases starting L25.10

$ cd $MYDROID/bootable/bootloader/u-boot
$ make distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3430zoom2_config
$ make CROSS_COMPILE=arm-none-linux-gnueabi-
$ cp $MYDROID/bootable/bootloader/u-boot/tools/mkimage ~/bin/

Note (for latest release at least): By default the toolchain (arm-none-linux-gnueabi-) is not in your path, you either have to sym link it to /usr/bin (ie ln -s $HOME/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi-gcc /usr/bin/arm-none-linux-gnueabi-gcc -- and do that for each tool), or, more easily, specify the full path in the CROSS_COMPILE flag (ie CROSS_COMPILE=$HOME/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi-) for each of the above make commands.

Others

For releases prior to L25.10 release

$ cd $MYDROID/bootloader/u-boot
$ make distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3430zoom2_config
$ make CROSS_COMPILE=arm-none-linux-gnueabi-
$ cp $MYDROID/bootable/bootloader/u-boot/tools/mkimage ~/bin/

Note: Configuration option varies by platform. Above is an example for building Zoom2. Change "omap3430zoom2_config" to "omap3430labrador_config" for Zoom1(LDP) or "omap3430sdp_config" to enable a build for SDP or "omap3630zoom3_config" for Zoom3.

Note: If you get "cmd_voltage.c:27: error: inline function 'voltage_info' cannot be declared weak" try an older GCC (CSL 2008q3-72 seems ok)

Where to find uboot

"uboot" is available at:

$MYDROID/bootable/bootloader/u-boot/u-boot.bin
$MYDROID/bootloader/u-boot/u-boot.bin

Building xloader

Blaze

For Eclair OMAP 4430, reference release tags from L27.x

$ cd $MYDROID/bootable/bootloader/x-loader
$ make distclean
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4430sdp_config
$ make ift

Zoom 3

For Eclair OMAP 3630 releases starting L25.INC2.5

$ cd $MYDROID/bootable/bootloader/x-loader
$ make distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3630zoom3_config
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ift

Zoom 2

For OMAP 3430 releases starting L25.10

$ cd $MYDROID/bootable/bootloader/x-loader
$ make distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3430zoom2_config
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ift


Others

For releases prior to L25.10 release

$ cd $MYDROID/bootloader/x-loader
$ make distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3430zoom2_config
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ift

Note: Configuration option varies by platform. Above is an example for building zoom2. Change "omap3430zoom2_config" to "omap3430labrador_config" or "omap3430zoom2_config" or "omap3630zoom3_config " to enable a build for zoom1 (LDP) or SDP respectively or Zoom3.


Where to find x-loader/MLO

"MLO" is available at:

$MYDROID/bootable/bootloader/x-loader/MLO
$MYDROID/bootloader/x-loader/MLO



Left arrow1.png Android Logov2.jpg Right arrow1.png
Previous Home Next
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox