Updated config

This commit is contained in:
2024-09-09 11:17:57 +02:00
parent af1d9d6da7
commit 597e82e78f
4 changed files with 41 additions and 20 deletions
+13 -13
View File
@@ -1,20 +1,20 @@
# Variables # Variables
CC = i686-elf-gcc CC := i686-elf-gcc
LD = i686-elf-ld LD := i686-elf-ld
AS = nasm AS := nasm
CFLAGS = -std=c17 -ffreestanding -fno-builtin -fno-stack-protector -fno-pie \ CFLAGS := -g -std=c17 -ffreestanding -fno-builtin -fno-stack-protector -fno-pie \
-Os -nostdinc -mgeneral-regs-only -m32 -march=i386 -Wall -Iinclude/c -Os -nostdinc -mgeneral-regs-only -m32 -march=i386 -Wall -Iinclude/c
LDFLAGS = -z notext -melf_i386 LDFLAGS := -z notext -melf_i386 -nostdlib
ASFLAGS = ASFLAGS :=
SRC = ./src
BIN = ./bin
C_FILES = calc edit
FONTS = testfont term16n
include make.config include make.config
SRC := ./src
BIN := ./bin
C_FILES := calc edit
FONTS := testfont term16n
.PHONY: os clean run .PHONY: os clean run
# Main compilation target # Main compilation target
@@ -30,9 +30,9 @@ $(BIN):
# Bootloader: This target is responsible for creating stage?.bin (1,2,3) # Bootloader: This target is responsible for creating stage?.bin (1,2,3)
bootloader: $(SRC)/stage1.asm $(SRC)/stage2.asm bootloader: $(SRC)/stage1.asm $(SRC)/stage2.asm
@echo "Assembling $(SRC)/stage1.asm..." @echo "Assembling $(SRC)/stage1.asm..."
@$(AS) $(ASFLAGS) -fbin -o $(BIN)/stage1.bin $(SRC)/stage1.asm @$(AS) -fbin -o $(BIN)/stage1.bin $(SRC)/stage1.asm $(ASFLAGS)
@echo "Assembling $(SRC)/stage2.asm..." @echo "Assembling $(SRC)/stage2.asm..."
@$(AS) $(ASFLAGS) -fbin -o $(BIN)/stage2.bin $(SRC)/stage2.asm @$(AS) -fbin -o $(BIN)/stage2.bin $(SRC)/stage2.asm $(ASFLAGS)
@echo "Compiling $(SRC)/stage3.c..." @echo "Compiling $(SRC)/stage3.c..."
@$(CC) $(CFLAGS) -Iinclude -o $(BIN)/stage3.o -c $(SRC)/stage3.c @$(CC) $(CFLAGS) -Iinclude -o $(BIN)/stage3.o -c $(SRC)/stage3.c
@$(LD) $(LDFLAGS) -T$(SRC)/stage3.ld --oformat binary -o $(BIN)/stage3.bin $(BIN)/stage3.o @$(LD) $(LDFLAGS) -T$(SRC)/stage3.ld --oformat binary -o $(BIN)/stage3.bin $(BIN)/stage3.o
BIN
View File
Binary file not shown.
+9 -2
View File
@@ -1,2 +1,9 @@
# Use a default resolution of 1920x1080 32bpp # Kern Config
# ASFLAGS := $(ASFLAGS) -DDEF_RES # Uncomment a line to enable it
# You may also change values
#ASFLAGS := $(ASFLAGS) -D DEF_RES # Use default resolution variables
ASFLAGS := $(ASFLAGS) -D DEF_W=1920 # Default width
ASFLAGS := $(ASFLAGS) -D DEF_H=1080 # Default height
ASFLAGS := $(ASFLAGS) -D DEF_BPP=32 # Default bpp
+19 -5
View File
@@ -368,12 +368,26 @@ CODE_SEG equ GDT.codeDescriptor - GDT.start
DATA_SEG equ GDT.dataDescriptor - GDT.start DATA_SEG equ GDT.dataDescriptor - GDT.start
;; VBE Stuff ;; VBE Stuff
;; XXX IF YOU WANT TO SELECT ANY VALUE IN THE SETUP, SET THESE TO ZERO XXX ; Default width
%ifdef DEF_RES %ifndef DEF_W
width: dw 1920 %define DEF_W 0
%endif %endif
height: dw 1080 ; Default height
bpp: db 32 %ifndef DEF_H
%define DEF_H 0
%endif
; Default bpp
%ifndef DEF_BPP
%define DEF_BPP 0
%endif
; Use defaults
%ifdef DEF_RES
width: dw DEF_W
%else
width: dw 0
%endif
height: dw DEF_H
bpp: db DEF_BPP
offset: dw 0 offset: dw 0
_segment: dw 0 ; segment is a keyword _segment: dw 0 ; segment is a keyword