You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
528 B
Makefile
28 lines
528 B
Makefile
all : image
|
|
|
|
compile :
|
|
nasm -f bin -o boot.bin boot.asm
|
|
nasm -f bin -o program.bin program.asm
|
|
|
|
|
|
image : compile
|
|
sudo dd if=/dev/zero of=disk.img bs=1024 count=720
|
|
sudo dd if=boot.bin of=disk.img bs=512 count=1 conv=notrunc
|
|
sudo dd if=program.bin of=disk.img bs=512 seek=1 count=1 conv=notrunc
|
|
|
|
|
|
flashusb : image
|
|
#sudo umount /dev/sdb
|
|
sudo dd if=boot.bin of=/dev/sdb bs=512 count=1
|
|
sudo dd if=program.bin of=/dev/sdb bs=512 seek=1 count=1
|
|
|
|
run : image
|
|
qemu-system-x86_64 disk.img
|
|
|
|
clean :
|
|
rm *.img
|
|
rm *.bin
|
|
|
|
|
|
|