mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
kernel: build.h
This commit is contained in:
@@ -28,8 +28,11 @@ The build process only needs xorriso, curl and bsdtar on the host. All other nee
|
||||
To build the project, run ``make``. This will create a file named ``astral.iso``
|
||||
|
||||
## Running
|
||||
You can download the latest release from github and run it in the virtual machine of your liking.
|
||||
For QEMU the following command is recommended:
|
||||
``qemu-system-x86_64 -enable-kvm -M q35 -m 2g -cdrom astral.iso``
|
||||
|
||||
There are a few targets in the makefile to run Astral with qemu:
|
||||
There are a few targets in the makefile to run Astral with qemu when built from source:
|
||||
|
||||
``make run``
|
||||
|
||||
|
||||
@@ -14,6 +14,16 @@ KERNELCONFIG=#-DX86_64_ENABLE_E9 -DSYSCALL_LOGGING
|
||||
CFLAGS=-g -ffreestanding -mcmodel=kernel -O2 -mno-red-zone -mgeneral-regs-only -mno-mmx -mno-sse -mno-sse2 -nostdlib -Wall -I "${INCDIR}" -I "$(ARCHINCDIR)" -I "$(FLANTERMINCDIR)" $(PRINTFOPTS) $(KERNELCONFIG)
|
||||
ASFLAGS=-felf64
|
||||
|
||||
.PHONY: all
|
||||
all:
|
||||
# build build.h file
|
||||
echo "#ifndef _BUILD_H" > include/build.h
|
||||
echo "#define _BUILD_H" >> include/build.h
|
||||
echo " #define BUILD_DATE \"$(shell date -u)\"" >> include/build.h
|
||||
echo " #define BUILD_TARGET \"$(TARGET)\"" >> include/build.h
|
||||
echo "#endif" >> include/build.h
|
||||
make astral
|
||||
|
||||
astral: $(OBJS)
|
||||
@echo [LD] $@
|
||||
@$(LD) $(LDFLAGS) -o $@ $^
|
||||
|
||||
Reference in New Issue
Block a user