added back grub
This commit is contained in:
parent
a7209c2e9f
commit
1f4195225e
14
Makefile
14
Makefile
|
@ -10,9 +10,11 @@ KOBJ := $(addprefix $(BUILDDIR)/, \
|
||||||
$(patsubst %.asm,%.o, $(patsubst %.c,%.o, $(KSRC)))))
|
$(patsubst %.asm,%.o, $(patsubst %.c,%.o, $(KSRC)))))
|
||||||
KIMG := kernel.bin
|
KIMG := kernel.bin
|
||||||
|
|
||||||
|
ISO := Hazel.iso
|
||||||
|
|
||||||
CFLAGS := -ffreestanding -Wall -Wextra -Werror -I $(INCLUDEDIR)
|
CFLAGS := -ffreestanding -Wall -Wextra -Werror -I $(INCLUDEDIR)
|
||||||
LDFLAGS := -ffreestanding -nostdlib -lgcc -T kernel/kernel.ld
|
LDFLAGS := -ffreestanding -nostdlib -lgcc -T kernel/kernel.ld
|
||||||
QEMUFLAGS := -kernel $(BUILDDIR)/$(KIMG) \
|
QEMUFLAGS := -cdrom $(BUILDDIR)/$(ISO) \
|
||||||
-serial stdio
|
-serial stdio
|
||||||
|
|
||||||
$(BUILDDIR)/$(KIMG): $(KOBJ)
|
$(BUILDDIR)/$(KIMG): $(KOBJ)
|
||||||
|
@ -24,12 +26,12 @@ $(BUILDDIR)/%.o: */%.c
|
||||||
|
|
||||||
kernel: $(BUILDDIR)/$(KIMG)
|
kernel: $(BUILDDIR)/$(KIMG)
|
||||||
|
|
||||||
$(BUILDDIR)/Hazel.iso: kernel
|
$(BUILDDIR)/$(ISO): kernel
|
||||||
cp $(BUILDDIR)/kernel.bin boot/kernel.bin
|
cp $(BUILDDIR)/$(KIMG) boot/$(KIMG)
|
||||||
grub-mkrescue -o $(BUILDDIR)/Hazel.iso .
|
grub-mkrescue -o $(BUILDDIR)/$(ISO) .
|
||||||
|
iso: $(BUILDDIR)/$(ISO)
|
||||||
|
|
||||||
qemu: kernel
|
qemu: iso
|
||||||
qemu-system-i386 $(QEMUFLAGS)
|
qemu-system-i386 $(QEMUFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm build/* boot/*.bin
|
rm build/* boot/*.bin
|
||||||
|
|
5
boot/grub/grub.cfg
Normal file
5
boot/grub/grub.cfg
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
default=0
|
||||||
|
timeout=0
|
||||||
|
menuentry "Hazel" {
|
||||||
|
multiboot /boot/kernel.bin
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user