diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-27 20:35:24 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-27 20:35:24 +0100 |
| commit | a3da0eaaf7569948f83c65ff7997c4d1fc868603 (patch) | |
| tree | 735b9feba07568c802365169761efe0bc730f16b /dev/boot/modules/NetBoot/NetBoot.cc | |
| parent | e263653c2c1d1858827ac45061ecaefd9047fbb2 (diff) | |
BootZ: Introduce NetBoot module & consolidate STANDALONE macro
- Renamed __BOOTLDR_STANDALONE__ → __BOOTZ_STANDALONE__ across all modules.
- Introduced NetBoot module to support fallback booting via packets.
- Updated amd64-desktop build to bundle netboot.sys as part of system image.
- NetBoot now properly zeroes out its header and performs sanity check on PatchLength.
- Boot flow now attempts to fallback to NetBoot if neoskrnl.exe fails to start.
- Reorganized disk formatting logic for clarity and better failure recovery.
- HeFS & NeFS minimum disk size lowered (64GiB → 256MiB and 4GiB → 8MiB).
- Renamed `IndexProperty` to `Index` in FSKit::Indexer.
- Moved HintKit → hint/, updated includes and guards.
- Removed deprecated LPC.{cc,h}, replaced by ProcessCodes.h.
- Modernized SystemCalls.h typedefs: SCIObject → Ref, ThreadObject → ThreadRef, etc.
- Updated userland tools `make_app` and `open` with copyright and behavior fixes.
This prepares the BootZ infrastructure for headless/network environments.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/boot/modules/NetBoot/NetBoot.cc')
| -rw-r--r-- | dev/boot/modules/NetBoot/NetBoot.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dev/boot/modules/NetBoot/NetBoot.cc b/dev/boot/modules/NetBoot/NetBoot.cc index 1787045e..4a169d33 100644 --- a/dev/boot/modules/NetBoot/NetBoot.cc +++ b/dev/boot/modules/NetBoot/NetBoot.cc @@ -15,12 +15,14 @@ EXTERN_C Int32 ModuleMain(NeOS::HEL::BootInfoHeader* handover) { NETBOOT_INTERNET_HEADER inet{}; + memset(&inet, 0, sizeof(NETBOOT_INTERNET_HEADER)); + /// TODO: Read packet from JSON file 'netboot.json' - if (inet.PatchLength < 0) + if (inet.PatchLength < 1) { Boot::BootTextWriter writer; - writer.Write("NetBootLauncher: No Patch attached to packet.\r"); + writer.Write("NetBootLauncher: No executable attached to the packet, aborting.\r"); return kEfiFail; } @@ -31,6 +33,8 @@ EXTERN_C Int32 ModuleMain(NeOS::HEL::BootInfoHeader* handover) if (thread.IsValid()) return thread.Start(handover, YES); + + return kEfiFail; } else { |
