diff options
Diffstat (limited to 'notes/1.txt')
| -rw-r--r-- | notes/1.txt | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/notes/1.txt b/notes/1.txt new file mode 100644 index 0000000..9d478f7 --- /dev/null +++ b/notes/1.txt | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | Getting Started with PINTOS | ||
| 2 | =========================== | ||
| 3 | |||
| 4 | Building Project 1 | ||
| 5 | ------------------ | ||
| 6 | |||
| 7 | pintos $ cd src/threads | ||
| 8 | threads $ make | ||
| 9 | |||
| 10 | |||
| 11 | Building Bochs | ||
| 12 | -------------- | ||
| 13 | You should have a patched bochs install available. | ||
| 14 | |||
| 15 | See | ||
| 16 | |||
| 17 | http://courses.mpi-sws.org/os-ss11/assignments/pintos/pintos_12.html#SEC160 | ||
| 18 | |||
| 19 | There is a build script src/misc/bochs-2.3.7-build.sh in the pintos fork from Saarland, | ||
| 20 | which (after small modifications) works on a modern Ubuntu x86. | ||
| 21 | |||
| 22 | For Ubuntu 11 with a Linux 3.0 kernel, you need to: | ||
| 23 | |||
| 24 | * Regenerate the configure script (autoconf configure.in) | ||
| 25 | * Patch the test for Linux 2.4 or 2.6 | ||
| 26 | |||
| 27 | After building, copy bochs and bochs-gdb to the pintos/src/utils directory | ||
| 28 | |||
| 29 | Running | ||
| 30 | ------- | ||
| 31 | |||
| 32 | # [pintos/src] | ||
| 33 | PATH=`pwd`/utils:$PATH | ||
| 34 | |||
| 35 | cd threads/build | ||
| 36 | # [pintos/src/threads/build] | ||
| 37 | pintos run alarm-multiple > logfile | ||
| 38 | |||
| 39 | |||
| 40 | ### Reproducability | ||
| 41 | |||
| 42 | This command line flags to pintos influence reproducability. | ||
| 43 | Remember: you need the patched bochs build. | ||
| 44 | |||
| 45 | -j seed ... Reproducible behavior | ||
| 46 | -r ... Real-Time behavior | ||
| 47 | |||
| 48 | Running with qemu | ||
| 49 | ----------------- | ||
| 50 | |||
| 51 | # [pintos/src] | ||
| 52 | vim utils/pintos # comment line with -no-kqemu flag | ||
| 53 | |||
| 54 | cd threads/build | ||
| 55 | # [pintos/src/threads/build] | ||
| 56 | pintos --qemu -- run alarm-multiple | ||
| 57 | |||
| 58 | Debugging | ||
| 59 | --------- | ||
| 60 | |||
| 61 | pintos $ vim utils/pintos-gdb | ||
| 62 | |||
| 63 | GDBMACROS=${PINTOS_SRC}/misc/gdb-macros | ||
| 64 | |||
| 65 | [pts/0 build] $ pintos --gdb -- run alarm-multiple | ||
| 66 | [pts/1 build] $ pintos-gdb kernel.o | ||
| 67 | (gdb) debugpintos | ||
| 68 | |||
| 69 | Testing | ||
| 70 | ------- | ||
| 71 | |||
| 72 | * Running all tests | ||
| 73 | |||
| 74 | build $ make check | ||
| 75 | |||
| 76 | * Running a single test | ||
| 77 | |||
| 78 | build $ rm tests/threads/alarm-multiple.result | ||
| 79 | build $ make tests/threads/alarm-multiple.result | ||
| 80 | |||
| 81 | |||
