I am creating an image using these commands.
Code: Select all
i686-elf-gcc -nostdlib -ffreestanding -c boot.S -o boot.o
i686-elf-ld -nostdlib -ffreestanding boot.o -o boot.elf -Tlinker.ld
objcopy -O binary boot.elf boot.bin
dd if=/dev/zero of=image.img bs=2048 count=16
dd if=boot.bin of=image.img bs=512 conv=notrunc
bochsrc.txt:
Code: Select all
plugin_ctrl: unmapped=true, biosdev=true, speaker=true, extfpuirq=true, parallel=true, serial=true, iodebug=true
config_interface: textconfig
display_library: x
memory: host=32, guest=32
romimage: file="/usr/local/share/bochs/BIOS-bochs-latest", address=0x00000000, options=none
vgaromimage: file="/usr/local/share/bochs/VGABIOS-lgpl-latest"
boot: cdrom
floppy_bootsig_check: disabled=0
# no floppya
# no floppyb
ata0: enabled=true, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=none
ata0-slave: type=cdrom, path=image.img, status=inserted
ata1: enabled=true, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata1-master: type=none
ata1-slave: type=none
ata2: enabled=false
ata3: enabled=false
Code: Select all
00000000000i[HD ] CD on ata0-1: 'image.img'
00000000000i[CD1 ] load cdrom with path=' 'image.img'
00000000000i[CD1 ] Opening image file as a cd.
00000000000i[HD ] Media present in CD-ROM drive
00000000000i[HD ] Capacity is 48 sectors (0,09 MB)
Code: Select all
00005191849i[BIOS ] IDE time out
00017375870i[BIOS ] CDROM boot failure code : 0005
00017411533p[BIOS ] >>PANIC<< No bootable device.
========================================================================
Bochs is exiting with the following message:
[BIOS ] No bootable device.
========================================================================