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%}
#include <assert.h>
#include <bits.h>
-#include <boot/boot.h>
+#include <boot.h>
#include <page.h>
#include <system.h>
*--------------------------------------------------------------------------
*/
#define ASM
-#include "boot/boot.h"
+#include "boot.h"
#include "system.h"
#include "task.h"
.global kernel_entry
# 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)
#include <string.h>
#include <syscall.h>
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);
#include <printk.h>
#include <system.h>
+extern void vga_init();
+extern void init_mm();
extern void setup_gdt();
extern void setup_idt();
extern void setup_gate();
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();
* Description: none
* ------------------------------------------------------------------------
*/
-#include <boot/boot.h>
+#include <boot.h>
#include <mm.h>
#include <printk.h>
#include <system.h>
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
+}
*/
#include <irq.h>
#include <mm.h>
+#include <string.h>
#include <sysctl.h>
struct buddy_system {
*--------------------------------------------------------------------------
*/
#include <bits.h>
-#include <boot/boot.h>
+#include <boot.h>
#include <linkage.h>
#include <mm.h>
#include <page.h>
printk("kmalloc addr %08x\n", (unsigned long) addr);
addrs[i] = addr;
}
-#endifq
+#endif
}