diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2018-09-01 12:41:34 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2018-09-01 12:41:34 +0100 |
| commit | c1d948ce1973d9be37a43718f548776a0061807b (patch) | |
| tree | b4952431832b13d62558465ce14b9a944fcde2fa | |
| parent | da686609820298b1e245b53ca86ec946e79684cb (diff) | |
| download | tinyOS-c1d948ce1973d9be37a43718f548776a0061807b.tar.xz tinyOS-c1d948ce1973d9be37a43718f548776a0061807b.zip | |
Add Makefile task to create bootable iso
| -rw-r--r-- | .gitignore | 4 | ||||
| -rw-r--r-- | Makefile | 12 | ||||
| -rw-r--r-- | boot-iso/boot/grub/grub.cfg | 6 |
3 files changed, 18 insertions, 4 deletions
@@ -52,4 +52,6 @@ Mkfile.old dkms.conf bin/ -.vscode/
\ No newline at end of file +.vscode/ +*.bin +*.iso
\ No newline at end of file @@ -11,12 +11,18 @@ build: setup kernel/kernel.c kernel/io/vga/text_mode_display.c kernel/kernel-boo nasm -f elf32 kernel/kernel-bootstrap.asm -o bin/kernel-bootstrap.o $(CC) $(CFLAGS) -c kernel/kernel.c -o bin/kernel.o $(CC) $(CFLAGS) -c kernel/io/vga/text_mode_display.c -o bin/text_mode_display.o - ld -m elf_i386 -T link.ld -o bin/kernel bin/*.o + ld -m elf_i386 -T link.ld -o bin/kernel.bin bin/*.o clean: rm -f bin/* + rm -f boot-iso/boot/kernel.bin + rm -f tinyOS.iso run: - qemu-system-i386 -kernel bin/kernel + qemu-system-i386 -kernel bin/kernel.bin -build-and-run: build run
\ No newline at end of file +build-and-run: build run + +iso: build + cp bin/kernel.bin boot-iso/boot/ + grub-mkrescue -o tinyOS.iso boot-iso/
\ No newline at end of file diff --git a/boot-iso/boot/grub/grub.cfg b/boot-iso/boot/grub/grub.cfg new file mode 100644 index 0000000..93aedb6 --- /dev/null +++ b/boot-iso/boot/grub/grub.cfg @@ -0,0 +1,6 @@ +set timeout=0 +set default=0 + +menuentry "tinyOS" { + multiboot /boot/kernel.bin +}
\ No newline at end of file |