summaryrefslogtreecommitdiffhomepage
path: root/Boot/Sources
diff options
context:
space:
mode:
authorAmlal <amlal@zka.com>2024-07-12 01:03:21 +0200
committerAmlal <amlal@zka.com>2024-07-12 01:03:21 +0200
commita268a7d3551523fb82b1495808f3ea2516b6fdaa (patch)
tree0a7fab583aafca52bccf5bac143517f559b3a247 /Boot/Sources
parent0a076b2bcc21d4fc94b83569e1b5198f9e4acd0b (diff)
[IMP && FIX] Various patches and implementations.
Most importantly: - JSON parser. Signed-off-by: Amlal <amlal@zka.com>
Diffstat (limited to 'Boot/Sources')
-rw-r--r--Boot/Sources/HEL/AMD64/BootMain.cxx14
-rw-r--r--Boot/Sources/HEL/AMD64/compile_flags.txt2
-rw-r--r--Boot/Sources/Root/ZETA/fonts.json4
-rw-r--r--Boot/Sources/Root/bootloader.json4
-rw-r--r--Boot/Sources/compile_flags.txt2
5 files changed, 16 insertions, 10 deletions
diff --git a/Boot/Sources/HEL/AMD64/BootMain.cxx b/Boot/Sources/HEL/AMD64/BootMain.cxx
index 7faa12eb..5425f1e1 100644
--- a/Boot/Sources/HEL/AMD64/BootMain.cxx
+++ b/Boot/Sources/HEL/AMD64/BootMain.cxx
@@ -4,6 +4,7 @@
------------------------------------------- */
+#include "NewKit/Json.hxx"
#include <BootKit/BootKit.hxx>
#include <BootKit/Rsrc/NewBoot.rsrc>
#include <Modules/CoreCG/CoreCG.hxx>
@@ -18,10 +19,7 @@
#include <BootKit/ProgramLoader.hxx>
#include <cstring>
-#include <BootKit/Vendor/Support.hxx>
-#include <BootKit/STB.hxx>
-
-/// make the compiler shut up.
+// make the compiler shut up.
#ifndef kMachineModel
#define kMachineModel "Zeta SSD"
#endif // !kMachineModel
@@ -228,7 +226,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
diskFormatter.Format(kMachineModel, &rootDesc, 1);
}
-#ifdef __NEWOS_CAN_PATCH__
+#ifdef __NEWOS_OTA__
BFileReader readerKernel(L"newoskrnl.exe", ImageHandle);
@@ -244,7 +242,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
loader->SetName("'newoskrnl.exe'");
}
-#endif // ifdef __NEWOS_CAN_PATCH__
+#endif // ifdef __NEWOS_OTA__
EFI::ExitBootServices(*MapKey, ImageHandle);
@@ -252,11 +250,11 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
// Fallback to builtin kernel.
//
// ---------------------------------------------------- //
-#ifdef __NEWOS_CAN_PATCH__
+#ifdef __NEWOS_OTA__
if (loader)
loader->Start(handoverHdrPtr);
-#endif // ifdef __NEWOS_CAN_PATCH__
+#endif // ifdef __NEWOS_OTA__
hal_init_platform(handoverHdrPtr);
diff --git a/Boot/Sources/HEL/AMD64/compile_flags.txt b/Boot/Sources/HEL/AMD64/compile_flags.txt
index d7a2b538..c24c4b09 100644
--- a/Boot/Sources/HEL/AMD64/compile_flags.txt
+++ b/Boot/Sources/HEL/AMD64/compile_flags.txt
@@ -4,4 +4,4 @@
-D__NEWOS_AMD64__
-std=c++20
-D__x86_64__
--D__NEWOS_CAN_PATCH__
+-D__NEWOS_OTA__
diff --git a/Boot/Sources/Root/ZETA/fonts.json b/Boot/Sources/Root/ZETA/fonts.json
new file mode 100644
index 00000000..de0425a1
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/fonts.json
@@ -0,0 +1,4 @@
+{
+ "font_ext": ".ttf",
+ "src_dir": "ZETA"
+}
diff --git a/Boot/Sources/Root/bootloader.json b/Boot/Sources/Root/bootloader.json
new file mode 100644
index 00000000..e8bc99fd
--- /dev/null
+++ b/Boot/Sources/Root/bootloader.json
@@ -0,0 +1,4 @@
+{
+ "newoskrnl.exe": "kernel",
+ "ZETA/fonts.json": "rsrc"
+}
diff --git a/Boot/Sources/compile_flags.txt b/Boot/Sources/compile_flags.txt
index b42b9a4f..f9ca281f 100644
--- a/Boot/Sources/compile_flags.txt
+++ b/Boot/Sources/compile_flags.txt
@@ -5,4 +5,4 @@
-D__NEWOS_AMD64__
-std=c++20
-D__x86_64__
--D__NEWOS_CAN_PATCH__
+-D__NEWOS_OTA__