I have Bochs Working enough to boot floppy!!

Erwin Rol mailinglists at erwinrol.com
Mon Oct 18 08:52:35 UTC 2004


Hey all,

Sorry for the slow reply, but i had other things to do :-)

On Wed, 2004-10-13 at 10:03 -0500, Joel Sherrill  wrote:
> Hi All,
> 
> I have a Bochs configuration file that works enough to run the 4.5.0
> grub floppy image.  I just ran it as "bochs -f b -q".
> 

I boot RTEMS from CDROM (ISO image to be exact). What i do is just dump
a bunch of RTEMS .exe files in a directory, add grub , use mkisofs to
generate a CD and boot from that CD. Since the CD is small mkisofs is
done in a second or two. The advantage is that you don't need calculate
the size of the image, and are not limited to the size of a floppy.

To make a grub bootable CD just follow the GRUB manual

http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html


If you don't make a "menu" for bochs you just have to type :

kernel (cd)/hello.exe
boot

at the bochs prompt (of course hello.exe must be in the CD root path).

> Anyone have an idea what CPU model is being simulated by default
> and which other variants can be tested using different Bochs options?
> 

pentium, the pentium pro support is still incomplete, at least thats
what the bochs website says. You can change the CPU type when compiling
bochs.


> How about simulating a hard disk?  Anyone done that with RTEMS?
> 

didn't try

> Erwin.. did you get the TCP/IP stack working?
> 

Also didn't try that.

> I would really like to get to the point where this is an easy
> way to test nearly all of RTEMS.
> 

with a bit of scripting it should be easy to make the CD-image and than
automatically start bochs with that image. that way you could for
example type "rtems_bochs hello.exe" and that would generate a bootable
CD with hello.exe and start bochs.

Years back I hacked a GDBstub-proxy for bochs, that worked by passing
the serial port reads to a socked, and so a GDB from outside bochs could
contact the gdbstub in rtems that was running in bochs. This is not
needed anymore, bochs has a real gdbstub build in now ( --enable-gdbstub
when compiling bochs) with that you can connect a gdb to bochs and debug
the program that runs in bochs. 

> Erwin.. then maybe someone can do the same for PearPC. :)
> 

maybe it is an idea to make a BOCHS BSP (and PearPC BSP) in rtems, so
that hardware drivers and maybe special hacks to work around problems
can be put there ?

- Erwin

-------------- next part --------------
# configuration file generated by Bochs
config_interface: textconfig
display_library: x
megs: 64
romimage: file=/usr/share/bochs/BIOS-bochs-latest, address=0xf0000
vgaromimage: /usr/share/bochs/VGABIOS-elpin-2.40
boot: cdrom
# no floppya
# no floppyb
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=cdrom, path="/home/erwin/rtems.iso", status=inserted, biosdetect=auto, model="Generic 1234"
ata1: enabled=0
ata2: enabled=0
ata3: enabled=0
parport1: enabled=0
com1: enabled=0
usb1: enabled=0
# no sb16
floppy_bootsig_check: disabled=0
vga_update_interval: 30000
keyboard_serial_delay: 20000
keyboard_paste_delay: 100000
floppy_command_delay: 50000
ips: 500000
text_snapshot_check: 0
mouse: enabled=0
private_colormap: enabled=0
i440fxsupport: enabled=0
clock: sync=none, time0=local
# no ne2k
newharddrivesupport: enabled=1
# no loader
log: -
logprefix: %t%e%d
debugger_log: -
panic: action=fatal
error: action=report
info: action=report
debug: action=ignore
pass: action=fatal
keyboard_mapping: enabled=1, map=/usr/share/bochs/keymaps/x11-pc-de.map
keyboard_type: mf
user_shortcut: keys=none
gdbstub_port: 1234

# no cmosimage


More information about the users mailing list