(Created page with "Android tablets come with proved themselves as a severe contender in order to Apple iPad. iPad coming from the Apple stable, was never going in order to come cheap. One may ar...") |
|||
(3 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | + | ||
− | + | == 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: | |
− | + | ||
− | + | <PRE> | |
+ | apt-get install gcc-arm-linux-gnueabi | ||
+ | </PRE> | ||
+ | |||
+ | === 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: | ||
+ | |||
+ | <PRE> | ||
+ | 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 | ||
+ | </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: | ||
+ | |||
+ | <PRE> | ||
+ | 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 | ||
+ | </PRE> | ||
+ | |||
+ | 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> | ||
+ | |||
+ | === Prepared Image === | ||
+ | |||
+ | Below is a prepared FAT16 image. It can be restored using the [http://sourceforge.net/projects/win32diskimager/files/latest/download Win32 Disk Imager] | ||
+ | |||
+ | * [http://wiki.beyondlogic.org/prebuilt/raspberrypi_u-boot.zip Raspberry Pi U-Boot] 4.5Mbytes <I>(Using U-Boot 2014.07-rc3-gd4614d4 (Jun 14 2014 - 01:23:23))</I> | ||
+ | |||
+ | <BR> |
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
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.
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
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
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
Below is a prepared FAT16 image. It can be restored using the Win32 Disk Imager