page maintained by Joshua LeVasseur (firstname.lastname@example.org)
Your first step should be to prepare the cross-compilation tool chain. The steps for building the tool chain, and the psim PowerPC simulator, are contained in the file ppc-build.txt in the L4Ka::Pistachio source release. Some FreeBSD source and binary packages are also available for download.
Once you have the appropriate build tools you can progress with the L4Ka::Pistachio build. You will have two build directories:
pistachio-powerpc for the kernel, and
pistachio-user-powerpc for user-level applications. The following instructions assume that the two directories share a common parent directory, and will refer to that directory as
- Make sure that your kernel build directory,
/pistachio-powerpc, does not exist.
- Change into the kernel subdirectory of the L4Ka::Pistachio source release. Execute
- Change into the directory
. Under the
Hardwaremenu, change the
PowerPC. Under the
Kernelmenu, enable the
Fast IPC pathoption. From the
Debuggermenu, enable the kernel debugger, enable the option to enter the kernel debugger at startup, enable the disassembler, enable tracepoints, and enable tracing of kernel memory. Save the configuration file and quit (hit the 'x' key).
- Build the kernel by executing
User Level Build
- Create your user-level application build directory:
- Change into your user-level application build directory.
- Execute the
configurescript which lives in the
usersubdirectory of the L4Ka::Pistachio source release, using the appropriate command line arguments. The configure script prepares the current working directory as the build location. Relevant command line arguments:
- Mandatory for enabling PowerPC support.
- Used by the bootloader to locate the kernel.
- Will cause user-level input and output to use the kernel debugger exception interface. This requires a kernel debugger. Without a kernel debugger, user-level threads will throw unhandled exceptions while trying to perform I/O. Choose this if you plan to use Open Firmware for I/O. Explicitly use this command line option if you don't see I/O as expected, because the comport may be enabled by default.
- Use the serial port for user-level input and output. It currently only supports the psim com port (when configured as suggested in the section below about executing psim).
- Build the user-level applications and PowerPC boot loader by executing
The boot loader source lives in
user/util/piggybacker of the L4Ka::Pistachio source release. The boot loader is a simple elf file which coalesces the runtime modules as elf sections of itself, thus permitting other boot loaders (such as OpenFirmware) to load the entire L4 environment.
All components generated for the boot loader are relative to
/pistachio-user-powerpc. The generated boot loader binary is named
The piggybacker chooses modules based on the file
util/piggybacker/ofppc/Makeconf.local. If it doesn't detect the file, it will generate the file with default values.
If you change the
Makeconf.local file, you may need to delete by hand all
.mod files in the directory
util/piggybacker/ofppc due to broken dependency detection.
It is recommended that you patch psim, and use the psim device tree file (call it
psim.tree), as described in the file ppc-build.txt of the L4Ka::Pistachio source release.
An example psim invocation:
While running the pingpong and l4test applications, you can enter the kernel debugger by hitting the escape key while at the root menus.