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)))))
|
||||
KIMG := kernel.bin
|
||||
|
||||
ISO := Hazel.iso
|
||||
|
||||
CFLAGS := -ffreestanding -Wall -Wextra -Werror -I $(INCLUDEDIR)
|
||||
LDFLAGS := -ffreestanding -nostdlib -lgcc -T kernel/kernel.ld
|
||||
QEMUFLAGS := -kernel $(BUILDDIR)/$(KIMG) \
|
||||
QEMUFLAGS := -cdrom $(BUILDDIR)/$(ISO) \
|
||||
-serial stdio
|
||||
|
||||
$(BUILDDIR)/$(KIMG): $(KOBJ)
|
||||
|
@ -24,12 +26,12 @@ $(BUILDDIR)/%.o: */%.c
|
|||
|
||||
kernel: $(BUILDDIR)/$(KIMG)
|
||||
|
||||
$(BUILDDIR)/Hazel.iso: kernel
|
||||
cp $(BUILDDIR)/kernel.bin boot/kernel.bin
|
||||
grub-mkrescue -o $(BUILDDIR)/Hazel.iso .
|
||||
$(BUILDDIR)/$(ISO): kernel
|
||||
cp $(BUILDDIR)/$(KIMG) boot/$(KIMG)
|
||||
grub-mkrescue -o $(BUILDDIR)/$(ISO) .
|
||||
iso: $(BUILDDIR)/$(ISO)
|
||||
|
||||
qemu: kernel
|
||||
qemu: iso
|
||||
qemu-system-i386 $(QEMUFLAGS)
|
||||
|
||||
clean:
|
||||
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