summaryrefslogtreecommitdiffhomepage
path: root/dev/ZBAKit/Modules/SysChk
diff options
context:
space:
mode:
authorAmlal <amlal.elmahrouss@icloud.com>2024-10-28 07:01:58 +0100
committerAmlal <amlal.elmahrouss@icloud.com>2024-10-28 07:01:58 +0100
commite0024d9ea688ee91a77abc0e28c5ea24b13ca67d (patch)
treea4e29bd919cbeccf2689e81a5d52bfc02f2a8b77 /dev/ZBAKit/Modules/SysChk
parent36a3600ff7fc65a63b7386b7a680dbe8e647bd8f (diff)
IMP: Refactor whole source code to make it even.
- That is because previously the source was both in lowercase and lettercase. Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZBAKit/Modules/SysChk')
-rw-r--r--dev/ZBAKit/Modules/SysChk/.hgkeep0
-rw-r--r--dev/ZBAKit/Modules/SysChk/Boot.S20
-rw-r--r--dev/ZBAKit/Modules/SysChk/Module.cc22
-rw-r--r--dev/ZBAKit/Modules/SysChk/build.json25
4 files changed, 67 insertions, 0 deletions
diff --git a/dev/ZBAKit/Modules/SysChk/.hgkeep b/dev/ZBAKit/Modules/SysChk/.hgkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/ZBAKit/Modules/SysChk/.hgkeep
diff --git a/dev/ZBAKit/Modules/SysChk/Boot.S b/dev/ZBAKit/Modules/SysChk/Boot.S
new file mode 100644
index 00000000..4554b9e3
--- /dev/null
+++ b/dev/ZBAKit/Modules/SysChk/Boot.S
@@ -0,0 +1,20 @@
+;; /*
+;; * ========================================================
+;; *
+;; * ZKA
+;; * Copyright ZKA Web Services Co., all rights reserved.
+;; *
+;; * ========================================================
+;; */
+
+.code64
+.intel_syntax noprefix
+
+#define kTypeDriver 101
+#define kArchAmd64 122
+#define kHandoverMagic 0xBADCC
+
+.section .ldr
+
+.quad kHandoverMagic
+.word kTypeDriver
diff --git a/dev/ZBAKit/Modules/SysChk/Module.cc b/dev/ZBAKit/Modules/SysChk/Module.cc
new file mode 100644
index 00000000..74f7c661
--- /dev/null
+++ b/dev/ZBAKit/Modules/SysChk/Module.cc
@@ -0,0 +1,22 @@
+/*
+ * ========================================================
+ *
+ * NetBoot
+ * Copyright ZKA Web Services Co., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#include <BootKit/BootKit.h>
+
+EXTERN_C Int32 ModuleMain(Kernel::HEL::HANDOVER_INFO_HEADER* Handover)
+{
+ EfiSystemTable* cST = (EfiSystemTable*)Handover->f_FirmwareCustomTables[1];
+
+ cST->ConOut->ClearScreen(cST->ConOut);
+
+ cST->ConOut->OutputString(cST->ConOut, L"SYSCHK: CHECKING FOR VALID NEFS OR HPFS PARTITIONS...\r\n");
+ cST->ConOut->OutputString(cST->ConOut, L"SYSCHK: GOOD TO GO!\r\n");
+
+ return kEfiOk;
+}
diff --git a/dev/ZBAKit/Modules/SysChk/build.json b/dev/ZBAKit/Modules/SysChk/build.json
new file mode 100644
index 00000000..299b0acf
--- /dev/null
+++ b/dev/ZBAKit/Modules/SysChk/build.json
@@ -0,0 +1,25 @@
+{
+ "compiler_path": "x86_64-w64-mingw32-g++",
+ "compiler_std": "c++20",
+ "headers_path": ["../", "../../", "../../../zka", "../../../", "./"],
+ "sources_path": ["*.cc", "*.S"],
+ "output_name": "syschk.sys",
+ "compiler_flags": [
+ "-ffreestanding",
+ "-nostdlib",
+ "-std=c++20",
+ "-fPIC",
+ "-fno-rtti",
+ "-fno-exceptions",
+ "-Wl,--subsystem=17,--image-base,0x10000000,-e,ModuleMain"
+ ],
+ "cpp_macros": [
+ "__NEWOSKRNL__",
+ "__NEWOSLDR__",
+ "__ZKA_AMD64__",
+ "__BOOTSCR__",
+ "cSCRVersionHighest=0x0100",
+ "cSCRVersionLowest=0x0100",
+ "cSCRVersion=0x0100"
+ ]
+}