L4/Alpha Requirements
- Suitable compile environment. This may require you to set up a cross
compiler that is capable of outputting ELF files.
- Compiler to build Alpha (ELF) executables. gcc or Compaq's C compiler is
suitable.
- An Alpha. Currently uniprocessor 2106x, 2116x and 21264 CPUs are
supported. Multiprocessor support exists specifically for 21264.
Packages Available
- L4Alpha
- L4/Alpha kernel source.
- L4Alpha-tools
- Tools required to build L4.
- L4Alpha-apps
- Example applications running on L4.
- L4Alpha-bl
- L4/Alpha bootloader.
- dite
- Bootable file generator.
1. Downloading and updating your copy of the source
L4/Alpha source is available in source tarballs and cvs at
http://sourceforge.net/projects/l4alpha.
1.1 CVS access
To obtain the most up to date copy of L4/Alpha, CVS is recommended.
be requested. To obtain a copy of the source you can do the following:
cvs -d:pserver:anonymous@cvs.l4alpha.sourceforge.net:/cvsroot/l4alpha login
cvs -z3 -d:pserver:anonymous@cvs.l4alpha.sourceforge.net:/cvsroot/l4alpha co modulename
where modulename in this case is L4Alpha
There may exist branches in the cvs tree for various forks in the code. These
may or may not be relevant to you.
2. Building tools and L4
2.1 Setting up a suitable compile environment
It is possible to build images using coff tools, however the official set of
tools now require ELF support. If you wish to compile using coff tools, you
should consult the Makefiles of an older tagged release in CVS.
If you are not compiling on a Linux/Alpha system then you need to set up a
cross compiler. ELF support is required for the Alpha image generator
(edit/dite) tool which currently only understands ELF and raw files.
Recommended setup is as follows:
- binutils-2.9.1
- gcc-2.8.1 or gcc-2.95.3
Warning: It is known that binutils-2.10.1 running on an x86 linux host does
not function correctly.
Configure binutils with a target of alpha-linux. Build and install the
sources in an appropriate location. Configure gcc with a target of
alpha-linux and the --with-gnu-as and --with-gnu-ld options enabled. This
should give you a working set of compiling tools.
2.2 Setting up dite and L4 compiler tools
Packages dite and L4Alpha-tools.
Many of the tools required to compile L4 are derived from the Alpha SDK V4.0.
These tools are can be obtained from cvs or as a source tarball.
Follow the instructions in this package to build the L4 tools.
2.3 Setting up the L4/Alpha bootloader
Package L4Alpha-bl.
If you are booting via the SRM console, you can use the L4/Alpha bootloader to
boot L4.
To build L4Alpha-bl you may have to change some of the Makefile variables to
suit your build environment. Alternately you can download the L4Alpha-bl
executable from the web site.
Currently this bootloader does not support booting L4 on multiprocessors, this
work is in progress. Want to help??
2.4 L4/Alpha SMP bootloader
We currently provide an evil hack to boot L4/Alpha on SMP. We use a slightly
modified linux kernel which first boots and then gives control over to L4.
This bootloader is distributed as a binary under the name of l4bl_smp.nh.
Source may be obtained upon request.
2.5 Setting up and building L4
Configure L4 for the hardware you wish to run it on. Edit
Makefile.conf to suit your needs. For example, to compile for the Digital
Multia:
L4ARCH = 21064
L4CPU = EV4
SYS_PLATFORM = multia
MAX_NUM_CPUS = 1
These variables are used to specify which files the Makefile should use when
compiling a kernel. These must be one of the supported machine
configurations. In the future, the configure process will be made more user
friendly.
Note that only a small list of SYS_PLATFORM's are supported and it is quite
likely that the kernel will work without issues on other machines. Ensure that
you match as close as possible in this case.
Modify the L4BL variable in L4/Alpha Makefile.conf to point to your desired
bootloader.
You may also need to edit variables specifying the location of your C
compilers and of the dite executable.
Now you should be able to build kernels and executable example code. A list of
examples and how to compile them can be found in user/README. To compile the
template example:
make template-bootpfile
This generates an elf image called -bootpfile which is bootable by
the hardware you configured for.
A raw image suitable for booting using the debugger (see below) may also be
build by using:
make template-raw
It will be linked at address $L4ENTRY and needs to be booted at that address.
3. Booting via network (bootp/tftp)
3.1 Setting up bootp/tftp
This section assumes you have installed a system with bootp and tftp daemons
running.
My /etc/bootptab looks as follows:
.multia:hd=/tftp:hf=/dev/null:sm=255.255.255.0:gw=129.94.238.1: \
ht=ethernet:sa=129.94.238.119:ds=129.94.238.3:td=/tftp:
gzero:ht=ethernet:ha=08002BE45F62:ip=129.94.238.134:tc=.multia:
Configure this as suitable for your local subnet. Note that I have set
my tftp directory to /tftp which I will assume is used in the rest of
this document. To obtain the hardware address required for the ha
field you can enter the following at the SRM BIOS prompt on your
Alpha:
show device
The network device is typically called 'ewa0'. You should consult SRM
documentation for more details.
In your /tftp directory you need to have installed the image you wish
to boot and the Alpha debugger suitable for your hardware if you wish
to boot L4 though that. This document makes this assumption.
3.2 Booting a example-raw file
Firstly boot the system debugger (which can be found in the Alpha SDK).
>>> boot ewa0 -file debugger
This should start the debugger with output being displayed on COM1
and/or the GRAPHICS display. Note that L4 will send all output out COM1.
From the debugger you can then boot an image as follows:
EB64> netboot /tftp/l4ecdl.boot 200000
3.3 Booting a example-bootpfile file
The included user example code "template" can be booted directly via SRM with
the L4Alpha bootloader when built using:
make template-bootpfile
the resultant image and then simply be booted via SRM using the following
command:
>>> boot ewa0 -file template-bootpfile -flags go
|