From: acevest Date: Thu, 4 Nov 2021 02:40:31 +0000 (+0800) Subject: mov include/boot/*.h to boot/ X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=c25958e7771914ec8822b6d2313ad6befc54cb3f;p=kernel.git mov include/boot/*.h to boot/ --- diff --git a/Makefile b/Makefile index 7648af5..428b585 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ KERNELBIN = KERNEL.BIN LINKSCRIPT = scripts/link.ld SRC_DIRS = boot mm lib fs kernel drivers -INC_DIRS = include drivers +INC_DIRS = include drivers boot CFLAGS += ${INC_DIRS:%=-I%} diff --git a/boot/boot.c b/boot/boot.c index c3e3ee7..35b9fc4 100644 --- a/boot/boot.c +++ b/boot/boot.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include diff --git a/include/boot/boot.h b/boot/boot.h similarity index 100% rename from include/boot/boot.h rename to boot/boot.h diff --git a/boot/multiboot.S b/boot/multiboot.S index 372e07a..2209b1e 100644 --- a/boot/multiboot.S +++ b/boot/multiboot.S @@ -14,7 +14,7 @@ *-------------------------------------------------------------------------- */ #define ASM -#include "boot/boot.h" +#include "boot.h" #include "system.h" #include "task.h" .global kernel_entry @@ -148,4 +148,4 @@ GDTR: # Flags .long MULTIBOOT_HEADER_FLAGS # Checksum - .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) \ No newline at end of file + .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) diff --git a/include/boot/multiboot.h b/boot/multiboot.h similarity index 100% rename from include/boot/multiboot.h rename to boot/multiboot.h diff --git a/include/stdio.h b/include/stdio.h index 1b36e1d..b6ba90d 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -19,6 +19,7 @@ #include #include extern int write(int fd, const char *buf, unsigned long size); +extern int vsprintf(char *buf, const char *fmt, char *args); static inline int printf(const char *fmt, ...) { char ptfbuf[512]; char *args = (char *)(((char *)&fmt) + 4); diff --git a/kernel/setup.c b/kernel/setup.c index e6a0c43..fcddc9d 100644 --- a/kernel/setup.c +++ b/kernel/setup.c @@ -18,6 +18,8 @@ #include #include +extern void vga_init(); +extern void init_mm(); extern void setup_gdt(); extern void setup_idt(); extern void setup_gate(); @@ -26,6 +28,7 @@ extern void setup_sysc(); extern void setup_pci(); extern void set_tss(); extern void setup_tasks(); +extern void setup_irqs(); extern void ide_init(); extern void setup_fs(); extern void setup_ext2(); diff --git a/mm/bootmem.c b/mm/bootmem.c index c6eaa08..418f313 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -6,7 +6,7 @@ * Description: none * ------------------------------------------------------------------------ */ -#include +#include #include #include #include @@ -209,4 +209,4 @@ find_next_block: printk("%s alloc bootmem size: %x pfn cnt: %d [%d, %d)\n", title, size, pfn_cnt, bgn_pfn, end_pfn); return region; -} \ No newline at end of file +} diff --git a/mm/buddy.c b/mm/buddy.c index d2ceed7..e7f58cf 100644 --- a/mm/buddy.c +++ b/mm/buddy.c @@ -8,6 +8,7 @@ */ #include #include +#include #include struct buddy_system { diff --git a/mm/mm.c b/mm/mm.c index cd4509e..323306e 100644 --- a/mm/mm.c +++ b/mm/mm.c @@ -14,7 +14,7 @@ *-------------------------------------------------------------------------- */ #include -#include +#include #include #include #include diff --git a/mm/slub.c b/mm/slub.c index d182f2c..92547e9 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -310,5 +310,5 @@ void init_slub_system() { printk("kmalloc addr %08x\n", (unsigned long) addr); addrs[i] = addr; } -#endifq +#endif }