From fd288fed29eff48503abf842676085701e04c38d Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 31 Mar 2025 22:02:54 +0200 Subject: firmware/netboot: final refactors regarding netboot. Signed-off-by: Amlal El Mahrouss --- dev/boot/modules/BootNet/BootNet.cc | 4 ++-- dev/boot/modules/BootNet/BootNet.h | 10 +++++----- dev/boot/modules/BootNet/amd64.json | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'dev/boot/modules/BootNet') 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 -#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" ] } -- cgit v1.2.3