summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/FirmwareKit/CoreBoot/BootNet.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-03-31 22:02:54 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-03-31 22:02:54 +0200
commitfd288fed29eff48503abf842676085701e04c38d (patch)
tree2f517be98baf5b782c8f3718dc0beb4dc460d3ce /dev/kernel/FirmwareKit/CoreBoot/BootNet.h
parent3fb10500f8bce8a4ecacbb32ef30e6e86f100c1b (diff)
firmware/netboot: final refactors regarding netboot.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/FirmwareKit/CoreBoot/BootNet.h')
-rw-r--r--dev/kernel/FirmwareKit/CoreBoot/BootNet.h30
1 files changed, 30 insertions, 0 deletions
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;