X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmisc%2Fbochs-2.1.1.patch;h=42fafc5cd4ab98a7dbb2a695fc71cb65f0ae32eb;hb=b5951493cb20b27398413552d8287c054994a8a5;hp=a88df1c0b2f18c223e339cf3bf940fac92d96e9a;hpb=d810034292894081f885458e730dd66fa6349ab2;p=pintos-anon diff --git a/src/misc/bochs-2.1.1.patch b/src/misc/bochs-2.1.1.patch index a88df1c..42fafc5 100644 --- a/src/misc/bochs-2.1.1.patch +++ b/src/misc/bochs-2.1.1.patch @@ -19,7 +19,7 @@ project documentation, in which timer interrupts are delivered at random intervals. To apply all the patches, cd into the Bochs directory, then type - patch -p1 < ~/pintos/src/misc/bochs-2.1.1.patch + patch -p1 < $PINTOSROOT/src/misc/bochs-2.1.1.patch You will have to supply the proper path to the patch, of course. You can provide the --dry-run option to patch if you want to test whether the patch would apply cleanly before actually patching. @@ -33,6 +33,28 @@ the `pintos' utility: If you want the gdb stub, add --enable-gdb-stub If you want the internal debugger, add --enable-debugger +Here are the commands used to build and install all the versions of +Bochs we make available on the elaines: + +cd /tmp && tar xzf ~/bochs-2.1.1.tar.gz && cd bochs-2.1.1 +patch -p1 < $PINTOSROOT/src/misc/bochs-2.1.1.patch +CFGOPTS="--with-x --with-x11 --with-term --with-nogui --prefix=/usr/class/cs140/i386" +(mkdir plain && + cd plain && + ../configure $CFGOPTS && + make && + make install) +(mkdir with-gdb && + cd with-gdb && + ../configure --enable-gdb-stub $CFGOPTS && + make && + cp bochs /usr/class/cs140/i386/bin/bochs-gdb) +(mkdir with-dbg && + cd with-dbg && + ../configure --enable-debugger $CFGOPTS && + make && + cp bochs /usr/class/cs140/i386/bin/bochs-dbg) + diff -urp orig/bochs-2.1.1/Makefile.in bochs-2.1.1/Makefile.in --- orig/bochs-2.1.1/Makefile.in 2004-02-11 14:28:02.000000000 -0800 +++ bochs-2.1.1/Makefile.in 2004-09-13 15:05:26.281550000 -0700 @@ -139,6 +161,8 @@ diff -urp orig/bochs-2.1.1/gdbstub.cc bochs-2.1.1/gdbstub.cc mem2hex((char *)registers, obuf, NUMREGSBYTES); put_reply(obuf); break; + +diff -u tmp/bochs-2.1.1/iodev/serial.cc bochs-2.1.1/iodev/serial.cc --- tmp/bochs-2.1.1/iodev/serial.cc 2004-02-11 14:28:54.000001000 -0800 +++ bochs-2.1.1/iodev/serial.cc 2004-09-14 23:02:04.000001000 -0700 @@ -53,7 +53,7 @@ @@ -196,8 +220,8 @@ diff -urp bochs-2.1.1.orig/iodev/pit82c54.cc bochs-2.1.1/iodev/pit82c54.cc + unsigned n = thisctr.inlatch; + if (jitter) { + n *= (double) rand() / RAND_MAX; -+ if (n < 1) -+ n = 1; ++ if (n < 5) ++ n = 5; + } + set_count(thisctr, n); thisctr.next_change_time=(thisctr.count_binary-1) & 0xFFFF;