-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (22 loc) · 831 Bytes
/
Makefile
File metadata and controls
30 lines (22 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
nameVM="asm-dev"
all: binary run
binary:
mkdir -p binary
binary/boot.bin: boot/boot.asm
fasm boot/boot.asm binary/boot.bin
binary/kernel.bin: kernel/kernel.asm
fasm kernel/kernel.asm binary/kernel.bin
file.img: binary/boot.bin binary/kernel.bin
dd if=/dev/zero of=file.img bs=1474560 count=1
dd if=binary/boot.bin of=file.img bs=512 count=1 seek=0 conv=notrunc
dd if=binary/kernel.bin of=file.img bs=512 count=1 seek=1 conv=notrunc
clean:
rm binary/*
rm *.img
run: file.img
virtualbox --dbg --startvm $(nameVM) &
createVM:
vboxmanage createvm --name $(nameVM) --register
vboxmanage modifyvm $(nameVM) --ostype Other --memory 4 --boot1 floppy
vboxmanage storagectl $(nameVM) --name Floppy --add floppy
vboxmanage storageattach $(nameVM) --storagectl Floppy --type FDD --medium `pwd`/file.img --port 0 --device 0