summaryrefslogtreecommitdiffstats
path: root/pintos-progos/notes/1.txt
blob: 9d478f77e3b3c45ac0434b79146e70aea05b13f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Getting Started with PINTOS
===========================

Building Project 1
------------------

pintos  $ cd src/threads
threads $ make


Building Bochs
--------------
You should have a patched bochs install available.

See

  http://courses.mpi-sws.org/os-ss11/assignments/pintos/pintos_12.html#SEC160

There is a build script src/misc/bochs-2.3.7-build.sh in the pintos fork from Saarland,
which (after small modifications) works on a modern Ubuntu x86.

For Ubuntu 11 with a Linux 3.0 kernel, you need to:

  * Regenerate the configure script (autoconf configure.in)
  * Patch the test for Linux 2.4 or 2.6

After building, copy bochs and bochs-gdb to the pintos/src/utils directory

Running
-------

  # [pintos/src]
  PATH=`pwd`/utils:$PATH

  cd threads/build
  # [pintos/src/threads/build]
  pintos run alarm-multiple > logfile


### Reproducability

This command line flags to pintos influence reproducability.
Remember: you need the patched bochs build.

  -j seed ... Reproducible behavior
  -r      ... Real-Time behavior

Running with qemu
-----------------

  # [pintos/src]
  vim utils/pintos # comment line with -no-kqemu flag

  cd threads/build
  # [pintos/src/threads/build]
  pintos --qemu -- run alarm-multiple

Debugging
---------

pintos $ vim utils/pintos-gdb

  GDBMACROS=${PINTOS_SRC}/misc/gdb-macros

[pts/0 build] $ pintos --gdb -- run alarm-multiple
[pts/1 build] $ pintos-gdb kernel.o
(gdb) debugpintos

Testing
-------

* Running all tests

  build  $ make check

* Running a single test

  build  $ rm   tests/threads/alarm-multiple.result
  build  $ make tests/threads/alarm-multiple.result