(Added restoration of environment variables)
m
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
  
== Compiling uBoot for the GuruPlug Server Plus ==
+
== 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:
+
Download the latest version of U-Boot and extract the files to a working folder:
  
 
<PRE>
 
<PRE>
Line 10: Line 10:
 
</PRE>
 
</PRE>
  
Cross Compile u-Boot using the GuruPlug configuration:
+
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
 +
 
 +
<PRE>
 +
/* Enable flat device tree support */
 +
#define CONFIG_OF_LIBFDT
 +
</PRE>
 +
 
 +
Now cross compile U-Boot using the GuruPlug configuration:
  
 
<PRE>
 
<PRE>
Line 25: Line 32:
 
Nand page size = 0x800
 
Nand page size = 0x800
 
Image Type:  Kirkwood Boot from NAND Flash Image
 
Image Type:  Kirkwood Boot from NAND Flash Image
Data Size:    250496 Bytes = 244.62 kB = 0.24 MB
+
Data Size:    273956 Bytes = 267.54 kB = 0.26 MB
 
Load Address: 00600000
 
Load Address: 00600000
 
Entry Point:  00600000
 
Entry Point:  00600000
 
</PRE>
 
</PRE>
  
== Testing your new u-Boot ==
+
=== 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.  
+
It is always a good idea to load your newly compiled version of U-Boot into RAM first and test it.  
  
 
<PRE>
 
<PRE>
Line 41: Line 48:
 
</PRE>
 
</PRE>
  
== Flasing u-Boot ==
+
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:
+
When you are confident and ready to take the plunge, you can burn U-Boot to flash using:
  
 
<PRE>
 
<PRE>
Line 53: Line 62:
 
</PRE>
 
</PRE>
  
Upon reboot, you should be greeted with your new u-Boot. Congratulations.
+
Upon reboot, you should be greeted with your new U-Boot. Congratulations.
  
 
<PRE>
 
<PRE>

Latest revision as of 10:07, 26 March 2014

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:

wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2
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 */
#define CONFIG_OF_LIBFDT

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 192.168.0.250
setenv serverip 192.168.0.251
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 192.168.0.250
setenv serverip 192.168.0.251
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)
Marvell-GuruPlug

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
Marvell>>

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