[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This chapter explains how to install a Pintos development environment on your own machine. If you are using a Pintos development environment that has been set up by someone else, you do not need to read this chapter or follow these instructions.
The Pintos development environment is targeted at Unix-like systems. It has been most extensively tested on GNU/Linux, in particular the Debian and Ubuntu distributions, and Solaris. It is not designed to install under any form of Windows.
Prerequisites for installing a Pintos development environment include the following, on top of standard Unix utilities:
gcc
;
otherwise, an 80x86 cross-compiler should be available as
i386-elf-gcc
. We provide a setup guide
and a script (src/misc/toolchain-build.sh) for installing GCC, binutils, and GDB.
addr2line
, ar
, ld
,
objcopy
, and ranlib
. If the host machine is not an
80x86, versions targeting 80x86 should be available with an
i386-elf-prefix.
i386-elf-gdb.
Once these prerequisites are available, follow these instructions to install Pintos:
src/utils. Copy
backtrace,
pintos,
pintos-gdb,
pintos-mkdisk,
pintos-set-cmdline, and
Pintos.pminto the default
PATH
.
src/misc/gdb-macrosin a public location. Then use a text editor to edit the installed copy of
pintos-gdb, changing the definition of
GDBMACROS
to point to where you installed
gdb-macros. Test the installation by running
pintos-gdb
without any arguments. If it does not complain
about missing gdb-macros, it is installed correctly.
make
in
src/utils. Install
squish-pty,
squish-unixand
setitimer-helpersomewhere in
PATH
.
make
check
in the top-level testsdirectory. The tests take between 20 minutes and 1 hour to run, depending on the speed of your hardware.
make dist
in the
top-level docdirectory. This creates a
WWWsubdirectory within
docthat contains HTML and PDF versions of the documentation, plus the design document templates and various hardware specifications referenced by the documentation. Building the PDF version of the manual requires Texinfo and TeX (see above). You may install
WWWwherever you find most useful.
The doc
directory is not included in the .tar.gz
distributed for Pintos. It is in the Pintos CVS tree available via
:pserver:anonymous@footstool.stanford.edu:/var/lib/cvs
, in the
pintos
module. The CVS tree is not the authoritative
source for Stanford course materials, which should be obtained from the
course website.
Upstream Bochs has bugs and warts that should be fixed when used with Pintos. Thus, Bochs should be installed manually for use with Pintos, instead of using the packaged version of Bochs included with an operating system distribution.
Two different Bochs binaries should be installed. One, named simply
bochs
, should have the GDB stub enabled, by passing
--enable-gdb-stub
to the Bochs configure
script. The
other, named bochs-dbg
, should have the internal debugger
enabled, by passing --enable-debugger
to configure
.
(The pintos
script selects a binary based on the options
passed to it.) In each case, the X, terminal, and "no GUI" interfaces
should be configured, by passing --with-x --with-x11 --with-term
--with-nogui
to configure
.
This version of Pintos is designed for use with Bochs 2.6.2. A number
of patches for this version of Bochs are included in src/misc
:
bochs-2.6.2-jitter-plus-segv.patch
Adds the "jitter" feature, in which timer interrupts are delivered at random intervals (see section 1.1.4 Debugging versus Testing).
bochs-2.6.2-xrandr-pkgconfig.patch
Fix configure flag for x11 xrandr.
bochs-2.6.2-banner-stderr.patch
Use stderr to print the Bochs banner information.
bochs-2.6.2-block-device-check.patch
Update block device check.
To apply all the patches, cd
into the Bochs directory, then
type:
patch -p1 < $PINTOSDIR/src/misc/bochs-2.6.2-jitter-plus-segv.patch patch -p1 < $PINTOSDIR/src/misc/bochs-2.6.2-xrandr-pkgconfig.patch patch -p1 < $PINTOSDIR/src/misc/bochs-2.6.2-banner-stderr.patch patch -p1 < $PINTOSDIR/src/misc/bochs-2.6.2-block-device-check.patch |
$PINTOSDIR
, of course. You can
use patch
's --dry-runoption if you want to test whether the patches would apply cleanly before trying to apply them.
Sample commands to build and install Bochs for Pintos are supplied in
src/misc/bochs-2.6.2-build.sh
.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |