Running Pintos
The "pintos" Utility
We've supplied a program for conveniently running Pintos in a simulator (Qemu or Bochs), called pintos. In the simplest case, you can invoke pintos as pintos [argument...]. Each argument is passed to the Pintos kernel for it to act on.
Try it out!
First
cdinto the newly created build directory.Then issue the command
pintos -- run alarm-multiple, which passes the argumentsrun alarm-multipleto the Pintos kernel.In these arguments,
runinstructs the kernel to run a test andalarm-multipleis the test to run.This command invokes Qemu. Then Pintos boots and runs the
alarm-multipletest program, outputing a few lines of text. When it's done, you can close Qemu byCtrl+a+c.You can log the output to a file by redirecting at the command line, e.g.
pintos -- run alarm-multiple > logfile.
options
The pintos program offers several options for configuring the simulator or the virtual hardware. If you specify any options, they must precede the arguments passed to the Pintos kernel and be separated from them by --, so that the whole command looks like:
pintos option1 option2 ... -- arg1 arg2 ....You can invoke pintos -h to see a list of available options.
Options can select a simulator to use: the default is Qemu, but
--bochsselects Bochs.You can run the simulator with a debugger. Just select
--gdboption.You can set the amount of memory to give the VM with option
-m.Finally, you can select how you want VM output to be displayed: use
-vto turn off the VGA display,-tto use your terminal window as the VGA display instead of opening a new window (Bochs only), or-sto suppress serial input fromstdinand output tostdout.
The pintos utility program is heavily used by our testing suites, so it is fully configurable and very flexible. You certainly do not need to remember all these options and you can always refer to it by running the command "pintos -h".
Last updated