diff --git a/.gitignore b/.gitignore index 5e81429..8225972 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ CNAME # Other stuff multiboot.pdf +osk-graph.ps grub.log Makefile.out.2 build/bin/s** @@ -29,6 +30,7 @@ build/bin/s** *.ilk *.map *.exp +*.expand # Precompiled Headers *.gch diff --git a/Makefile b/Makefile index 697dbd0..3b4a0b2 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ LDFLAGS=-melf_x86_64 COPTIM=-O2 CWARNS=-Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Werror=implicit-function-declaration -Werror=return-type CINCLUDES=-Iinclude -CFLAGS1=-nostdlib -ffreestanding -mcmodel=large -std=gnu11 +CFLAGS1=-nostdlib -ffreestanding -mcmodel=large -std=gnu11 -fdump-rtl-expand CFLAGS2= -c -mno-red-zone -mno-mmx -mno-sse -mno-sse2 CFLAGS= $(CFLAGS1) $(CFLAGS2) CFLAGS_MATHS= $(CFLAGS1) -c -mno-red-zone -mno-mmx -mno-sse2 @@ -259,10 +259,17 @@ copy_kernel: @echo ${CL2}[$@] ${CL}Success.${CL3} @rmdir $(BINDIR)/disk +egypt: + @find -name '*.expand' -o -name '*.expand' | xargs cat > rtl_exp.out + @egypt < rtl_exp.out | dot -Tps -o osk-graph.ps + @rm -f rtl_exp.out + @evince osk-graph.ps + dust: -@$(MBRDIR)/umount.sh $(BINDIR)/disk || /bin/true @rm -Rf $(OBJDIR)/* @echo ${CL2}[$@] ${CL}Cleaned.${CL3} + clean: -@$(MBRDIR)/umount.sh $(BINDIR)/disk || /bin/true @rm -Rvf ./ProjectTree $(BUILDDIR)/*.log diff --git a/ProjectTree b/ProjectTree index 82078fc..1bc1ee9 100644 --- a/ProjectTree +++ b/ProjectTree @@ -56,102 +56,142 @@ │   │   │   └── loader.o │   │   └── kaleid │   │   ├── extras +│   │   │   ├── argv.c.229r.expand │   │   │   ├── argv.d │   │   │   └── argv.o │   │   ├── kernel │   │   │   ├── init +│   │   │   │   ├── info.c.229r.expand │   │   │   │   ├── info.d │   │   │   │   ├── info.o +│   │   │   │   ├── init.c.229r.expand │   │   │   │   ├── init.d │   │   │   │   ├── init.o +│   │   │   │   ├── ssp.c.229r.expand │   │   │   │   ├── ssp.d │   │   │   │   ├── ssp.o │   │   │   │   ├── table.d │   │   │   │   └── table.o │   │   │   ├── io +│   │   │   │   ├── ata.c.229r.expand │   │   │   │   ├── ata.d │   │   │   │   ├── ata.o +│   │   │   │   ├── cursor.c.229r.expand │   │   │   │   ├── cursor.d │   │   │   │   ├── cursor.o +│   │   │   │   ├── keyb.c.229r.expand │   │   │   │   ├── keyb.d │   │   │   │   ├── keyb.o +│   │   │   │   ├── spkr.c.229r.expand │   │   │   │   ├── spkr.d │   │   │   │   ├── spkr.o +│   │   │   │   ├── vga.c.229r.expand │   │   │   │   ├── vga.d │   │   │   │   └── vga.o │   │   │   ├── ke +│   │   │   │   ├── cpuid.c.229r.expand │   │   │   │   ├── cpuid.d │   │   │   │   ├── cpuid.o +│   │   │   │   ├── idt.c.229r.expand │   │   │   │   ├── idt.d │   │   │   │   ├── idt.o +│   │   │   │   ├── log.c.229r.expand │   │   │   │   ├── log.d │   │   │   │   ├── log.o +│   │   │   │   ├── panic.c.229r.expand │   │   │   │   ├── panic.d │   │   │   │   ├── panic.o +│   │   │   │   ├── rtc.c.229r.expand │   │   │   │   ├── rtc.d │   │   │   │   └── rtc.o │   │   │   ├── mm +│   │   │   │   ├── gdt.c.229r.expand │   │   │   │   ├── gdt.d │   │   │   │   ├── gdt.o +│   │   │   │   ├── heap.c.229r.expand │   │   │   │   ├── heap.d │   │   │   │   ├── heap.o +│   │   │   │   ├── malloc.c.229r.expand │   │   │   │   ├── malloc.d │   │   │   │   ├── malloc.o +│   │   │   │   ├── map.c.229r.expand │   │   │   │   ├── map.d │   │   │   │   ├── map.o +│   │   │   │   ├── paging.c.229r.expand │   │   │   │   ├── paging.d │   │   │   │   └── paging.o │   │   │   ├── po +│   │   │   │   ├── shtdwn.c.229r.expand │   │   │   │   ├── shtdwn.d │   │   │   │   └── shtdwn.o │   │   │   ├── ps │   │   │   │   ├── sched.d │   │   │   │   └── sched.o │   │   │   └── sh +│   │   │   ├── musage.c.229r.expand │   │   │   ├── musage.d │   │   │   ├── musage.o +│   │   │   ├── shcmds.c.229r.expand │   │   │   ├── shcmds.d │   │   │   ├── shcmds.o +│   │   │   ├── shell.c.229r.expand │   │   │   ├── shell.d │   │   │   └── shell.o │   │   ├── libbuf +│   │   │   ├── bclose.c.229r.expand │   │   │   ├── bclose.d │   │   │   ├── bclose.o +│   │   │   ├── bflush.c.229r.expand │   │   │   ├── bflush.d │   │   │   ├── bflush.o +│   │   │   ├── bgetc.c.229r.expand │   │   │   ├── bgetc.d │   │   │   ├── bgetc.o +│   │   │   ├── bmisc.c.229r.expand │   │   │   ├── bmisc.d │   │   │   ├── bmisc.o +│   │   │   ├── bopen.c.229r.expand │   │   │   ├── bopen.d │   │   │   ├── bopen.o +│   │   │   ├── bprint.c.229r.expand │   │   │   ├── bprint.d │   │   │   ├── bprint.o +│   │   │   ├── bputc.c.229r.expand │   │   │   ├── bputc.d │   │   │   ├── bputc.o │   │   │   ├── bread.d │   │   │   ├── bread.o │   │   │   ├── bscan.d │   │   │   ├── bscan.o +│   │   │   ├── bscroll.c.229r.expand │   │   │   ├── bscroll.d │   │   │   ├── bscroll.o │   │   │   ├── bwrite.d │   │   │   └── bwrite.o │   │   └── libc +│   │   ├── atoi.c.229r.expand │   │   ├── atoi.o +│   │   ├── ctype.c.229r.expand │   │   ├── ctype.d │   │   ├── ctype.o +│   │   ├── errno.c.229r.expand │   │   ├── errno.d │   │   ├── errno.o +│   │   ├── itoa.c.229r.expand │   │   ├── itoa.o +│   │   ├── mem.c.229r.expand │   │   ├── mem.d │   │   ├── mem.o +│   │   ├── rand.c.229r.expand │   │   ├── rand.d │   │   ├── rand.o +│   │   ├── sprintf.c.229r.expand │   │   ├── sprintf.d │   │   ├── sprintf.o +│   │   ├── string.c.229r.expand │   │   ├── string.d │   │   ├── string.o +│   │   ├── strtol.c.229r.expand │   │   ├── strtol.d │   │   └── strtol.o │   ├── grub.log @@ -184,6 +224,7 @@ │   │   └── list.h │   ├── mm │   │   ├── heap.h +│   │   ├── malloc.h │   │   └── mm.h │   ├── po │   │   └── shtdwn.h @@ -264,4 +305,4 @@ ├── ProjectTree └── README.md -43 directories, 196 files +43 directories, 237 files