3

I'm working on an OS programming project called pintos. It is run on bochs following the command pintos run nameOfProcess

And here's the error message I get

Writing command line to /tmp/eKW3NMXoGT.dsk...
squish-pty bochs -q
========================================================================
                     Bochs x86 Emulator 2.5.1.svn
             Built from SVN snapshot, after release 2.5.1
                  Compiled on Apr  6 2012 at 19:37:19
========================================================================
00000000000i[     ] reading configuration from bochsrc.txt
00000000000i[     ] installing x module as the Bochs GUI
00000000000i[     ] using log file bochsout.txt
Next at t=0
Writing command line to /tmp/eKW3NMXoGT.dsk...
squish-pty bochs -q
========================================================================
                     Bochs x86 Emulator 2.5.1.svn
             Built from SVN snapshot, after release 2.5.1
                  Compiled on Apr  6 2012 at 19:37:19
========================================================================
00000000000i[     ] reading configuration from bochsrc.txt
00000000000i[     ] installing x module as the Bochs GUI
00000000000i[     ] using log file bochsout.txt
Next at t=0
(0) [0x00000000fffffff0] f000:fff0 (unk. ctxt): (invalid)                 ; ffff
<bochs:1> fgets() returned ERROR.
debugger interrupt request was 0
(0).[0] [0x00000000fffffff0] f000:fff0 (unk. ctxt): (invalid)                 ; ffff
(0) [0x00000000fffffff0] f000:fff0 (unk. ctxt): (invalid)                 ; ffff
<bochs:1> fgets() returned ERROR.
debugger interrupt request was 0
(0).[0] [0x00000000fffffff0] f000:fff0 (unk. ctxt): (invalid)                 ; ffff

Also my bochsrc.txt

romimage: file=$BXSHARE/BIOS-bochs-latest, address=0xe0000  
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
boot: disk
cpu: ips=1000000
megs: 4
log: bochsout.txt
panic: action=fatal
clock: sync=none, time0=0
ata0-master: type=disk, path=/tmp/eKW3NMXoGT.dsk, mode=flat, cylinders=1, heads=16, spt=63, translation=none
com1: enabled=1, mode=term, dev=/dev/stdout

Bochs was built from source with extra configurations on my Ubuntu 11.04

manuzhang
  • 2,995
  • 4
  • 36
  • 67

2 Answers2

5

I had the same problem and I asked a question on OSDev forum. I used file=$BXSHARE/BIOS-bochs-legacy because I needed 64K BIOS. It didn't work with:

romimage: file=$BXSHARE/BIOS-bochs-legacy, address=0xf0000

in .bochsrc file. And it works without "address=0xf0000" part.

Try to delete the start address of BIOS here:

romimage: file=$BXSHARE/BIOS-bochs-latest, address=0xe0000

Just leave:

romimage: file=$BXSHARE/BIOS-bochs-latest

in your bochsrc.txt

2

Install qemu instead of bosch:

sudo apt-get install qemu

If the version of qemu is recent then you need create a simbolyc link from "qemu-system-i386" to "qemu"

sudo ln -s /usr/bin/qemu-system-i386 /usr/bin/qemu

If the version of qemu is minor to 1.0 you don't need to do that. Now you can run Pintos using qemu, for example:

pintos --qemu -- run alarm-multiple
Florent
  • 12,310
  • 10
  • 49
  • 58
Reno
  • 21
  • 2