Be sure you are logged into the Beagle via the serial port, rather than using ssh. Otherwise you won't see the boot sequence that appears before the kernel is running.

Here we've changed to the FAT partition which is where u-boot lives. Back it up and install the new one.

Here we've changed to the FAT partition which is where u-boot lives. Back it up and install the new one.

Line 149:

Line 151:

beagle$ '''shutdown -r now'''

beagle$ '''shutdown -r now'''

−

You should now see the new u-boot running. However I was unable to get the 2.6.32 kernel to boot.

+

You should now see the new u-boot running if you are logged in via the serial port.

== Compile via make ==

== Compile via make ==

Revision as of 07:43, 27 January 2012

This class is about developing software for embedded Linux. So far we have been doing all of our development on the Beagle. This works well for small (and not so small) programs. However, we are now moving into kernel development and that's best done on a more powerful host computer. Here you learned how to download and install the cross-compilers and the source for kernel and u-boot. Now we'll use those tools.

First we'll check everything by compiling the Hello World program, then we'll try the kernel and u-boot.

Contents

Cross-compiling Hello World

Listing 2-4 on page 29 of the text is an embedded version of Hello World. If you've set up your git repository you will find it in helloWorld.c when you do a git pull. Compile and run it on your host to be sure it works.

host$ gcc helloWorld.c
host$ ./a.out
Hello, World! Main is executing at 0x400524
This address (0x7fff8260bdf8) is in our stack frame
This address (0x601038) is in our bss section
This address (0x601020) is in our data section

Now that you know it's working, let's cross compile it. First set the paths to find the cross-compilers. Put the following in a file, call it ~/.oe/crossCompileEnv.sh. Make sure the path is correct for your system. This is for a 32-bit linux.