EBC Exercise 08 Installing Development Tools 3.8

Early in the class most of the exercises we will do will all run on the BeagleBoard. You'll be able to edit (gedit), compile (gcc) and run all on the Beagle. Later, when we start compiling the kernel or the boot loader, (U-boot) you will need to cross compile on a Linux machine and copy the results to the Beagle.

The purpose of this exercise is to install all the tools needed for compiling on your host so they will be ready when you need them.

Instructions for building Ångström are given here; however there are a few changes you have to make. Here's what I did.

Get the setup scripts
I have everything in a, so here is how I setup things: $ cd $ mkdir -p BeagleBoard $ cd BeagleBoard $ git clone git://git.angstrom-distribution.org/setup-scripts oe $ cd oe (The git took 4.5 seconds.) This creates a directory for open embedded and gets the script to download Ångström. What files do you see?

Now run: MACHINE=beagleboard ./oebb.sh config beagleboard MACHINE=beagleboard ./oebb.sh update This will bring in all the tools you need. It took about 30 minutes on my machine in the afternoon or 3 minutes at 6:15am.

Build a small program
To see if everything is ready, run the following

bitbake nano

nano is a small editor. We really don't need nano, but if it can be compiled we know we have everything in place. I get the following error when I run the bitbake: Pseudo is not present but is required, building this first before the main build . . . ERROR: Poky's config sanity checker detected a potential misconfiguration. Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). Following is the list of potential problems / advisories:

Please install following missing utilities: C++ Compiler (g++),diffstat,texi2html,makeinfo,cvs,svn,chrpath

ERROR: Execution of event handler 'check_sanity_eventhandler' failed So, some programs are missing. Install them with: sudo apt-get install g++ diffstat texi2html texinfo cvs subversion chrpath help2man diffstat texi2html cvs texinfo subversion gawk This took just a few minutes.

If you are running a multicore machine try: gedit conf/local.conf Look for the lines: PARALLEL_MAKE    = "-j2" BB_NUMBER_THREADS = "2" Change the 2 to the number of cores you have. Now run: bitbake nano This will take a while.

Compile the Kernel
Now if you do

$ source ~/.oe/environment-2008 $ cd ~/BeagleBoard/oe $ ./oebb.sh config beagleboard $ bitbake linux-omap-psp-2.6.32 you should get a kernel that will work.

To ensure you keep the kernel source, check your .../oe/build/conf/local.conf and comment out the line that says INHERIT += "rm_work" If you accidentally run bitbake without commenting out the above line, after it runs you can comment out the INHERIT line and then run $ bitbake -c clean linux-omap-psp-2.6.32 $ bitbake -f -c compile linux-omap-psp-2.6.32 This second run should take less time (one timing: first run took 3.5 hours; the recompiling took 25 minutes).