I’m experimenting with a simple boot code sample. Since it’s tedious to have to reboot the computer whenever I want to run the boot code, I decided to try and set up Bochs. Under Ubuntu 16.04, I installed it from the repositories:
Code:
apt-get install bochs bochs-sdl
Following is the contents of my Bochs configuration file,
‘bochs.txt’:
Code:
megs: 32
romimage: file=/usr/share/bochs/BIOS-bochs-latest
vgaromimage: file=/usr/share/vgabios/vgabios.bin
floppya: 1_44=floppy.img, status=inserted, write_protected=1
boot: a
display_library: sdl
log: bochsout.txt
mouse: enabled=0
I created the floppy disk image,
‘floppy.img’, as follows (where
‘bootcode.bin’ is the 512-byte file that contains the boot code):
Code:
dd if=/dev/zero of=floppy.img bs=512 count=2880
dd if=bootcode.bin of=floppy.img conv=notrunc
Next, I ran
‘bochs’:
Code:
bochs -qf bochs.txt
The
“Bochs x86-64 emulator, http://bochs.sourceforge.net/” window opened, ... but nothing happened.
The console window from which I ran the
‘bochs’ command, displayed the following:
Code:
========================================================================
Bochs x86 Emulator 2.6
Built from SVN snapshot on September 2nd, 2012
========================================================================
00000000000i[ ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[ ] BXSHARE not set. using compile time default '/usr/share/bochs'
00000000000i[ ] lt_dlhandle is 0x491bcd0
00000000000i[PLGIN] loaded plugin libbx_unmapped.so
00000000000i[ ] lt_dlhandle is 0x491cb20
00000000000i[PLGIN] loaded plugin libbx_biosdev.so
00000000000i[ ] lt_dlhandle is 0x491d4a0
00000000000i[PLGIN] loaded plugin libbx_speaker.so
00000000000i[ ] lt_dlhandle is 0x491eb70
00000000000i[PLGIN] loaded plugin libbx_extfpuirq.so
00000000000i[ ] lt_dlhandle is 0x491f3b0
00000000000i[PLGIN] loaded plugin libbx_parallel.so
00000000000i[ ] lt_dlhandle is 0x4921060
00000000000i[PLGIN] loaded plugin libbx_serial.so
00000000000i[ ] lt_dlhandle is 0x4924c40
00000000000i[PLGIN] loaded plugin libbx_gameport.so
00000000000i[ ] lt_dlhandle is 0x49256e0
00000000000i[PLGIN] loaded plugin libbx_iodebug.so
00000000000i[ ] reading configuration from bochs.txt
00000000000i[ ] lt_dlhandle is 0x4925f20
00000000000i[PLGIN] loaded plugin libbx_sdl.so
00000000000i[ ] installing sdl module as the Bochs GUI
00000000000i[ ] using log file bochsout.txt
Next at t=0
(0) [0x00000000fffffff0] f000:fff0 (unk. ctxt): jmp far f000:e05b ; ea5be000f0
<bochs:1>
Apparently, I had to type the
“c” (for
“continue”) command to get the virtual machine running.
Is this normal? None of the examples that I could find, mention this.