I'm trying to run one of the first stages of James Molloy's kernel tutorial (
http://www.jamesmolloy.co.uk/tutorial_html/) in Bochs on my Archlinux laptop, but when I unleash Bochs onto the image, it gave me an error message. I tweaked the configuration file, read the manual, googled the problem and then I thought it might be a problem with the build from the Arch repos.
I downloaded the source code for the latest stable version and then did:
Code:
$ ./configure --with-x11 --with-sdl --enable-x86-64
$ make
I ran the executable with
Code:
$ /source/directory/bochs -f bochsrc.txt
With this bochsrc.txt
Code:
megs: 32
romimage: file=/usr/share/bochs/BIOS-bochs-latest address=0xf0000
vgaromimage: file=/usr/share/bochs/VGABIOS-elpin-2.40
floppya: 1_44=/dev/loop0, status=inserted
boot: a
log: bochsout.txt
mouse: enabled=0
clock: sync=realtime
cpu: ips=5000000 model=corei7_sandy_bridge_2600k
display_library: sdl
I get the following output:
Code:
========================================================================
Bochs x86 Emulator 2.5.1
Built from SVN snapshot on January 6, 2012
Compiled on Jul 6 2012 at 21:17:20
========================================================================
00000000000i[ ] reading configuration from bochsrc.txt
------------------------------
Bochs Configuration: Main Menu
------------------------------
This is the Bochs Configuration Interface, where you can describe the
machine that you want to simulate. Bochs has already searched for a
configuration file (typically called bochsrc.txt) and loaded it if it
could be found. When you are satisfied with the configuration, go
ahead and start the simulation.
You can also start bochs with the -q option to skip these menus.
1. Restore factory default configuration
2. Read options from...
3. Edit options
4. Save options to...
5. Restore the Bochs state from...
6. Begin simulation
7. Quit now
Please choose one: [6] 6
00000000000i[ ] installing sdl module as the Bochs GUI
00000000000i[ ] using log file bochsout.txt
No protocol specified
No protocol specified
========================================================================
Bochs is exiting with the following message:
[SDL ] Unable to set requested videomode: 640x480: Couldn't set console screen info
========================================================================
When I change display_library to 'x', the last lines are replaced with:
Code:
Please choose one: [6] 6
00000000000i[ ] installing x module as the Bochs GUI
00000000000i[ ] using log file bochsout.txt
No protocol specified
========================================================================
Event type: PANIC
Device: [XGUI ]
Message: bochs: cannot connect to X server :0
A PANIC has occurred. Do you want to:
cont - continue execution
alwayscont - continue execution, and don't ask again.
This affects only PANIC events from device [XGUI ]
die - stop execution now
abort - dump core
Choose one of the actions above: [die] die
========================================================================
Bochs is exiting with the following message:
[XGUI ] bochs: cannot connect to X server :0
========================================================================
SDL works fine for other programs and X appears to work. Does anyone know of a solution?