EDIT 20111116 15:37: This post and the git repo have been updated to include info on the BeagleBoard-xM.

I wrote up some quick instructions on building the PandaBoard and BeagleBoard-xM x-loader on a Debian Squeeze host this morning. You can find them below, but also in my GitHub x-loader repo. My x-loader repo is only slightly modified from mainline. Enjoy!


To build x-loader on Debian:

Install the emdebian-archive-keyring:
$ sudo aptitude install emdebian-archive-keyring

Add to your apt sources:
deb http://www.emdebian.org/debian/ squeeze main

Perform an aptitude update:
$ sudo aptitude update

Install the Emdebian cross compilers:
$ sudo aptitude install gcc-4.4-arm-linux-gnueabi g++-4.4-arm-linux-gnueabi

Install git and partitioning tools:
$ sudo aptitude install git parted

Clone the repo from github, this will create a directory called "x-loader":
$ git clone git://github.com/bradfa/x-loader.git

Enter the directory, make the configuration you desire, then compile the MLO
file (actual x-loader). For the PandaBoard use "omap4430panda_config" and
for BeagleBoard-xM use "omap3530beagle_config" in the second step
(example uses Panda):
$ cd x-loader
$ make CROSS_COMPILE=arm-linux-gnueabi- distclean
$ make CROSS_COMPILE=arm-linux-gnueabi- omap4430panda_config
$ make CROSS_COMPILE=arm-linux-gnueabi-

Now we'll partition and format an SDcard.

***************************************
* THIS PROCESS WILL DESTROY ALL DATA! *
***************************************

Make sure your SDcard is not mounted. Then run the partitioning script to
create a 64 MB FAT partition followed by an ext3 partition taking up the rest
of the SDcard space (SDcards are slow, this may take some time). The arugment
passed to the script is the device node of the SDcard itself (/dev/sdb in our
example), not a partition!:
$ sudo ./format_sd.sh /dev/sdb

Some systems may automatically mount the newly created file systems. If not,
mount the boot file system:
$ sudo mkdir -v /mnt/boot
$ sudo mount /dev/sdb1 /mnt/boot

The _VERY_FIRST_ file written to the FAT partition should be the MLO.
$ sudo cp -v MLO /mnt/boot/

Unmount the FAT partition and boot the board to verify operation!

Comments

Andrew
Israr,

X-loader is the MLO file. The boot process is that internal to the ARM chip there is some ROM that executes as first stage boot laoder, it goes and grabs the MLO (second stage), runs it, and the MLO grabs and runs u-boot (third stage). U-boot then grabs and runs the kernel and points the kernel to the file system.

In more recent versions of u-boot (at least in TI's dev kits and the BeagleBone), the SPL is now built directly out of u-boot sources, x-loader is being depreciated.

This sounds confusing, sorry.
israr
hi andrew!!
is x-loader is replacement of Uboot in BeagleBoard or
it sits above Uboot ? plz explain, thanks

Israr

Published

16 November 2011