-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfig.mk
More file actions
85 lines (68 loc) · 2.5 KB
/
config.mk
File metadata and controls
85 lines (68 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#
# Stellux Kernel Configuration
#
# Common configuration shared across all architectures.
# Architecture-specific flags are in kernel/arch/<arch>/defconfig.
#
# Override at build time: make kernel ARCH=x86_64 RELEASE=1 LOG_LEVEL=2
#
# ============================================================================
# Build Mode
# ============================================================================
# Set to 1 for release build, 0 for debug (default)
# Can be overridden from command line: make RELEASE=1
RELEASE ?= 0
# ============================================================================
# Toolchain
# ============================================================================
CXX := clang++
AS := clang
LD := ld.lld
OBJCOPY := llvm-objcopy
# ============================================================================
# Debug Flags
# ============================================================================
CXXFLAGS_DEBUG := \
-O0 \
-g \
-DDEBUG \
-fno-omit-frame-pointer
# ============================================================================
# Release Flags
# ============================================================================
CXXFLAGS_RELEASE := \
-O2 \
-DNDEBUG \
-fno-omit-frame-pointer
# ============================================================================
# Build Mode Selection
# ============================================================================
# Select debug/release mode (0=debug, 1=release)
ifeq ($(RELEASE),1)
CXXFLAGS_MODE := $(CXXFLAGS_RELEASE)
MODE_NAME := release
else
CXXFLAGS_MODE := $(CXXFLAGS_DEBUG)
MODE_NAME := debug
endif
# ============================================================================
# Kernel Configuration
# ============================================================================
# Kernel version string
STLX_VERSION ?= 3.0.1
# Maximum number of CPUs supported
MAX_CPUS ?= 64
# Log level (0=debug, 1=info, 2=warn, 3=error, 4=fatal, 5=none)
LOG_LEVEL ?= 0
# Build epoch (Unix timestamp for RTC fallback on platforms without hardware RTC)
STLX_BUILD_EPOCH ?= $(shell date +%s)
# ============================================================================
# Platform Selection
# ============================================================================
# Target platform (affects hardware addresses, clock rates, etc.)
# Override at build time: make ARCH=aarch64 PLATFORM=rpi4
#
# Supported platforms:
# qemu-virt - QEMU virt machine (default for aarch64)
# rpi4 - Raspberry Pi 4 (BCM2711)
PLATFORM ?= qemu-virt