From 69265679315389a82387e963cc69a2b7343356b5 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 27 Aug 2025 22:46:42 +0200 Subject: feat: FirmwareKit/NeBoot: Fix BootNet header structure layout Signed-off-by: Amlal El Mahrouss --- dev/kernel/FirmwareKit/NeBoot/BootNet.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'dev/kernel/FirmwareKit/NeBoot') diff --git a/dev/kernel/FirmwareKit/NeBoot/BootNet.h b/dev/kernel/FirmwareKit/NeBoot/BootNet.h index 3ed11363..250d0bc8 100644 --- a/dev/kernel/FirmwareKit/NeBoot/BootNet.h +++ b/dev/kernel/FirmwareKit/NeBoot/BootNet.h @@ -13,11 +13,13 @@ #define kBootNetVersion (0x001) #define kBootNetNameLen (256U) +struct _BOOTNET_INTERNET_HEADER; + /// @brief Netboot Internet Header /// Consists of 4 magic characters, and a set of fields describing the current patch that's being /// sent (if m_preflight = 0) /// @note Can be used to patch ROMs too (if ImpliesProgram = 1) -typedef struct BOOTNET_INTERNET_HEADER { +typedef struct _BOOTNET_INTERNET_HEADER { Kernel::Char NB1; /// magic char 1 'O' Kernel::Char NB2; /// magic char 2 'N' Kernel::Char NB3; /// magic char 3 'E' @@ -29,4 +31,6 @@ typedef struct BOOTNET_INTERNET_HEADER { Kernel::Boolean ImpliesProgram : 1; /// does it imply reprogramming? Kernel::Boolean Preflight : 1; /// is it a preflight packet. Kernel::Char Data[1]; /// non preflight packet has a patch blob for a **PatchTarget** -} BOOTNET_INTERNET_HEADER; +} PACKED BOOTNET_INTERNET_HEADER; + +using BOOT_INTERNET_HEADER_PTR = BOOT_INTERNET_HEADER; -- cgit v1.2.3 From cd87ca26b1d8f4472543f8ea64c1b9bebd9bcc33 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 27 Aug 2025 22:51:16 +0200 Subject: fix: FirmwareKit/BootNet: Fix BootNet alias. Signed-off-by: Amlal El Mahrouss --- dev/kernel/FirmwareKit/NeBoot/BootNet.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'dev/kernel/FirmwareKit/NeBoot') diff --git a/dev/kernel/FirmwareKit/NeBoot/BootNet.h b/dev/kernel/FirmwareKit/NeBoot/BootNet.h index 250d0bc8..ad8f07c5 100644 --- a/dev/kernel/FirmwareKit/NeBoot/BootNet.h +++ b/dev/kernel/FirmwareKit/NeBoot/BootNet.h @@ -24,13 +24,18 @@ typedef struct _BOOTNET_INTERNET_HEADER { Kernel::Char NB2; /// magic char 2 'N' Kernel::Char NB3; /// magic char 3 'E' Kernel::Char NB4; /// magic char 4 'T' + Kernel::UInt16 Version; + Kernel::Char Name[kBootNetNameLen]; /// example: Modjo + Kernel::Int32 Length; /// the patch length. Kernel::Char Target[kBootNetNameLen]; /// the target file. + Kernel::Boolean ImpliesProgram : 1; /// does it imply reprogramming? + Kernel::Boolean Preflight : 1; /// is it a preflight packet. Kernel::Char Data[1]; /// non preflight packet has a patch blob for a **PatchTarget** } PACKED BOOTNET_INTERNET_HEADER; -using BOOT_INTERNET_HEADER_PTR = BOOT_INTERNET_HEADER; +using BOOTNET_INTERNET_HEADER_PTR = BOOTNET_INTERNET_HEADER*; -- cgit v1.2.3