Compiling U-Boot with Device Tree Support for the GuruPlug Server Plus

Download the latest version of U-Boot and extract the files to a working folder:

tar -xjf u-boot-latest.tar.bz2
cd u-boot-2014.01

By default, the GuruPlug configuration does not enable Device Tree Support and needs to be manually enabled. To do this add the following to /include/configs/guruplug.h

/* Enable flat device tree support */

Now cross compile U-Boot using the GuruPlug configuration:

make CROSS_COMPILE=arm-linux-gnueabi- distclean
make CROSS_COMPILE=arm-linux-gnueabi- guruplug_config
make CROSS_COMPILE=arm-linux-gnueabi- u-boot.kwb

Compiling should conclude with output similar to that below.

Preparing kirkwood boot image to boot from nand
Nand ECC mode = default
Nand page size = 0x800
Image Type:   Kirkwood Boot from NAND Flash Image
Data Size:    273956 Bytes = 267.54 kB = 0.26 MB
Load Address: 00600000
Entry Point:  00600000

Testing your new U-Boot

It is always a good idea to load your newly compiled version of U-Boot into RAM first and test it.

setenv ipaddr
setenv serverip
tftp 0x800000 u-boot.kwb
go 0x800200

Note: Older versions of U-Boot may not always chain load newer versions, and hence this may not always yield confidence-building results.

Flasing U-Boot

When you are confident and ready to take the plunge, you can burn U-Boot to flash using:

setenv ipaddr
setenv serverip
tftp 0x6400000 u-boot.kwb
nand erase 0x0 0x100000
nand write.e 0x6400000 0x0 0x100000

Upon reboot, you should be greeted with your new U-Boot. Congratulations.

U-Boot 2014.01 (Mar 25 2014 - 04:50:06)

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  512 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Warning: failed to set MAC address
, egiga1
Warning: failed to set MAC address

88E1121 Initialized on egiga0
88E1121 Initialized on egiga1
Hit any key to stop autoboot:  0

You will need to restore your ethernet MAC addresses. They can be found on the nameplate of your GuruPlug.

Marvell>> setenv ethaddr 00:50:43:01:83:5e
Marvell>> setenv eth1addr 00:50:43:01:83:5f
Marvell>> saveenv
Saving Environment to NAND...
Erasing NAND...
Erasing at 0x60000 -- 100% complete.
Writing to NAND... OK