First, you will have to install bochs and bochs-x. On every Debian-based Linux:
- Code: Select all
sudo apt-get install bochs bochs-x
Bochs needs a configuration file. Here is my file:
- Code: Select all
megs: 32
romimage: file=/usr/share/bochs/BIOS-bochs-latest
vgaromimage: file=VGABIOS-elpin-2.40
vga_update_interval: 40000
mouse: enabled=0, toggle=f12
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
# CD-ROM image
ata0-slave: type=cdrom, path="/home/richard/wyoos1/mykernel.iso", status=inserted
boot: cdrom
log: bochsout.txt
mouse: enabled=0
clock: sync=realtime
cpu: ips=1000000000
You will also need a VGAROM image, it is available to download at https://github.com/larsr/bochs/blob/master/bios/VGABIOS-elpin-2.40, just put it in the project folder. Lastly, to run Bochs, you need to execute
- Code: Select all
sudo bochs -qf bochsrc.txt