summaryrefslogtreecommitdiffhomepage
path: root/dev
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-01-10 10:42:25 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-01-10 10:42:25 +0100
commit6b63380f5f45891c5c27715cb290037d072ad212 (patch)
tree8281fc7954b12be8103c77dcc1112c0ac9958ee2 /dev
parent54c1aa5e497be0f6fc1b6fe8ee759ac1c874714d (diff)
ADD: NetBoot specs revision and patches.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev')
-rw-r--r--dev/Boot/Mod/NetBoot/NetBoot.cc (renamed from dev/Boot/Mod/NetBoot/Module.cc)8
-rw-r--r--dev/Boot/Mod/NetBoot/NetBoot.h9
-rw-r--r--dev/Kernel/FirmwareKit/CoreBoot/NetBoot.h16
3 files changed, 28 insertions, 5 deletions
diff --git a/dev/Boot/Mod/NetBoot/Module.cc b/dev/Boot/Mod/NetBoot/NetBoot.cc
index b7f029f6..a0b12e99 100644
--- a/dev/Boot/Mod/NetBoot/Module.cc
+++ b/dev/Boot/Mod/NetBoot/NetBoot.cc
@@ -7,10 +7,14 @@
* ========================================================
*/
-#include <NetBoot.h>
+#include <Mod/NetBoot/NetBoot.h>
#include <BootKit/BootKit.h>
-EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* Handover)
+EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* handover)
{
+#ifdef __ZKA_AMD64__
+ return kEfiFail;
+#else
return kEfiOk;
+#endif
}
diff --git a/dev/Boot/Mod/NetBoot/NetBoot.h b/dev/Boot/Mod/NetBoot/NetBoot.h
index 9b7c3c3d..c8896001 100644
--- a/dev/Boot/Mod/NetBoot/NetBoot.h
+++ b/dev/Boot/Mod/NetBoot/NetBoot.h
@@ -2,7 +2,7 @@
* ========================================================
*
* NetBoot
- * Copyright (C) 2024, Theater Quality Corp, all rights reserved., all rights reserved.
+ * Copyright (C) 2024-2025, Theater Quality Corp, all rights reserved., all rights reserved.
*
* ========================================================
*/
@@ -11,6 +11,9 @@
#include <NewKit/Defines.h>
+#define kNetBootINetMagic "NETB"
+#define kNetBootINetMagicLength 4
+
/// @brief the internet header is used to download updates OTA.
typedef struct NetBootInternetHeader
{
@@ -19,8 +22,10 @@ typedef struct NetBootInternetHeader
Kernel::Char NB3; /// magic char 3 'T'
Kernel::Char NB4; /// magic char 4 'B'
- Kernel::Char PatchName[255]; /// example: ColdChoco
+ Kernel::Char PatchName[255]; /// example: Modjo
Kernel::Int32 PatchLength; /// the patch length.
Kernel::Char PatchTarget[255]; /// the target file.
Kernel::Boolean ImpliesROM; /// does it imply an EEPROM reprogram?
+ Kernel::Boolean Preflight; /// is it a preflight packet.
+ Kernel::Char Data[]; /// non preflight packet has a patch blob for a **PatchTarget**
} NetBootInternetHeader;
diff --git a/dev/Kernel/FirmwareKit/CoreBoot/NetBoot.h b/dev/Kernel/FirmwareKit/CoreBoot/NetBoot.h
index afcd0ef2..6edb4158 100644
--- a/dev/Kernel/FirmwareKit/CoreBoot/NetBoot.h
+++ b/dev/Kernel/FirmwareKit/CoreBoot/NetBoot.h
@@ -8,4 +8,18 @@
#include <NewKit/Defines.h>
-#include <Mod/NetBoot/NetBoot.h> \ No newline at end of file
+/// @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?
+ Kernel::Boolean Preflight; /// is it a preflight packet.
+ Kernel::Char Patch[]; /// non preflight packet has a patch blob for a **PatchTarget**
+} NetBootInternetHeader;