aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/pintos
diff options
context:
space:
mode:
authorklaar36 <klas.arvidsson@liu.se>2017-05-19 14:49:26 +0200
committerklaar36 <klas.arvidsson@liu.se>2017-05-19 14:49:26 +0200
commit3abaf43c09556e45e144fddca971909ecbe50671 (patch)
tree363fd365cb7b8d91ef7e46f777b9506392419153 /src/utils/pintos
parent9ba34af727385052d5ae0615f5bd7f424242c5c4 (diff)
downloadpintos-rs-3abaf43c09556e45e144fddca971909ecbe50671.tar.gz
pintos script modifications for qemu/solaris
Diffstat (limited to 'src/utils/pintos')
-rwxr-xr-xsrc/utils/pintos25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/utils/pintos b/src/utils/pintos
index ac1c0bf..9fa0064 100755
--- a/src/utils/pintos
+++ b/src/utils/pintos
@@ -6,6 +6,12 @@ use Fcntl;
use File::Temp 'tempfile';
use Getopt::Long qw(:config bundling);
+# klaar@ida 2011-01-12; result of some sys-commands like `uptime` is
+# expected to be in english, causing warning "Use of uninitialized
+# value in numeric ge (>=) at /home/TDDI04/labs/bin/pintos line 853."
+# Setting LC_ALL to C fixes that.
+$ENV{'LC_ALL'} = 'C';
+
# Command-line options.
our ($start_time) = time ();
our ($sim); # Simulator: bochs, qemu, or player.
@@ -16,6 +22,7 @@ our ($vga); # VGA output: window, terminal, or none.
our ($jitter); # Seed for random timer interrupts, if set.
our ($realtime); # Synchronize timer interrupts with real time?
our ($timeout); # Maximum runtime in seconds, if set.
+our ($dport) = 1234; # set gdb connection port [default=1234]
our ($kill_on_failure); # Abort quickly on test failure?
our (@puts); # Files to copy into the VM.
our (@gets); # Files to copy out of the VM.
@@ -61,6 +68,7 @@ sub parse_command_line {
"r|realtime" => sub { set_realtime () },
"T|timeout=i" => \$timeout,
+ "dport=i" => \$dport,
"k|kill-on-failure" => \$kill_on_failure,
"v|no-vga" => sub { set_vga ('none'); },
@@ -85,7 +93,7 @@ sub parse_command_line {
or exit 1;
}
- $sim = "bochs" if !defined $sim;
+ $sim = "qemu" if !defined $sim;
$debug = "none" if !defined $debug;
$vga = "window" if !defined $vga;
@@ -107,8 +115,8 @@ Usage: pintos [OPTION...] -- [ARGUMENT...]
where each OPTION is one of the following options
and each ARGUMENT is passed to Pintos kernel verbatim.
Simulator selection:
- --bochs (default) Use Bochs as simulator
- --qemu Use QEMU as simulator
+ --bochs Use Bochs as simulator
+ --qemu (default) Use QEMU as simulator
--player Use VMware Player as simulator
Debugger selection:
--no-debug (default) No debugger
@@ -116,6 +124,7 @@ Debugger selection:
--gdb Debug with gdb
Display options: (default is both VGA and serial)
-v, --no-vga No VGA display or keyboard
+ Use C-a x to make qemu exit
-s, --no-serial No serial input or output
-t, --terminal Display VGA in terminal (Bochs only)
Timing options: (Bochs only)
@@ -472,24 +481,20 @@ sub run_qemu {
if $vga eq 'terminal';
print "warning: qemu doesn't support jitter\n"
if defined $jitter;
- use File::Which qw(which where);
- my $path = which 'qemu';
- if ($path eq "") {
- $path = which 'qemu-system-i386';
- }
- my (@cmd) = ($path);
+ my (@cmd) = ('qemu');
for my $iface (0...3) {
my ($option) = ('-hda', '-hdb', '-hdc', '-hdd')[$iface];
push (@cmd, $option, $disks_by_iface[$iface]{FILE_NAME})
if defined $disks_by_iface[$iface]{FILE_NAME};
}
+ push (@cmd, '-p', $dport); # temporary disabled for test on lille4
push (@cmd, '-m', $mem);
push (@cmd, '-net', 'none');
- push (@cmd, '-nographic') if $vga eq 'none';
push (@cmd, '-serial', 'stdio') if $serial && $vga ne 'none';
push (@cmd, '-S') if $debug eq 'monitor';
push (@cmd, '-s', '-S') if $debug eq 'gdb';
push (@cmd, '-monitor', 'null') if $vga eq 'none' && $debug eq 'none';
+ push (@cmd, '-nographic') if $vga eq 'none';
run_command (@cmd);
}