修复makefile的bug

This commit is contained in:
fslongjin 2022-05-18 21:13:23 +08:00
parent 8d8fd391fb
commit 59e847294a
7 changed files with 42 additions and 10 deletions

View File

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

View File

@ -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
kernel/driver/Makefile Normal file
View File

@ -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

View File

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

View File

@ -0,0 +1,11 @@
#include "video.h"
/**
* @brief
*
* @return int
*/
int video_init()
{
}

View File

@ -0,0 +1,8 @@
#pragma once
/**
* @brief
*
* @return int
*/
int video_init();

View File

@ -230,13 +230,6 @@ 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!");