]> git.lizzy.rs Git - loadnothing.git/blob - Makefile
.gitignore
[loadnothing.git] / Makefile
1 default_target: vm
2 .PHONY: vm clean
3
4 boot.bin: boot.asm
5         nasm -f bin -o boot.bin boot.asm
6
7 nothing.img: boot.bin
8         dd if=/dev/zero of=nothing.img bs=1M count=1
9         parted -s nothing.img mklabel msdos
10         parted -s -a optimal nothing.img mkpart primary fat32 0% 100%
11         doas losetup /dev/loop1 nothing.img
12         doas mkfs.fat /dev/loop1p1
13         doas losetup -d /dev/loop1
14         dd if=boot.bin of=nothing.img bs=1 count=446 conv=notrunc
15         dd if=magic.bin of=nothing.img bs=1 seek=510 count=2 conv=notrunc
16
17 vm: nothing.img
18         qemu-system-x86_64 -hda nothing.img
19
20 clean:
21         rm -f boot.bin nothing.img