Add patch to support serial terminals under Solaris.
[pintos-anon] / src / misc / bochs-2.2.6-build.sh
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.2.6.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 $$
13 cd $$
14 mkdir bochs-2.2.6
15 tar xzf $SRCDIR/bochs-2.2.6.tar.gz
16 cd bochs-2.2.6
17 cat $PINTOSDIR/src/misc/bochs-2.2.6-ms-extensions.patch | patch -p1
18 cat $PINTOSDIR/src/misc/bochs-2.2.6-big-endian.patch | patch -p1
19 cat $PINTOSDIR/src/misc/bochs-2.2.6-jitter.patch | patch -p1
20 cat $PINTOSDIR/src/misc/bochs-2.2.6-triple-fault.patch | patch -p1
21 cat $PINTOSDIR/src/misc/bochs-2.2.6-solaris-tty.patch | patch -p1
22 if test "`uname -s`" = "SunOS"; then
23     cat $PINTOSDIR/src/misc/bochs-2.2.6-solaris-link.patch | patch -p1
24 fi
25 CFGOPTS="--with-x --with-x11 --with-term --with-nogui --prefix=$DSTDIR"
26 mkdir plain &&
27         cd plain && 
28         ../configure $CFGOPTS --enable-gdb-stub && 
29         make && 
30         make install &&
31         cd ..
32 mkdir with-dbg &&
33         cd with-dbg &&
34         ../configure --enable-debugger $CFGOPTS &&
35         make &&
36         cp bochs $DSTDIR/bin/bochs-dbg &&
37         cd ..