User Tools

Site Tools


sheevaplug:uboot

Das U-Boot configuration

Das U-Boot is the bootloader used to bring up the system. The SheevaPlug ships with a custom Marvell build of U-Boot 1.1.4.

Environment variables

U-Boot is configured through a set of environment variables. The current variables list can be seen using the command printenv.

Network settings

IP variables:

  • ipaddr: the sheevaplug IP address
  • netmask: the sheevaplug netmask
  • serverip: the TFTP server IP address

Ethernet variables:

  • ethmtu: the ethernet interface MTU (usually 1500)
  • ethaddr: the ethernet interface MAC address (printed on the barcode label)
  • ethprime: ? (default egiga0)
  • ethact: ? (default egiga0)

Kernel settings

To be able to boot a mainline kernel the following variables must be set

mainlineLinux=yes
arcNumber=2097

These are not required for the Marvell kernel.

Factory environment

This is the printenv output for a stock SheevaPlug (Environment size: 1304/131068 bytes):

baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.0.0
console=console=ttyS0,115200
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/mtdblock2 ro
ethmtu=1500
usb0Mode=host
nandEcc=1bit
ethact=egiga0
serverip=10.10.0.2
ipaddr=10.10.0.1
cesvcid=ULULULULULULPPULULULULULDA
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethaddr=00:50:43:01:65:E4
run_diag=no
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=10.4.50.4:10.4.50.5:10.4.50.5:255.255.255.0:DB88FXX81:eth0:none
bootcmd=nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes

TFTP boot

To boot a kernel/initrams from a TFTP server issue the following commands at the U-Boot prompt

setenv ipaddr <sheevaplug_addr>
setenv serverip <tftp_server_addr>
tftpboot 0x8000000 <rel/path/to/initramfs>
tftpboot 0x2000000 <rel/path/to/uimage>
setenv bootargs <kernel_args>
bootm 0x2000000 0x8000000

An example of bootargs could be

console=ttyS0,115200 root=/dev/ram rw

which tell the kernel to setup a serial console and use the initramfs as root device. If an initramfs is not required it if enough to load the kernel uImage with tftpboot and issue bootm 0x2000000 to start it.

Building an updated U-Boot

Marvell provides the sources for their U-Boot fork, but it's better to use the mainline branch.

git clone git://git.denx.de/u-boot-marvell.git u-boot-marvell.git

Switch to the correct branch

cd u-boot-marvell.git
git checkout -b testing origin/testing

Install the crosscompiler and issue the following commands to build U-Boot

export CROSS_COMPILE=arm-linux-gnueabi-
make mrproper
make sheevaplug_config
make u-boot.kwb USE_PRIVATE_LIBGCC=yes

You will obtain several files:

  • u-boot: ELF U-Boot binary (suitable for direct execution using JTAG)
  • u-boot.kwb: flashable U-Boot image (can be used to update the on-board U-Boot)
sheevaplug/uboot.txt · Last modified: 2012/10/19 16:37 (external edit)