summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/arm64-desktop.make
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-01-02 21:10:13 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-01-02 21:10:13 +0100
commitcbfa3f14674713910077f024958d96fd31b4f36f (patch)
tree23a603a8ac25b8d7ff1305f80087222a9233aee2 /dev/Kernel/arm64-desktop.make
parente154cbf9a2a9eedd4c122d6619f25d29e04610ef (diff)
FIX: Fix scheduler for the task switch, separate desktop and mobile
targets. - Giving priority to aarch64 support. - The scheduler needed those fixes before proceeding to aarch64 support. - We use the register approach, which is correct here, the platform code will just take those records and execute them. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/arm64-desktop.make')
-rw-r--r--dev/Kernel/arm64-desktop.make64
1 files changed, 64 insertions, 0 deletions
diff --git a/dev/Kernel/arm64-desktop.make b/dev/Kernel/arm64-desktop.make
new file mode 100644
index 00000000..a899ae18
--- /dev/null
+++ b/dev/Kernel/arm64-desktop.make
@@ -0,0 +1,64 @@
+##################################################
+# (c) Theater Quality Corp, all rights reserved.
+# This is the microKernel makefile.
+##################################################
+
+CC = clang++
+LD = lld-link
+CCFLAGS = -fshort-wchar -c -ffreestanding -MMD -mno-red-zone -D__ZKA_ARM64__ -fno-rtti -fno-exceptions -I./ \
+ -target aarch64-unknown-windows \
+ -std=c++20 -O3 -D__MINOSKRNL__ -D__ZKA_MINIMAL_OS__ -D__ZKA_NO_BUILTIN__ -D__HAVE_ZKA_APIS__ -D__ZKA__ -I../
+
+ASM = clang++
+
+DISKDRIVER = -D__USE_FLASH_MEM__ -D__USE_SAS__ -D__USE_SATA__
+
+ifneq ($(DEBUG_SUPPORT), )
+DEBUG = -D__DEBUG__
+endif
+
+COPY = cp
+
+LDFLAGS = -subsystem:efi_application -entry:hal_init_platform /nodefaultlib
+LDOBJ = obj/*.obj
+
+# This file is the Kernel, responsible of task management and memory.
+KERNEL = minoskrnl.exe
+
+.PHONY: error
+error:
+ @echo "=== ERROR ==="
+ @echo "=> Use a specific target."
+
+MOVEALL=./MoveAll.ARM64.sh
+
+.PHONY: newos-arm64-epm
+newos-arm64-epm: clean
+ $(CC) $(CCFLAGS) $(DISKDRIVER) $(DEBUG) $(wildcard src/*.cc) \
+ $(wildcard src/FS/*.cc) $(wildcard HALKit/ARM64/Storage/*.cc) \
+ $(wildcard HALKit/ARM64/PCI/*.cc) $(wildcard src/Network/*.cc) $(wildcard src/Storage/*.cc) \
+ $(wildcard HALKit/ARM64/*.cc) $(wildcard HALKit/ARM64/*.cpp) \
+ $(wildcard HALKit/ARM64/*.s) $(wildcard HALKit/ARM64/APM/*.cc)
+
+ $(MOVEALL)
+
+OBJCOPY=x86_64-w64-mingw32-objcopy
+
+.PHONY: link-arm64-epm
+link-arm64-epm:
+ $(LD) $(LDFLAGS) $(LDOBJ) /out:$(KERNEL)
+
+.PHONY: all
+all: newos-arm64-epm link-arm64-epm
+ @echo "Kernel => OK."
+
+.PHONY: help
+help:
+ @echo "=== HELP ==="
+ @echo "all: Build Kernel and link it."
+ @echo "link-arm64-epm: Link Kernel for EPM based disks."
+ @echo "newos-arm64-epm: Build Kernel for EPM based disks."
+
+.PHONY: clean
+clean:
+ rm -f $(LDOBJ) $(wildcard *.o) $(KERNEL)