diff options
Diffstat (limited to 'pintos-progos/misc/bochs-2.3.7-build.sh')
| -rwxr-xr-x | pintos-progos/misc/bochs-2.3.7-build.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pintos-progos/misc/bochs-2.3.7-build.sh b/pintos-progos/misc/bochs-2.3.7-build.sh new file mode 100755 index 0000000..57e35d1 --- /dev/null +++ b/pintos-progos/misc/bochs-2.3.7-build.sh | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | #! /bin/sh -e | ||
| 2 | |||
| 3 | if test -z "$SRCDIR" || test -z "$PINTOSDIR" || test -z "$DSTDIR"; then | ||
| 4 | echo "usage: env SRCDIR=<srcdir> PINTOSDIR=<srcdir> DSTDIR=<dstdir> sh $0" | ||
| 5 | echo " where <srcdir> contains bochs-2.3.7.tar.gz" | ||
| 6 | echo " and <pintosdir> is the root of the pintos source tree" | ||
| 7 | echo " and <dstdir> is the installation prefix (e.g. /usr/local)" | ||
| 8 | exit 1 | ||
| 9 | fi | ||
| 10 | |||
| 11 | cd /tmp | ||
| 12 | mkdir bochs-pintos-$$ | ||
| 13 | cd bochs-pintos-$$ | ||
| 14 | mkdir bochs-2.3.7 | ||
| 15 | tar xzf $SRCDIR/bochs-2.3.7.tar.gz | ||
| 16 | cd bochs-2.3.7 | ||
| 17 | cat $PINTOSDIR/src/misc/0001-bochs-2.3.7-jitter.patch | patch -p1 | ||
| 18 | cat $PINTOSDIR/src/misc/0002-bochs-2.3.7-triple-fault.patch | patch -p1 | ||
| 19 | cat $PINTOSDIR/src/misc/0003-bochs-2.3.7-page-fault-segv.patch | patch -p1 | ||
| 20 | cat $PINTOSDIR/src/misc/bochs-2.3.7-gcc43.patch | patch -p1 | ||
| 21 | cat $PINTOSDIR/src/misc/bochs-2.3.7-typos.patch | patch -p1 | ||
| 22 | cat $PINTOSDIR/src/misc/bochs-2.3.7-linux3x.patch | patch -p1 | ||
| 23 | autoconf | ||
| 24 | |||
| 25 | CFGOPTIONAL="--enable-large-pages --enable-mmx --enable-usb --enable-pci --enable-pcidev --enable-acpi --enable-global-pages --enable-show-ips" | ||
| 26 | CFGOPTIMIZE="--enable-all-optimizations --enable-guest2host-tlb --enable-repeat-speedups --enable-trace-cache --enable-icache --enable-fast-function-calls --enable-idle-hack " | ||
| 27 | CFGOPTS="--prefix=$DSTDIR --enable-ignore-bad-msr --enable-disasm --enable-logging --enable-fpu --enable-alignment-check --enable-plugins --enable-cpu-level=6 --enable-readline --without-sdl --without-svga --without-wx --with-x --with-x11 --with-term --with-nogui $CFGOPTIONAL" | ||
| 28 | mkdir plain && | ||
| 29 | cd plain && | ||
| 30 | ../configure $CFGOPTS --enable-gdb-stub && | ||
| 31 | # make -j3 && | ||
| 32 | make && echo "done building plain" && | ||
| 33 | sudo make install && | ||
| 34 | cd .. && | ||
| 35 | mkdir with-dbg && | ||
| 36 | cd with-dbg && | ||
| 37 | ../configure --enable-debugger $CFGOPTS && | ||
| 38 | # make -j3 && | ||
| 39 | make && echo "done building with-dbg" && | ||
| 40 | sudo cp -v bochs $DSTDIR/bin/bochs-dbg && | ||
| 41 | cd .. && | ||
| 42 | echo "SUCCESS" | ||
