diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-11-14 14:12:34 +0100 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-11-14 14:12:34 +0100 |
| commit | cef5bfb8913d69c2d3367ade93c29f5e7f283f45 (patch) | |
| tree | f85095cab70187ed54f5feda4b4fc208f775edd0 /boot2 | |
| parent | a9e8cb8535044f24e34e26b9890854b1ae7409bf (diff) | |
use kernel/config.h to control VESA swtich in asm
Diffstat (limited to 'boot2')
| -rw-r--r-- | boot2/Makefile | 10 | ||||
| -rw-r--r-- | boot2/stage2.asm | 9 |
2 files changed, 16 insertions, 3 deletions
diff --git a/boot2/Makefile b/boot2/Makefile index 25a9a2e..76e9605 100644 --- a/boot2/Makefile +++ b/boot2/Makefile @@ -6,16 +6,22 @@ include ../Makefile.common STAGE2=stage2.bin MP=mp.bin +CONFIG=config.inc + + ASM_SOURCES=$(wildcard *.asm) all: $(STAGE2) $(MP) -$(STAGE2): $(ASM_SOURCES) +$(CONFIG): ../kernel/config.h + cat ../kernel/config.h | grep "^#define" | sed "s/#/%/" | sed "s/\/\/.*//" > $@ + +$(STAGE2): $(ASM_SOURCES) $(CONFIG) $(MP): $(ASM_SOURCES) clean: - -rm $(STAGE2) $(MP) + -rm $(STAGE2) $(MP) $(CONFIG) diff --git a/boot2/stage2.asm b/boot2/stage2.asm index 0a3ee87..ad1e4ea 100644 --- a/boot2/stage2.asm +++ b/boot2/stage2.asm @@ -70,6 +70,9 @@ MEMMAP_INFO: STR_PM: db "PROTECTED MODE",0 +; kernel config +%include "config.inc" + ; ;;lets put our temporary GDT (Global Descriptor Table) here ;;kernel should move this away @@ -144,7 +147,11 @@ kernel_load: mov ax,[KERNEL_CHUNK] cmp ax,0x5 jne skip_vesa_init -; call VesaSetup + + %ifndef FOOLOS_CONSOLE + call VesaSetup + %endif + skip_vesa_init: call switch_to_pm |
