(Created page with " === Prerequisites === To compile the U-Boot bootloader for the Raspberry Pi, you must first have an ARM cross compiler installed. I use gcc-4.7.3-arm-linux-gnueabi that come...")
Line 1: Line 1:
 +
 +
== Compiling U-Boot with Device Tree Support for the Raspberry Pi ==
  
 
=== Prerequisites ===
 
=== Prerequisites ===
Line 10: Line 12:
 
== U-Boot ==
 
== U-Boot ==
  
Download the latest version of U-Boot and extract the files to a working folder:
+
Raspberry Pi support in the current mainline U-Boot is functional, but excludes support for USB. As the ethernet port on the Raspberry Pi is connected to the Broadcom SoC via USB, no support for USB not only effects your use of USB input devices such as a keyboard, USB storage devices (booting from USB thumb drive) but also Network (TFTP loads).
 +
 
 +
It is understood Stephen Warren is working on getting USB support into the mainline U-Boot repository.
 +
 
 +
== Mainline ==
 +
 
 +
To download and extract the latest mainline version of U-Boot:
  
 
<PRE>
 
<PRE>
Line 17: Line 25:
 
cd u-boot-2014.04
 
cd u-boot-2014.04
 
</PRE>
 
</PRE>
 +
 +
== Stephen Warren's work ==
 +
 +
Alternatively, if you require USB support, use Stephen Warren GIT repository:
 +
 +
<PRE>
 +
git clone git://github.com/swarren/u-boot.git
 +
git checkout -b rpi_dev origin/rpi_dev
 +
</PRE>
 +
 +
== Compiling ==
  
 
Now cross compile U-Boot using the Raspberry Pi Model B configuration:
 
Now cross compile U-Boot using the Raspberry Pi Model B configuration:
Line 26: Line 45:
 
</PRE>
 
</PRE>
  
Once compiled, u-boot.bin can be copied to your SDCard and executed in place of kernel.img
+
Once compiled, u-boot.bin can be copied to your SD Card. Edit the config.txt file to include the following line:
 +
 
 +
<PRE>
 +
kernel=u-boot.bin
 +
</PRE>

Revision as of 09:43, 14 June 2014

Compiling U-Boot with Device Tree Support for the Raspberry Pi

Prerequisites

To compile the U-Boot bootloader for the Raspberry Pi, you must first have an ARM cross compiler installed. I use gcc-4.7.3-arm-linux-gnueabi that comes with Ubuntu 14.04. To install the compiler run:

apt-get install gcc-arm-linux-gnueabi

U-Boot

Raspberry Pi support in the current mainline U-Boot is functional, but excludes support for USB. As the ethernet port on the Raspberry Pi is connected to the Broadcom SoC via USB, no support for USB not only effects your use of USB input devices such as a keyboard, USB storage devices (booting from USB thumb drive) but also Network (TFTP loads).

It is understood Stephen Warren is working on getting USB support into the mainline U-Boot repository.

Mainline

To download and extract the latest mainline version of U-Boot:

wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2
tar -xjf u-boot-latest.tar.bz2
cd u-boot-2014.04

Stephen Warren's work

Alternatively, if you require USB support, use Stephen Warren GIT repository:

git clone git://github.com/swarren/u-boot.git
git checkout -b rpi_dev origin/rpi_dev

Compiling

Now cross compile U-Boot using the Raspberry Pi Model B configuration:

make CROSS_COMPILE=arm-linux-gnueabi- distclean
make CROSS_COMPILE=arm-linux-gnueabi- rpi_b_config
make CROSS_COMPILE=arm-linux-gnueabi- u-boot.bin

Once compiled, u-boot.bin can be copied to your SD Card. Edit the config.txt file to include the following line:

kernel=u-boot.bin