User guide

28 GR-LEON4-ITX Development Board
Quick Start Guide
starting pid 22, tty '': '/etc/init.d/rcS'
starting pid 33, tty '': '/bin/sh'
/ # echo "hello world"
hello world
/ # ls
bin etc init linuxrc proc sys usr
dev home lib mnt sbin tmp var
/ #
Note that the last configuration does not mount the root filesystem from the USB stick.
5.2 Creating a boot PROM
Overview
Creating a boot PROM allows the system to boot software after power-up without the need to
connect with GRMON. There are several boot loaders available for LEON/GRLIB systems.
This document contains descriptions on how to use two of them, MKPROM2 and U-boot,
with the GR-LEON4-ITX board.
MKPROM2
Please see the MKPROM2 documentation for a general description of the application. This
sections deals with specifics of the GR-LEON4-ITX board. The MKPROM2 package is
included on the USB Flash stick in the directory software/bootloaders/mkprom2 but it is
preferable to download the latest version from http://www.gaisler.com.
MKPROM2 does not include support for initializing the DVI transmitter. In order to do this
MKPROM can be instructed to include software provided by the user. The data package
included with the board contains the file gr-l4itx-pack/mkprom2/bdinit.c that contains code for
initializing the DVI transmitter via I
2
C. To compile bdinit.c so that it can be included in the
boot ROM issue the command:
sparc-elf-gcc -Wall -c -g -O2 bdinit.c
Add the switch -DBPP24 if you will use 24-bit color and add -DDVI if you want to use digital
DVI output (to autodetect the type of screen connected via I
2
C and select the correct
initialisation parameters is left as an exercise for the reader). The command line options for
MKPROM2 to be used with the GR-LEON4-ITX are:
MKPROM2 included on USB Flash stick:
Note: The MKPROM2 version included on the Flash stick does not support booting SMP
Linux. Please see text below on more recent MKPROM2 versions for SMP booting.
mkprom2 -v -freq 100 -stack 0x4ffffff0 -pnp 0xffeff800 -ddr2spa_cfg1 0x96a08616
-ddr2spa_cfg3 0x13650000 -ddr2spa_cfg4 0x0000017f -gpt 0xc0000300 -irqmp 0xc0800100
-uart 0xc0000100 -dsustart 0xd0000000 -dsutrace -bdinit -nomsg
However, at the time of writing MKPROM2 contains some hard coded values for addresses
in the system that makes it unsuitable for creating boot ROMs for the GR-LEON4-ITX board.
A workaround is to skip much of the built-in initialization provided by MKPROM and instead
perform the initialisation with the bdinit(..) calls. The file gr-l4itx-pack/mkprom2/bdinit2.c
contains initialisation code for the DDR2 memory controller, APBUART and timer unit.
In order to build a boot ROM for a system that will use video output, first compile bdinit2.c:
jan@jan:~/Linux$ sparc-elf-gcc -Wall -c -g -O2 -DDVI -o bdinit.o bdinit2.c
© Aeroflex Gaisler AB March 2013, Rev. 0.3