From OR1K



Das U-Boot, the universal bootloader, is a popular bootloader for embedded systems. For information about the project itself see its webpage.

This page contains information about the OpenRISC 1000 architecture port and board additions.


U-Boot sources with OpenRISC 1000 support is available in the official U-boot sources and can be downloaded from


There are two different ways to do configuration in U-Boot, one is the pre-compile configuration in the include/configs/boardname.h and the other is the runtime configuration called the 'environment'


The following configuration knobs are necessary to enable networking:

#define CONFIG_SYS_ETHOC_BASE 		0x92000000

The preferred way of setting up MAC address and IP settings is through the environment:

setenv ethaddr 00:12:34:56:78:9a
setenv gatewayip
setenv ipaddr
setenv netmask
setenv serverip

NOTE: you need to restart your board after you have set 'ethaddr'.

If for some reason there is no possibility to save the environment to a non-volatile storage, the settings can also be hardcoded into to the pre-compile configuration

#define CONFIG_ETHADDR			00:12:34:56:78:9a

Creating a Linux kernel boot image

To create a u-boot Linux kernel boot image, a tool called mkimage is used. It is available in u-boot's tools/ directory and the following command can be used to create a not compressed kernel image called 'uImage' with load address at 0 and entry point at 0x100

tools/mkimage -n 'Linux for OpenRISC' -A or1k -O linux -T kernel -C none -a 0 -e 0x100 -d /path/to/vmlinux.bin uImage

Creating a bare metal boot image

To create a u-boot image from a baremetal program, the u-boot tool call mkimage is used. It is available in u-boot's tools/ directory and the following command can be used to create a not compressed bare metal image called 'helloWorld' with load address 0 and entry point at 0x100

mkimage -A or1k -T standalone -C none -a 0 -e 0x100 -n helloWorld -d hello.bin uImage

Downloading the image to the board

The following will use NFS to download this image to the board. Ensure you have NFS set up and accessible somewhere on your machine. Copy the resulting file from the previous step, uImage, there. So long as the board has network access, set the following in u-boot:

set serverip
set bootfile "/path/to/your/nfs/share/uImage"
set loadaddr 100000

The above assumes your host machine (running the NFS server) is at - change this to the appropriate IP in your case. The program will be saved into RAM at the 1MB mark (0x100000). Now run the NFS download program:

==> nfs
Using ETHOC-0 device
File transfer via NFS from server; our IP address is
Filename '/home/user/path/to/uImage'.
Load address: 0x100000
Loading: ################
Bytes transferred = 80176 (13930 hex)

Your exact details may vary.

Running the image from RAM

This image can then be booted from that address with

bootm 100000

Saving the image to flash and booting it

Or we can copy it to the 1MB mark in flash memory with the following:

protect off all
erase f0100000 +20000
cp 100000 f0100000 13930
protect on all

We copied 80176 bytes (13930 hex) to the 1MB mark in flash (address 0xf0100000) from RAM address at 1MB.

This image can now be booted with:

bootm f0100000

Booting from tftp

When u-boot's net configuration is properly setup, and a tftp server is running, the following command is used to load the file uImage into RAM.

tftpboot uImage

When the image has finished loading, it can be booted by using the bootm command.


Supported boards

The supported boards so far are board ports from ORPSoC.


This board is the ORSoC Actel development board with an A3PE1500 Actel part on it.

The board config is far from complete, see the file include/configs/ordb1a3pe1500.h for more information on the config.

To build for this board run:

make ordb1a3pe1500_config


This board is a Xilinx Virtex 5 development board.

make ml501_config


This board is a Xilinx Spartan 6 development board from Digilent.

make atlys_config


This board is a Altera Cyclone IV development board from Terasic.

make de0_nano_config

How to create your own board port

To add your own board port follow these steps. We will use the atlys board as a starting point, and we will call our new board 'myboard':

1) copy u-boot/include/configs/atlys.h to u-boot/include/configs/myboard.h
2) copy the folder u-boot/board/atlys to u-boot/board/myboard
3) add 'myboard' to u-boot/boards.cfg in a similar way as the 'atlys' board appears
4) edit u-boot/include/configs/myboard.h and u-boot/board/myboard/ to suite your needs
5) run make myboard_config

© copyright 1999-2017, equivalent to ORSoC AB, all rights reserved. OpenCores®, registered trademark.