Template:Container 2

From OMAPpedia

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

[edit] 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>


[edit] 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


[edit] 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

[edit] Building bootloader

[edit] Building uboot

[edit] PandaBoard

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

[edit] 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


[edit] 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.

[edit] 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.

[edit] 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)

[edit] Where to find uboot

"uboot" is available at:

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

[edit] Building xloader

[edit] PandaBoard

$ cd $MYDROID/x-loader
$ make distclean
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap4430panda_config
$ make ift
$ cp -Rfp ./tools/mkimage $HOME/bin

[edit] 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

[edit] 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

[edit] 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


[edit] 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.


[edit] Where to find x-loader/MLO

"MLO" is available at:

$MYDROID/x-loader/MLO
$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
Views
  • Read
  • Edit
  • View history
Actions
Navigation
Toolbox
  • What links here
  • Related changes
  • Special pages
  • Printable version