summaryrefslogtreecommitdiffhomepage
path: root/dev/ZBA/Modules/BootScr
diff options
context:
space:
mode:
Diffstat (limited to 'dev/ZBA/Modules/BootScr')
-rw-r--r--dev/ZBA/Modules/BootScr/Boot.S28
-rw-r--r--dev/ZBA/Modules/BootScr/Module.cxx6
-rw-r--r--dev/ZBA/Modules/BootScr/build.json25
-rw-r--r--dev/ZBA/Modules/BootScr/compile_flags.txt2
4 files changed, 55 insertions, 6 deletions
diff --git a/dev/ZBA/Modules/BootScr/Boot.S b/dev/ZBA/Modules/BootScr/Boot.S
new file mode 100644
index 00000000..ce9f36b1
--- /dev/null
+++ b/dev/ZBA/Modules/BootScr/Boot.S
@@ -0,0 +1,28 @@
+;; /*
+;; * ========================================================
+;; *
+;; * ZKA
+;; * Copyright ZKA Technologies., all rights reserved.
+;; *
+;; * ========================================================
+;; */
+
+.code64
+.intel_syntax noprefix
+
+#define kTypeDriver 101
+#define kArchAmd64 122
+#define kHandoverMagic 0xBADCC
+
+.section .ldr
+
+.quad kHandoverMagic
+.word kTypeDriver
+
+.text
+
+.extern main
+.global __main
+
+__main:
+ ret
diff --git a/dev/ZBA/Modules/BootScr/Module.cxx b/dev/ZBA/Modules/BootScr/Module.cxx
index 11bbb6c0..15758599 100644
--- a/dev/ZBA/Modules/BootScr/Module.cxx
+++ b/dev/ZBA/Modules/BootScr/Module.cxx
@@ -9,11 +9,7 @@
#include <BootKit/BootKit.hxx>
-EXTERN EfiSystemTable* ST;
-
-EXTERN_C Int32 ModuleMain(Void)
+EXTERN_C Int32 main(Kernel::HEL::HandoverInformationHeader* Handover)
{
- ST->ConOut->ClearScreen(ST->ConOut);
-
return kEfiOk;
}
diff --git a/dev/ZBA/Modules/BootScr/build.json b/dev/ZBA/Modules/BootScr/build.json
new file mode 100644
index 00000000..c53c6faa
--- /dev/null
+++ b/dev/ZBA/Modules/BootScr/build.json
@@ -0,0 +1,25 @@
+{
+ "compiler_path": "x86_64-w64-mingw32-g++",
+ "compiler_std": "c++20",
+ "headers_path": ["../", "../../", "../../../ZKA", "../../../", "./"],
+ "sources_path": ["*.cxx", "*.S"],
+ "output_name": "bootscr.sys",
+ "compiler_flags": [
+ "-ffreestanding",
+ "-nostdlib",
+ "-std=c++20",
+ "-fPIC",
+ "-fno-rtti",
+ "-fno-exceptions",
+ "-Wl,--subsystem=17,--image-base 0x10000000"
+ ],
+ "cpp_macros": [
+ "__NEWOSKRNL__",
+ "__NEWOSLDR__",
+ "__ZKA_AMD64__",
+ "__BOOTSCR__",
+ "cSCRVersionHighest=0x0100",
+ "cSCRVersionLowest=0x0100",
+ "cSCRVersion=0x0100"
+ ]
+}
diff --git a/dev/ZBA/Modules/BootScr/compile_flags.txt b/dev/ZBA/Modules/BootScr/compile_flags.txt
index f9ca281f..18bc8512 100644
--- a/dev/ZBA/Modules/BootScr/compile_flags.txt
+++ b/dev/ZBA/Modules/BootScr/compile_flags.txt
@@ -2,7 +2,7 @@
-I../
-I../../
-I../../Kernel
--D__NEWOS_AMD64__
+-D__ZKA_AMD64__
-std=c++20
-D__x86_64__
-D__NEWOS_OTA__