U-Boot for the LinkStation

LinkStation port version 2.1.0
16 September 2006


Das U-Boot

U-Boot is a universal boot loader released with full source code under the Gnu Public License (GPL). For an overview of U-Boot, you can read Introduction to Das U-Boot, the universal open source bootloader .

Supported Hardware

The LinkStation port of U-Boot described here supports the following PowerPC models:

  1. LinkStation version 1 (model HD-HLAN-1)
  2. KuroBox standard
  3. LinkStation HG (model HD-HGLAN)
  4. KuroBox HG

To find out more about the different LinkStation models, visit Linkstationwiki. To find out more about the different KuroBox models, visit www.kurobox.com.

Do not attempt to use this port of U-Boot on a the LinkStation version 2 (HD-HLAN-2) as it uses a MIPS processor which is completely different from the PowerPC processor used in the LinkStation version 1.

Features

Supported Commands

?       - alias for 'help'
base    - print or set address offset
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootm   - boot application image from memory
bootp   - boot image via network using BootP/TFTP protocol
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
dhcp    - invoke DHCP client to obtain IP/boot params
diskboot- boot from IDE device
echo    - echo args to console
erase   - erase FLASH memory
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print online help
ide     - IDE sub-system
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing)
mtest   - simple RAM test
mw      - memory write (fill)
nfs     - boot image via network using NFS protocol
nm      - memory modify (constant address)
pci     - list and access PCI Configuration Space
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
tftpboot- boot image via network using TFTP protocol
version - print monitor version

RAM Build and Uloader

Normally, U-Boot resides in the on-board flash and starts executing at reset. It initialises the CPU, the memory controller and the serial port and then relocates itself at the upper end of the RAM area. After relocation, U-Boot completes the hardware initialisation and then it either proceeds to boot the OS kernel or displays a command prompt and waits for operator input.

U-Boot for the LinkStation can be configured for a RAM build. The only differences between the ROM and RAM builds are the absence of the basic initialisation code (which can only run from ROM) and the link address. You can test your RAM build using uloader.o which is a kernel module that was written specifically for the purpose of loading and starting a RAM build of U-Boot.

Even for the same model, there are hardware differences between the individual LinkStations and, due to these differences, U-Boot might not work properly in some instances. For example, your flash chip might not be supported by the current version of the U-Boot port. It is strongly recommend you test thoroughly U-Boot on your LinkStation using a RAM build before building the ROM version and attempting to burn it into flash. Once you have the RAM build up and running you can use it to install (burn) the ROM version.

Source Code

U-Boot for the LinkStation is distributed as a patch for U-Boot version 1.1.4. You can compile it using either a cross toolchain or, if you have a development environment installed, natively on your LinkStation. I used the DENX Embedded Linux Development Kit (ELDK) version 3.1.1 which comes with gcc 3.3.3 (gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)) with specific patches for PowerPC.

Uloader is distributed as a gzip-ed tar archive which contains the full source code, the binary module, uloader.o, compiled for the original LinkStation kernel and a simple bash script which uses uloader.o to load a RAM build of U-Boot and start it. Two tar archives are provided. The binary module in the first archive has been compiled for the original LinkStation kernel 2.4.17_mvl21-sandpoint and should be used to load a RAM build of U-Boot for the LinkStation 1 / KuroBox standard. The binary module in the second archive has been compiled for the original LinkStation HG kernel 2.4.20_mvl31-ppc_linkstation and should be used to load a RAM build of U-Boot for the Linkstation HG / KuroBox HG.

Installation

After you unpack U-Boot 1.1.4 and apply the U-Boot for the LinkStation patch you will find full installation instructions in the file board/linkstation/INSTALL in the U-Boot directory tree. Full installation instructions are also available on-line.

WARNING
When installing firmware on an embedded computer things can go wrong. The power can go down in the middle of the flash or the flash operation can fail rendering your LinkStation unusable. Please read the installation instructions carefully.

If you are not prepared to lose your LinkStation, do not attempt to install U-Boot.

History

Contact

E-mail your questions and comments at u-boot (at) linuxnotincluded (dot) org (dot) uk.

Resources

DENX Embedded Linux Development Kit (ELDK) on-line documentation
http://www.denx.de/wiki/DULG/ELDK

DENX Embedded Linux Development Kit (ELDK) version 3.1.1
http://ftp.sunet.se/pub/Linux/distributions/eldk/3.1.1/ppc-linux-x86/iso/

U-Boot version 1.1.4 sources
ftp://ftp.denx.de/pub/u-boot/u-boot-1.1.4.tar.bz2

U-Boot for the LinkStation patch version 2.1.0
u-boot-1.1.4-list-2.1.0.diff.gz

Uloader version 1.0 compiled for kernel 2.4.17
uloader-2.4.17.tar.gz

Uloader version 1.0 compiled for kernel 2.4.20
uloader-2.4.20.tar.gz

Installation Instructions
u-bootinstall.html

Old versions

U-Boot for the LinkStation
u-boot-1.1.4-list-2.01.diff.gz
u-boot-1.1.4-ls-hlan-1.0.diff.gz

Uloader version 1.0
uloader-1.0.tar.gz

Installation Instructions for U-Boot for the LinkStation
u-bootinstall_2.0.html
u-bootinstall_1.0.html

Previous versions of this page
u-boot_2.0.html
u-boot_1.0.html