EBC Exercise 25 Configuring U-boot

From eLinux.org
Revision as of 16:30, 25 March 2010 by Yoder (Talk | contribs)

Jump to: navigation, search


This follows the approach taken in ECE597 Configuring the Kernel. We'll use bitbake to get the source files for U-boot and then we'll edit them.

bitbake

When you did ECE597 Installing The Ångström Distribution you used bitbake to build console-image. During that build the kernel was downloaded and compiled. If you used the default configure, the source code was removed once it was done. Check and see:

$ cd ${OETREE}/angstrom-dev/work/beagleboard-angstrom-linux-gnueabi
$ ls

You should see a directory starting with u-boot-. The rest of the name tells what version you have. Change to that directory and see what's there:

$ cd u-boot-*
$ ls

If you see a git directory, you are in luck. If you see just a temp directory you need to do the following to reload the sources:

$ cd ${OETREE}/build/conf
$ gedit local.conf

Find the line near the top that says INHERIT += " rm_work " and comment it out.

# INHERIT += " rm_work "

Save the file and then:

 cd ${OETREE}/openembedded
$ bitbake -c clean u-boot
$ bitbake -f -c compile u-boot
  • The first bitbake command tells bitbake to remove the previously made binary file for that package (think "make clean"), which will force it to re-do what it previously did with the console-image build.
  • The second bitbake line forces bitbake to rebuild the u-boot package, which will require re-extracting the previously deleted source code, and apply the relevant OE related patches.

This took XXXX hours on my machine. (Time it when you do it and update the XXXX.)

Once done go back to

$ cd ${OETREE}/angstrom-dev/work/beagleboard-angstrom-linux-gnueabi/linux-omap-*
$ ls

You should now see the git directory. cd to it and look around.

Compiling U-boot

You can now compile U-boot. Put the following in a file called source-me.txt.

export OETREE="${HOME}/oe"
export ARCH=arm
export CROSS_COMPILE=arm-angstrom-linux-gnueabi-

PATH=${OETREE}/angstrom-dev/staging/i686-linux/usr/bin/:${PATH}
PATH=${OETREE}/angstrom-dev/cross/armv7a/bin/:${PATH}

Save the file and enter:

$ source source-me.txt

Now a simple make should compile U-boot.

Assignment: Modify u-boot to include your initials in the prompt.

Hint: Look for the omap3_beagle.h file.