浏览代码

修复makefile的bug

fslongjin 2 年之前
父节点
当前提交
59e847294a
共有 7 个文件被更改,包括 42 次插入10 次删除
  1. 1 1
      kernel/Makefile
  2. 1 1
      kernel/common/Makefile
  3. 12 0
      kernel/driver/Makefile
  4. 8 0
      kernel/driver/video/Makefile
  5. 11 0
      kernel/driver/video/video.c
  6. 8 0
      kernel/driver/video/video.h
  7. 1 8
      kernel/mm/mm.c

+ 1 - 1
kernel/Makefile

@@ -18,7 +18,7 @@ LD_LIST := head.o
 OBJ_LIST := head.o
 
 
-kernel_subdirs := common/libELF
+kernel_subdirs := common driver
 	
 
 

+ 1 - 1
kernel/common/Makefile

@@ -7,6 +7,6 @@ all:
 	@list='$(kernel_common_subdirs)'; for subdir in $$list; do \
     		echo "make all in $$subdir";\
     		cd $$subdir;\
-    		$(MAKE) all CFLAGS="$(CFLAGS) -I";\
+    		$(MAKE) all CFLAGS="$(CFLAGS)";\
     		cd ..;\
 	done

+ 12 - 0
kernel/driver/Makefile

@@ -0,0 +1,12 @@
+
+CFLAGS += -I .
+
+kernel_driver_subdirs:=video
+
+all: 
+	@list='$(kernel_driver_subdirs)'; for subdir in $$list; do \
+    		echo "make all in $$subdir";\
+    		cd $$subdir;\
+    		$(MAKE) all CFLAGS="$(CFLAGS)";\
+    		cd ..;\
+	done

+ 8 - 0
kernel/driver/video/Makefile

@@ -0,0 +1,8 @@
+
+all: video.o
+
+CFLAGS += -I .
+
+
+video.o: video.c
+	gcc $(CFLAGS) -c video.c -o video.o

+ 11 - 0
kernel/driver/video/video.c

@@ -0,0 +1,11 @@
+#include "video.h"
+
+/**
+ * @brief 初始化显示模块
+ * 
+ * @return int 
+ */
+int video_init()
+{
+
+}

+ 8 - 0
kernel/driver/video/video.h

@@ -0,0 +1,8 @@
+#pragma once
+
+/**
+ * @brief 初始化显示模块
+ * 
+ * @return int 
+ */
+int video_init();

+ 1 - 8
kernel/mm/mm.c

@@ -230,14 +230,7 @@ void mm_init()
         --tmp_page->zone->count_pages_free;
     }
 
-    // root_page_table_phys_addr = global_CR3;
-    // kdebug("global_CR3\t:%#018lx", global_CR3);
-    // kdebug("*global_CR3\t:%#018lx", *phys_2_virt(global_CR3) & (~0xff));
-    // kdebug("**global_CR3\t:%#018lx", *phys_2_virt(*phys_2_virt(global_CR3) & (~0xff)) & (~0xff));
-
-    // kdebug("1.memory_management_struct.bmp:%#018lx\tzone->count_pages_using:%d\tzone_struct->count_pages_free:%d", *memory_management_struct.bmp, memory_management_struct.zones_struct->count_pages_using, memory_management_struct.zones_struct->count_pages_free);
-    // kinfo("Cleaning page table remapping at 0x0000");
-
+  
     kinfo("Memory management unit initialize complete!");
 
     flush_tlb();