clean the makefile and the root directory
This commit is contained in:
parent
216454f468
commit
a839d6f1ca
21
Makefile
21
Makefile
|
@ -47,6 +47,7 @@ OBJDIR=build/obj
|
|||
KOBJDIR=build/obj/kaleid
|
||||
LOBJDIR=build/obj/boot
|
||||
BINDIR=build/bin
|
||||
BUILDDIR=build
|
||||
|
||||
#Color codes
|
||||
CL='\033[0;32m'
|
||||
|
@ -192,23 +193,23 @@ $(KOBJDIR)/kernel/sched.o: $(KERNELDIR)/kernel/proc/sched.c $(KERNELDIR)/include
|
|||
|
||||
.PHONY: test
|
||||
test: all
|
||||
@qemu-system-x86_64 -m 5G -mem-prealloc -hda build/bin/disk.img \
|
||||
-d cpu_reset,guest_errors,pcall,int 2> qemu.log &
|
||||
@qemu-system-x86_64 -m 5G -hda $(BUILDDIR)/bin/disk.img \
|
||||
-d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log &
|
||||
.PHONY: test32
|
||||
test32: all
|
||||
@qemu-system-i386 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int 2> qemu.log &
|
||||
@qemu-system-i386 -hda $(BUILDDIR)/bin/disk.img -d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log &
|
||||
|
||||
.PHONY: debug
|
||||
debug: all
|
||||
@qemu-system-x86_64 -m 64M -hda build/bin/disk.img -no-reboot \
|
||||
-no-shutdown -mem-path memdump.bin -mem-prealloc -d cpu_reset,guest_errors,pcall,int 2> qemu.log &
|
||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > kaleid64_disasm.asm
|
||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > kaleid32_disasm.asm
|
||||
@qemu-system-x86_64 -m 64M -hda $(BUILDDIR)/bin/disk.img -no-reboot \
|
||||
-no-shutdown -d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log &
|
||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > $(BUILDDIR)/kaleid64_disasm.asm
|
||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > $(BUILDDIR)/kaleid32_disasm.asm
|
||||
|
||||
.PHONY: gdb
|
||||
gdb: all
|
||||
@qemu-system-x86_64 -m 64M -hda build/bin/disk.img -no-reboot \
|
||||
-no-shutdown -mem-path memdump.bin -d cpu_reset,guest_errors,pcall,int -s 2> qemu.log &
|
||||
@qemu-system-x86_64 -m 64M -hda $(BUILDDIR)/bin/disk.img -no-reboot \
|
||||
-no-shutdown -d cpu_reset,guest_errors,pcall,int -s 2> $(BUILDDIR)/qemu.log &
|
||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > kaleid64_disasm.asm
|
||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > kaleid32_disasm.asm
|
||||
@gdb \
|
||||
|
@ -241,7 +242,7 @@ $(BINDIR)/kaleid: $(LOBJDIR)/kaleid.x86_64
|
|||
|
||||
$(LOBJDIR)/kaleid.x86_64: $(kal_kern_obj) $(kal_com_obj) $(LOBJDIR)/loader.o
|
||||
@echo ${CL2}[$@] ${NC}Linking kernel objects...${CL3}
|
||||
@$(LD) $(LDFLAGS) -T build/kernel.ld \
|
||||
@$(LD) $(LDFLAGS) -T $(BUILDDIR)/kernel.ld \
|
||||
$(LOBJDIR)/loader.o \
|
||||
$(KOBJDIR)/*.o \
|
||||
$(KOBJDIR)/kernel/*.o \
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
│ │ ├── strtol.o
|
||||
│ │ ├── ultoa.o
|
||||
│ │ └── utoa.o
|
||||
│ ├── grub.log
|
||||
│ └── kernel.ld
|
||||
├── kaleid
|
||||
│ ├── crtlib
|
||||
|
@ -162,12 +163,8 @@
|
|||
├── AUTHORS
|
||||
├── ChangeLog
|
||||
├── COPYING
|
||||
├── grub.log
|
||||
├── kaleid32_disasm.asm
|
||||
├── kaleid64_disasm.asm
|
||||
├── Makefile
|
||||
├── ProjectTree
|
||||
├── qemu.log
|
||||
└── Readme.md
|
||||
|
||||
28 directories, 117 files
|
||||
28 directories, 114 files
|
||||
|
|
|
@ -47,7 +47,7 @@ sudo mount /dev/loop1 $2 > /dev/null
|
|||
echo ${CL2}[grub-install.sh]${NC} Installing grub... \(grub-install\)${CL3}
|
||||
## Install grub
|
||||
sudo grub-install -V
|
||||
sudo grub-install --target=i386-pc --debug --root-directory=$2 --boot-directory=$2/boot --no-floppy --modules="part_msdos biosdisk fat multiboot configfile" /dev/loop0 2> grub.log
|
||||
sudo grub-install --target=i386-pc --debug --root-directory=$2 --boot-directory=$2/boot --no-floppy --modules="part_msdos biosdisk fat multiboot configfile" /dev/loop0 2> build/grub.log
|
||||
|
||||
echo ${CL2}[grub-install.sh]${NC} Copying grub.cfg
|
||||
sudo cp $3 $2/boot/grub/grub.cfg > /dev/null
|
||||
|
|
634184
kaleid32_disasm.asm
634184
kaleid32_disasm.asm
File diff suppressed because it is too large
Load Diff
630816
kaleid64_disasm.asm
630816
kaleid64_disasm.asm
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue