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 OS labs. That is, the system-standard gcc, as, ld and objdump should just work. If you are running Ubuntu/Debian Linux, you can get the toolchain using the command:
% sudo aptitude install build-essential
If you are NOT using standard x86/x86-64 linux or BSD, you will need the GNU C compiler toolchain, configured and built as a cross-compiler for the target 'i386-jos-elf'. You can download the specific versions we used via these links, although more recent versions of gcc and binutils should work too:
Once you've unpacked these archives, run the following commands as root:
% cd binutils-2.15 % ./configure --target=i386-jos-elf % make % make install % cd ../gcc-3.4.1 % ./configure --target=i386-jos-elf % make % make install
If there are errors compiling gcc when it gets to libstdc++, don't worry about it.
Then you'll have in /usr/local/bin a bunch of binaries with names like i386-jos-elf-gcc. It will also be necessary to change the GNUMakefile used in the labs to use i386-jos-elf-gcc instead of gcc. There are instructions for how to do this inside of GNUMakefile.
We will use a patched QEMU 0.10.6/0.15 in this lab. Nelson Elhage has written up directions for using QEMU with our course. To build the patched QEMU:
cd ~ # for QEMU 0.15 in Lab 4 wget http://ipads.se.sjtu.edu.cn/courses/os/2015/tools/qemu-1.5.2.tar.bz2 tar xf qemu-1.5.2.tar.bz2
sudo aptitude install build-essential autoconf libtool
Linux:
cd qemu-1.5.2 ./configure --prefix=/usr/local --target-list="i386-softmmu"
OS X:
cd qemu-1.5.2 ./configure --disable-sdl [--prefix=PFX] --target-list="i386-softmmu"
The prefix argument specifies where to install QEMU; without it QEMU will install to /usr/local by default. The target-list argument simply slims down the architectures QEMU will build support for.
make sudo make install
'Expect' is an advanced scripting language and runtime system for user to control a running application. Our grading script (when use QEMU in our lab) is based on 'Expect'. To build 'Expect':
deb ftp://ftp.sjtu.edu.cn/debian/ squeeze main contrib non-free deb ftp://ftp.sjtu.edu.cn/debian/ squeeze-updates mainThen update the index of apt package manager
sudo apt-get updateThen you are free to install new packages. ( Note that the error information about trusted key is harmless.)
sudo apt-get install expect
|
Questions or comments regarding AOSI class? Send e-mail to the TAs at General Info. Acknowledges the MIT 6.828 course (Operating System Engineering) |