Stivale Bare Bones: Difference between revisions
[unchecked revision] | [unchecked revision] |
Content deleted Content added
m Reverted edits by Stivalisti0italiani (talk) to last revision by Xenos1 |
Misc updates to bring up to par with Limine Bare Bones |
||
Line 187:
PHDRS
{
text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; /* Execute + Read */
rodata PT_LOAD FLAGS((1 << 2)) ; /* Read only */
Line 245 ⟶ 244:
# Change as needed.
override KERNEL := myos.elf
# Convenience macro to reliably declare overridable command variables.
define DEFAULT_VAR =
override $(1) := $(2)
endif▼
override $(1) := $(2)
endif▼
endef
# It is highly recommended to use a custom built cross toolchain to build a kernel.
# We are only using "cc" as a placeholder here. It may work by using
# the host system's toolchain, but this is not guaranteed.
$(eval $(call DEFAULT_VAR,CC,cc))
▲ifeq ($(origin CC), default)
▲endif
▲ifeq ($(origin LD), default)
▲endif
# User controllable CFLAGS.
Line 266 ⟶ 267:
# Internal C flags that should not be changed by the user.
override INTERNALCFLAGS :=
-mno-red-zone \
-MMD▼
-mcmodel=kernel \
# Internal linker flags that should not be changed by the user.
override INTERNALLDFLAGS :=
-Wl,Tlinker.ld \
# Use find to glob all *.c files in the directory and extract the object names.
Line 300 ⟶ 303:
# Link rules for the final kernel executable.
$(KERNEL): $(OBJ)
$(
# Compilation rules for *.c files.
Line 392 ⟶ 395:
# Download the latest Limine binary release.
git clone https://github.com/limine-bootloader/limine.git --branch=
# Build limine-install.
|