-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (19 loc) · 743 Bytes
/
Copy pathMakefile
File metadata and controls
25 lines (19 loc) · 743 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
iso: link
mkdir -p target/isofiles/boot/grub
cp target/runix.elf target/isofiles/boot/runix.elf
cp src/boot/grub.cfg target/isofiles/boot/grub/grub.cfg
grub-mkrescue -o runix.iso target/isofiles
kernel:
cargo build
boot: src/boot/multiboot_header.asm src/boot/boot.asm
mkdir -p target
nasm -felf64 src/boot/multiboot_header.asm -o target/multiboot_header.o
nasm -felf64 src/boot/boot.asm -o target/boot.o
link: boot kernel
ld -n -o target/runix.elf -T link.ld target/multiboot_header.o target/boot.o target/x86_64-unknown-none/debug/librunix.a
clean:
rm -rf *.o *.bin runix.iso isofiles
run:
qemu-system-x86_64 -cdrom runix.iso -no-shutdown -no-reboot
debug:
qemu-system-x86_64 -cdrom runix.iso -no-shutdown -no-reboot -s -S