diff options
Diffstat (limited to 'dev/boot/modules')
| -rw-r--r-- | dev/boot/modules/NetBoot/NetBoot.cc | 8 | ||||
| -rw-r--r-- | dev/boot/modules/NetBoot/NetBoot.h | 2 | ||||
| -rw-r--r-- | dev/boot/modules/NetBoot/build.json | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/dev/boot/modules/NetBoot/NetBoot.cc b/dev/boot/modules/NetBoot/NetBoot.cc index 16a9ae1e..1787045e 100644 --- a/dev/boot/modules/NetBoot/NetBoot.cc +++ b/dev/boot/modules/NetBoot/NetBoot.cc @@ -15,7 +15,7 @@ EXTERN_C Int32 ModuleMain(NeOS::HEL::BootInfoHeader* handover) { NETBOOT_INTERNET_HEADER inet{}; - /// TODO: Read Packet from localhost + /// TODO: Read packet from JSON file 'netboot.json' if (inet.PatchLength < 0) { @@ -27,7 +27,7 @@ EXTERN_C Int32 ModuleMain(NeOS::HEL::BootInfoHeader* handover) if (!inet.EEPROM) { - Boot::BootThread thread(inet.Data); + Boot::BootThread thread(inet.PatchData); if (thread.IsValid()) return thread.Start(handover, YES); @@ -35,7 +35,9 @@ EXTERN_C Int32 ModuleMain(NeOS::HEL::BootInfoHeader* handover) else { Boot::BootTextWriter writer; - writer.Write("NetBootLauncher: EEPROM flash not available for now.\r"); + writer.Write("NetBootLauncher: EEPROM flash is not available as of right now.\r"); + + /// TODO: Program new firmware to EEPROM (if crc and size matches) return kEfiFail; // TODO: Add support for EEPROM firmware update. } diff --git a/dev/boot/modules/NetBoot/NetBoot.h b/dev/boot/modules/NetBoot/NetBoot.h index aeeaf18b..e250ef27 100644 --- a/dev/boot/modules/NetBoot/NetBoot.h +++ b/dev/boot/modules/NetBoot/NetBoot.h @@ -29,5 +29,5 @@ typedef struct NETBOOT_INTERNET_HEADER NeOS::Char PatchTarget[kNetBootNameLen]; /// the target file. NeOS::Boolean EEPROM : 1; /// does it imply an EEPROM reprogram? NeOS::Boolean Preflight : 1; /// is it a preflight packet. - NeOS::Char Data[]; /// non preflight packet has a patch blob for a **PatchTarget** + NeOS::Char PatchData[]; /// non preflight packet has a patch blob for a **PatchTarget** } ATTRIBUTE(packed) NETBOOT_INTERNET_HEADER; diff --git a/dev/boot/modules/NetBoot/build.json b/dev/boot/modules/NetBoot/build.json index 2c92567d..db035094 100644 --- a/dev/boot/modules/NetBoot/build.json +++ b/dev/boot/modules/NetBoot/build.json @@ -2,10 +2,9 @@ "compiler_path": "x86_64-w64-mingw32-g++", "compiler_std": "c++20", "headers_path": ["../", "../../", "../../../kernel", "../../../", "./"], - "sources_path": [".cc", "*.S"], + "sources_path": ["*.cc", "*.S", "../../src/HEL/AMD64/*.cc", "../../src/HEL/AMD64/*.S", "../../src/*.cc"], "output_name": "netboot.sys", "compiler_flags": [ - "-ffreestanding", "-nostdlib", "-std=c++20", "-fPIC", @@ -16,6 +15,7 @@ "cpp_macros": [ "__NEOSKRNL__", "__BOOTZ__", + "__BOOTLDR_STANDALONE__", "__NE_AMD64__", "kNetBootVersionHighest=0x0100", "kNetBootVersionLowest=0x0100", |
