X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fmisc%2Fbochs-2.6.11-build.sh;fp=src%2Fmisc%2Fbochs-2.6.11-build.sh;h=603bf1aae31917070f4f455c9d447d3da70071e2;hp=0000000000000000000000000000000000000000;hb=9f013d0930202eea99c21083b71098a0df64be0d;hpb=85da529909adac7ed00861d259001b124cd5b54f diff --git a/src/misc/bochs-2.6.11-build.sh b/src/misc/bochs-2.6.11-build.sh new file mode 100755 index 0000000..603bf1a --- /dev/null +++ b/src/misc/bochs-2.6.11-build.sh @@ -0,0 +1,49 @@ +#!/bin/sh -xe + +# Note: as of 2.6.9, you need to change line 566 of pintos. Replace: +# user_shortcut: keys=ctrlaltdel +# with +# keyboard: user_shortcut=ctrl-alt-del +# to accommodate the new bochsrc.txt syntax + +V=2.6.11 + +if test 1 != "$#"; then + echo "usage: $0 " >&2 + exit 2 +fi +export PREFIX="$1" + +SRCDIR=$(dirname $(readlink -f "$0")) +if test ! -d "$SRCDIR"; then + echo "cannot file src directory" >&2 + exit 1 +fi + +if test ! -f "$SRCDIR/bochs-$V.tar.gz"; then + wget -O "$SRCDIR/bochs-$V.tar.gz" \ + "https://sourceforge.net/projects/bochs/files/bochs/$V/bochs-$V.tar.gz/download" +fi + +builddir=$(mktemp -d /tmp/bochsXXXXXXXXX) +trap "rm -rf \"$builddir\"" 0 + +cd "$builddir" +tar xzf "$SRCDIR/bochs-$V.tar.gz" +cd "bochs-$V" + +for patchfile in "$SRCDIR/bochs-$V"-*.patch; do + patch -p1 -i "$patchfile" +done + +CFGOPTS="--with-x --with-x11 --with-term --with-nogui" +mkdir plain +(cd plain && + ../configure $CFGOPTS --prefix="$PREFIX" --enable-gdb-stub && + make -j$(nproc) && + make install) +mkdir with-dbg +(cd with-dbg && + ../configure --enable-debugger --disable-debugger-gui $CFGOPTS --prefix="$PREFIX" && + make -j$(nproc) && + cp bochs "$PREFIX/bin/bochs-dbg")