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