Difference between revisions of "EBC Exercise 25 Configuring U-boot"

From eLinux.org
Jump to: navigation, search
(bitbake: Updated for 2011)
Line 6: Line 6:
 
== bitbake ==
 
== 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:
+
When you did [[ECE497 Lab02 Installing The Angstrom Distribution]] u-boot was downloaded and compiled.  If you used the default configure, the source code was removed once it was done.  Check and see:
 
<pre>
 
<pre>
$ cd ${OETREE}/angstrom-dev/work/beagleboard-angstrom-linux-gnueabi
+
$ cd ~/BeagleBoard/oe/build/tmp-angstrom_2008_1/work/beagleboard-angstrom-linux-gnueabi/
 
$ ls
 
$ ls
 
</pre>
 
</pre>
Line 16: Line 16:
 
$ ls
 
$ ls
 
</pre>
 
</pre>
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:
+
If you see a '''git''' directory, you are in luck. If you see just a '''temp''' directory you need to go back to [[ECE497 Lab02 Installing The Angstrom Distribution]] and get it installed.
<pre>
+
$ cd ${OETREE}/build/conf
+
$ gedit local.conf
+
</pre>
+
Find the line near the top that says <code>INHERIT += " rm_work "</code> and comment it out.
+
<pre>
+
# INHERIT += " rm_work "
+
</pre>
+
Save the file and then:
+
<pre>
+
cd ${OETREE}/openembedded
+
$ bitbake -c clean u-boot
+
$ bitbake -f -c compile u-boot
+
</pre>
+
* 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 4 minutes on my machine.
+
Once you have the '''git''' directory, ''cd'' to it and look around.
 
+
Once done go back to
+
<pre>
+
$ cd ${OETREE}/angstrom-dev/work/beagleboard-angstrom-linux-gnueabi/u-boot-*
+
$ ls
+
</pre>
+
You should now see the '''git''' directorycd to it and look around.
+
  
 
== Compiling U-boot ==
 
== Compiling U-boot ==

Revision as of 17:48, 30 March 2011


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 ECE497 Lab02 Installing The Angstrom Distribution u-boot was downloaded and compiled. If you used the default configure, the source code was removed once it was done. Check and see:

$ cd ~/BeagleBoard/oe/build/tmp-angstrom_2008_1/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 go back to ECE497 Lab02 Installing The Angstrom Distribution and get it installed.

Once you have the git directory, cd to it and look around.

Compiling U-boot

You can now compile U-boot. Make the following 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.