From a3da0eaaf7569948f83c65ff7997c4d1fc868603 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 27 Mar 2025 20:35:24 +0100 Subject: BootZ: Introduce NetBoot module & consolidate STANDALONE macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- public/tools/open/src/CommandLine.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'public/tools/open/src/CommandLine.cc') diff --git a/public/tools/open/src/CommandLine.cc b/public/tools/open/src/CommandLine.cc index 1f9d8f3c..32606ce2 100644 --- a/public/tools/open/src/CommandLine.cc +++ b/public/tools/open/src/CommandLine.cc @@ -7,12 +7,13 @@ #include /// @brief This program opens an application from **OPEN_APP_BASE_PATH** +/// @file CommandLine.cc #define OPEN_APP_APP_FLAG "-a" #define OPEN_APP_HELP_FLAG "-h" #define OPEN_APP_BASE_PATH "/app/" -int main(int argc, char* argv[]) +SInt32 main(SInt32 argc, Char* argv[]) { if (argc == 1) return EXIT_FAILURE; @@ -21,10 +22,10 @@ int main(int argc, char* argv[]) { if (MmStrCmp(argv[i], OPEN_APP_HELP_FLAG) == 0) { - PrintOut(nullptr, "open: Open Tool.\n"); - PrintOut(nullptr, "open: © Amlal EL Mahrouss, All rights reserved.\n"); + PrintOut(nullptr, "open: open .app(s) directories.\n"); + PrintOut(nullptr, "open: © 2024-2025 Amlal EL Mahrouss, All rights reserved.\n"); - PrintOut(nullptr, "open: %s: Application is taken as input (opens a PEF/PE32+/ELF program depending on architecture).\n", OPEN_APP_APP_FLAG); + PrintOut(nullptr, "open: %s: App is being taken as the input (opens a PEF/PE32+/ELF program depending on the CPU architecture).\n", OPEN_APP_APP_FLAG); return EXIT_SUCCESS; } @@ -32,11 +33,13 @@ int main(int argc, char* argv[]) { if ((i + 1) == argc) return EXIT_FAILURE; + else if ((i + 2) == argc) + return EXIT_FAILURE; Char base_path[FILE_MAX_LEN] = OPEN_APP_BASE_PATH; MmCopyMemory(base_path + MmStrLen(OPEN_APP_BASE_PATH), argv[i + 1], MmStrLen(argv[i + 1])); - UIntPtr ret = RtlSpawnProcess(base_path, 0, nullptr, nullptr, 0); + UIntPtr ret = RtlSpawnProcess(StrFmt("{}/dist/{]}", base_path, argv[i + 2]), 0, nullptr, nullptr, 0); return ret; } -- cgit v1.2.3