summaryrefslogtreecommitdiffhomepage
path: root/Boot/Modules/NetBoot
diff options
context:
space:
mode:
authorAmlal <amlal@zka.com>2024-07-14 00:37:06 +0200
committerAmlal <amlal@zka.com>2024-07-14 00:37:06 +0200
commitb038c3eff8c80be2e6e10bea16634523fff4a6b5 (patch)
treed4c9b5c1931d6e5029243446b66e8edb608072b8 /Boot/Modules/NetBoot
parent062ba0a060929c18a2734835cd426e3d808093b7 (diff)
[IMP]
- IsUndefined returns const bool& now. - Replace kUndefined with kNull now. - Remove ML_ from macros in newstd.hxx. - Rename NSyscall to NSyscallInterface, which is a ref counted class now. - Rename MBCIType to PowerID - Update ToDos. - Update NewFS root catalog name. - Fix JSON 'null' initialization. - Add Json to variant object. - Replace kPointer with kBlob in variant kinds. - Add Leak() method to variant. Signed-off-by: Amlal <amlal@zka.com>
Diffstat (limited to 'Boot/Modules/NetBoot')
-rw-r--r--Boot/Modules/NetBoot/.hgkeep0
-rw-r--r--Boot/Modules/NetBoot/Module.cxx20
-rw-r--r--Boot/Modules/NetBoot/NetBoot.hxx26
-rw-r--r--Boot/Modules/NetBoot/compile_flags.txt8
-rw-r--r--Boot/Modules/NetBoot/manifest.json4
5 files changed, 58 insertions, 0 deletions
diff --git a/Boot/Modules/NetBoot/.hgkeep b/Boot/Modules/NetBoot/.hgkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/Boot/Modules/NetBoot/.hgkeep
diff --git a/Boot/Modules/NetBoot/Module.cxx b/Boot/Modules/NetBoot/Module.cxx
new file mode 100644
index 00000000..3bc71d0e
--- /dev/null
+++ b/Boot/Modules/NetBoot/Module.cxx
@@ -0,0 +1,20 @@
+/*
+ * ========================================================
+ *
+ * NetBoot
+ * Copyright ZKA Technologies, all rights reserved.
+ *
+ * ========================================================
+ */
+
+#include <BootKit/BootKit.hxx>
+#include <NetBoot/NetBoot.hxx>
+
+EXTERN_C Int32 ModuleMain(Void)
+{
+ /// - Find a network drive called "/Remote/newoskrnl"
+ /// - Download our image
+ /// - Boot from it.
+
+ return kEfiOk;
+}
diff --git a/Boot/Modules/NetBoot/NetBoot.hxx b/Boot/Modules/NetBoot/NetBoot.hxx
new file mode 100644
index 00000000..1a474501
--- /dev/null
+++ b/Boot/Modules/NetBoot/NetBoot.hxx
@@ -0,0 +1,26 @@
+/*
+ * ========================================================
+ *
+ * NetBoot
+ * Copyright ZKA Technologies, all rights reserved.
+ *
+ * ========================================================
+ */
+
+#pragma once
+
+#include <NewKit/Defines.hpp>
+
+/// @brief the internet header is used to download updates OTA.
+typedef struct NetBootInternetHeader
+{
+ Kernel::Char NB1; /// magic char 1 'N'
+ Kernel::Char NB2; /// magic char 2 'E'
+ Kernel::Char NB3; /// magic char 3 'T'
+ Kernel::Char NB4; /// magic char 4 'B'
+
+ Kernel::Char PatchName[255]; /// example: ColdChoco
+ Kernel::Int32 PatchLength; /// the patch length.
+ Kernel::Char PatchTarget[255]; /// the target file.
+ Kernel::Boolean ImpliesROM; /// does it imply an EEPROM reprogram?
+} NetBootInternetHeader;
diff --git a/Boot/Modules/NetBoot/compile_flags.txt b/Boot/Modules/NetBoot/compile_flags.txt
new file mode 100644
index 00000000..f9ca281f
--- /dev/null
+++ b/Boot/Modules/NetBoot/compile_flags.txt
@@ -0,0 +1,8 @@
+-std=c++20
+-I../
+-I../../
+-I../../Kernel
+-D__NEWOS_AMD64__
+-std=c++20
+-D__x86_64__
+-D__NEWOS_OTA__
diff --git a/Boot/Modules/NetBoot/manifest.json b/Boot/Modules/NetBoot/manifest.json
new file mode 100644
index 00000000..5f94c677
--- /dev/null
+++ b/Boot/Modules/NetBoot/manifest.json
@@ -0,0 +1,4 @@
+{
+ "pluginName": "iBoot",
+ "description": "OTA updates."
+}