Added config.h
This commit is contained in:
parent
aa6c578a3c
commit
c2391cee5d
@ -14,6 +14,10 @@ NASMFLAGS := -felf64
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -T$(MOON_DIR)/moon.ld -nostdlib -lgcc -Wl,--build-id=none -z max-page-size=0x1000
|
||||
|
||||
ifneq ($(MOON_BUILD_STABLE), 1)
|
||||
CFLAGS := ${CFLAGS} -D_MOON_SUFFIX="$(shell git rev-parse --short HEAD)"
|
||||
endif
|
||||
|
||||
rwildcard=$(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d))
|
||||
|
||||
CXX_SRC = $(call rwildcard,$(MOON_SRC),*.cpp)
|
||||
|
21
kernel/include/config.h
Normal file
21
kernel/include/config.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef STRINGIZE
|
||||
#define STRINGIZE(x) #x
|
||||
#endif
|
||||
|
||||
#ifndef STRINGIZE_VALUE_OF
|
||||
#define STRINGIZE_VALUE_OF(x) STRINGIZE(x)
|
||||
#endif
|
||||
|
||||
#ifndef MOON_MAJOR
|
||||
#define MOON_MAJOR 0
|
||||
#endif
|
||||
|
||||
#ifndef MOON_MINOR
|
||||
#define MOON_MINOR 1
|
||||
#endif
|
||||
|
||||
#ifndef _MOON_SUFFIX
|
||||
#define MOON_SUFFIX "stable"
|
||||
#else
|
||||
#define MOON_SUFFIX STRINGIZE_VALUE_OF(_MOON_SUFFIX)
|
||||
#endif
|
@ -3,6 +3,7 @@
|
||||
#include "acpi/RSDT.h"
|
||||
#include "assert.h"
|
||||
#include "bootboot.h"
|
||||
#include "config.h"
|
||||
#include "cpu/CPU.h"
|
||||
#include "debug.h"
|
||||
#include "gdt/GDT.h"
|
||||
@ -40,7 +41,7 @@ extern "C" void _start()
|
||||
Init::early_init();
|
||||
Debug::DebugStatus::the()->PassBootStage(Color::White);
|
||||
|
||||
kinfoln("Hello World!");
|
||||
kinfoln("Starting Moon %d.%d-%s", MOON_MAJOR, MOON_MINOR, MOON_SUFFIX);
|
||||
|
||||
Debug::DebugStatus::the()->StartBootStage(Color::Gray);
|
||||
GDT::load();
|
||||
@ -142,8 +143,8 @@ extern "C" void _start()
|
||||
|
||||
KernelMemoryManager::release_unaligned_mapping(rootSDT);
|
||||
|
||||
/*sleep(2500);
|
||||
shutdown();*/
|
||||
sleep(2500);
|
||||
shutdown();
|
||||
|
||||
while (1) halt();
|
||||
loop:
|
||||
|
Loading…
Reference in New Issue
Block a user