Skip to content

Instantly share code, notes, and snippets.

@ytlvy
Forked from mafice/Makefile
Created October 13, 2016 01:46
Show Gist options
  • Save ytlvy/18f585953a38765521db7e511aac1a22 to your computer and use it in GitHub Desktop.
Save ytlvy/18f585953a38765521db7e511aac1a22 to your computer and use it in GitHub Desktop.
build bochs on Mac OS X
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, mode=flat, path=bootloader.img, cylinders=306, heads=4, spt=17
boot: disk
bits 16
org 0x7c00
cli
hlt
times 510-($-$$) db 0
db 0x55
db 0xaa
#!/bin/sh
./configure \
--enable-cpu-level=6 --enable-x86_64 \
--enable-disasm --enable-logging \
--enable-fpu --enable-cdrom \
--with-x11
make
.PHONY: test clean
all: bootloader.img
bootloader.img: bootloader.asm
nasm -f bin -o bootloader.img bootloader.asm
test:
bochs -qf bochsrc
clean:
-rm bootloader.img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment