summaryrefslogtreecommitdiffhomepage
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/boot/modules/BootNet/BootNet.cc4
-rw-r--r--dev/boot/modules/BootNet/BootNet.h10
-rw-r--r--dev/boot/modules/BootNet/amd64.json6
-rw-r--r--dev/kernel/FirmwareKit/CoreBoot/BootNet.h30
-rw-r--r--dev/kernel/FirmwareKit/CoreBoot/NetBoot.h25
5 files changed, 40 insertions, 35 deletions
diff --git a/dev/boot/modules/BootNet/BootNet.cc b/dev/boot/modules/BootNet/BootNet.cc
index e6c3d3e4..1129ef30 100644
--- a/dev/boot/modules/BootNet/BootNet.cc
+++ b/dev/boot/modules/BootNet/BootNet.cc
@@ -22,7 +22,7 @@ EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* handover)
if (inet.Length < 1)
{
Boot::BootTextWriter writer;
- writer.Write("NetBootLauncher: No executable attached to the packet, aborting.\r");
+ writer.Write("BootNetLauncher: No executable attached to the packet, aborting.\r");
return kEfiFail;
}
@@ -39,7 +39,7 @@ EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* handover)
else
{
Boot::BootTextWriter writer;
- writer.Write("NetBootLauncher: EEPROM flash is not available as of right now.\r");
+ writer.Write("BootNetLauncher: EEPROM flash is not available as of right now.\r");
/// TODO: Program new firmware to EEPROM (if crc and size matches)
diff --git a/dev/boot/modules/BootNet/BootNet.h b/dev/boot/modules/BootNet/BootNet.h
index 992cc7c3..2bf330df 100644
--- a/dev/boot/modules/BootNet/BootNet.h
+++ b/dev/boot/modules/BootNet/BootNet.h
@@ -11,10 +11,10 @@
#include <NewKit/Defines.h>
-#define kNetBootINetMagic "NETB"
-#define kNetBootINetMagicLength (4)
+#define kBootNetINetMagic "NETB"
+#define kBootNetINetMagicLength (4)
-#define kNetBootNameLen (256U)
+#define kBootNetNameLen (256U)
/// @brief the internet header is used to download updates OTA.
typedef struct BOOTNET_INTERNET_HEADER
@@ -24,9 +24,9 @@ typedef struct BOOTNET_INTERNET_HEADER
Kernel::Char NB3; /// magic char 3 'T'
Kernel::Char NB4; /// magic char 4 'B'
- Kernel::Char Name[kNetBootNameLen]; /// example: Modjo
+ Kernel::Char Name[kBootNetNameLen]; /// example: Modjo
Kernel::Int32 Length; /// the patch length.
- Kernel::Char Target[kNetBootNameLen]; /// the target file.
+ Kernel::Char Target[kBootNetNameLen]; /// the target file.
Kernel::Boolean ImpliesEEPROM : 1; /// does it imply an EEPROM reprogram?
Kernel::Boolean Preflight : 1; /// is it a preflight packet.
Kernel::Char Data[]; /// non preflight packet has a patch blob for a **PatchTarget**
diff --git a/dev/boot/modules/BootNet/amd64.json b/dev/boot/modules/BootNet/amd64.json
index 664c617f..112cf9f1 100644
--- a/dev/boot/modules/BootNet/amd64.json
+++ b/dev/boot/modules/BootNet/amd64.json
@@ -17,8 +17,8 @@
"__BOOTZ__",
"__BOOTZ_STANDALONE__",
"__NE_AMD64__",
- "kNetBootVersionHighest=0x0100",
- "kNetBootVersionLowest=0x0100",
- "kNetBootVersion=0x0100"
+ "kBootNetVersionHighest=0x0100",
+ "kBootNetVersionLowest=0x0100",
+ "kBootNetVersion=0x0100"
]
}
diff --git a/dev/kernel/FirmwareKit/CoreBoot/BootNet.h b/dev/kernel/FirmwareKit/CoreBoot/BootNet.h
new file mode 100644
index 00000000..a86ea81a
--- /dev/null
+++ b/dev/kernel/FirmwareKit/CoreBoot/BootNet.h
@@ -0,0 +1,30 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+#define kBootNetINetMagic "NETB"
+#define kBootNetINetMagicLength (4)
+
+#define kBootNetNameLen (256U)
+
+/// @brief the internet header is used to download updates OTA.
+typedef struct BOOTNET_INTERNET_HEADER
+{
+ 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 Name[kBootNetNameLen]; /// example: Modjo
+ Kernel::Int32 Length; /// the patch length.
+ Kernel::Char Target[kBootNetNameLen]; /// the target file.
+ Kernel::Boolean ImpliesEEPROM : 1; /// does it imply an EEPROM reprogram?
+ Kernel::Boolean Preflight : 1; /// is it a preflight packet.
+ Kernel::Char Data[]; /// non preflight packet has a patch blob for a **PatchTarget**
+} ATTRIBUTE(packed) BOOTNET_INTERNET_HEADER;
diff --git a/dev/kernel/FirmwareKit/CoreBoot/NetBoot.h b/dev/kernel/FirmwareKit/CoreBoot/NetBoot.h
deleted file mode 100644
index b1e9313c..00000000
--- a/dev/kernel/FirmwareKit/CoreBoot/NetBoot.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#pragma once
-
-#include <NewKit/Defines.h>
-
-/// @brief the internet header is used to download updates OTA.
-typedef struct BOOTNET_INTERNET_HEADER
-{
- 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[256U]; /// example: ColdChoco
- Kernel::Int32 PatchLength; /// the patch length.
- Kernel::Char PatchTarget[256U]; /// 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**
-} BOOTNET_INTERNET_HEADER;