CS422/522: Operating Systems, Spring 2010 &mdash Tools
If you use the Linux-based Zoo machines, then all the software tools you will need for this course are already installed on the machines and ready to use. If you would like to compile and run the tools on your own machine, however, here is the information you need. We cannot guarantee that these tools will run on your computer, but they should run on recent versions of Linux.
It should be possible to get this development environment running under Windows with the help of Cygwin. Install cygwin, and be sure to install the flex and bison packages (they are under the development header).
Most modern Linuxes and BSDs have an ELF toolchain compatible with the CPSC 422 labs. That is, the system-standard gcc, as, ld and objdump should just work. The lab makefile should automatically detect this. However, if your machine is in this camp and the makefile fails to detect this, you can override it by adding the following line to conf/env.mk:
Mac OS X:
You'll first have to install gmp and mpfr. To use Mac Ports versions, do this:
# sudo port install gmp mpfr # sudo mkdir -p /usr/local/include /usr/local/lib # sudo ln -sf /opt/local/include/gmp* /usr/local/include/ # sudo ln -sf /opt/local/include/mpfr* /usr/local/include/ # sudo ln -sf /opt/local/lib/libgmp* /usr/local/lib/ # sudo ln -sf /opt/local/lib/libmpfr* /usr/local/lib/You could also persuade the configure script to get gmp and mpfr directly out of the /opt/local tree, but other libraries, such as the Mac Ports version of iconv, may get mixed up with the Apple-provided version of iconv and mess up other parts of the build process. These considerations may or may not apply to Mac Fink.
If you are using something other than standard x86 Linux or BSD, you will need the GNU C compiler toolchain, configured and built as a cross-compiler for the target 'i386-elf', as well as the GNU debugger, similarly configured for i386-elf. You can download specific versions we recently verified to work via these links, although more recent versions of gcc, binutils, and GDB should work too:
Once you've unpacked these archives,
run the following commands
make install commands must be run as root):
$ cd binutils-2.20 $ ./configure --target=i386-elf --disable-nls --disable-werror $ make $ make install $ cd ../gcc-4.4.2 $ ./configure --target=i386-elf --enable-languages=c --disable-nls \ --without-headers --with-newlib --disable-threads --disable-shared \ --disable-libmudflap --disable-libssp $ make $ make install $ cd ../gdb-7.0 $ ./configure --target=i386-elf --program-prefix=i386-elf- --disable-werror $ make $ make install
Then you'll have in /usr/local/bin a bunch of binaries with names like i386-elf-gcc. The lab makefile should detect this toolchain and use it in preference to your machine's default toolchain. If this doesn't work, there are instructions on how to override the toolchain inside the GNUmakefile in the labs.
Copyright (c) 2000-2010 Zhong Shao and Bryan Ford, Department of Computer Science, Yale University