diff options
Diffstat (limited to 'dev/boot/modules/BootNet')
| -rw-r--r-- | dev/boot/modules/BootNet/BootNet.cc | 10 | ||||
| -rw-r--r-- | dev/boot/modules/BootNet/BootNet.h | 16 |
2 files changed, 13 insertions, 13 deletions
diff --git a/dev/boot/modules/BootNet/BootNet.cc b/dev/boot/modules/BootNet/BootNet.cc index 4b7e5c30..0ca0998c 100644 --- a/dev/boot/modules/BootNet/BootNet.cc +++ b/dev/boot/modules/BootNet/BootNet.cc @@ -13,13 +13,13 @@ EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* handover) { - NETBOOT_INTERNET_HEADER inet{}; + BOOTNET_INTERNET_HEADER inet{}; - memset(&inet, 0, sizeof(NETBOOT_INTERNET_HEADER)); + memset(&inet, 0, sizeof(BOOTNET_INTERNET_HEADER)); /// TODO: Read packet from JSON file 'bootnet.json' - if (inet.PatchLength < 1) + if (inet.Length < 1) { Boot::BootTextWriter writer; writer.Write("NetBootLauncher: No executable attached to the packet, aborting.\r"); @@ -27,9 +27,9 @@ EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* handover) return kEfiFail; } - if (!inet.EEPROM) + if (!inet.ImpliesEEPROM) { - Boot::BootThread thread(inet.PatchData); + Boot::BootThread thread(inet.Data); if (thread.IsValid()) return thread.Start(handover, YES); diff --git a/dev/boot/modules/BootNet/BootNet.h b/dev/boot/modules/BootNet/BootNet.h index 4f795861..c8432d93 100644 --- a/dev/boot/modules/BootNet/BootNet.h +++ b/dev/boot/modules/BootNet/BootNet.h @@ -17,17 +17,17 @@ #define kNetBootNameLen (256U) /// @brief the internet header is used to download updates OTA. -typedef struct NETBOOT_INTERNET_HEADER +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[kNetBootNameLen]; /// example: Modjo - Kernel::Int32 PatchLength; /// the patch length. - Kernel::Char PatchTarget[kNetBootNameLen]; /// the target file. - Kernel::Boolean EEPROM : 1; /// does it imply an EEPROM reprogram? - Kernel::Boolean Preflight : 1; /// is it a preflight packet. - Kernel::Char PatchData[]; /// non preflight packet has a patch blob for a **PatchTarget** -} ATTRIBUTE(packed) NETBOOT_INTERNET_HEADER; + Kernel::Char Name[kNetBootNameLen]; /// example: Modjo + Kernel::Int32 Length; /// the patch length. + Kernel::Char Target[kNetBootNameLen]; /// 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; |
