diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-23 19:13:48 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-23 19:15:17 +0100 |
| commit | a13e1c0911c0627184bc38f18c7fdda64447b3ad (patch) | |
| tree | 073a62c09bf216e85a3f310376640fa1805147f9 /dev/Boot/Mod/NetBoot | |
| parent | 149fa096eb306d03686b3b67e813cf1a78e08cd0 (diff) | |
meta(kernel): Reworked repository's filesystem structure.
Removing useless parts of the project too.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Boot/Mod/NetBoot')
| -rw-r--r-- | dev/Boot/Mod/NetBoot/.hgkeep | 0 | ||||
| -rw-r--r-- | dev/Boot/Mod/NetBoot/Boot.S | 28 | ||||
| -rw-r--r-- | dev/Boot/Mod/NetBoot/NetBoot.cc | 44 | ||||
| -rw-r--r-- | dev/Boot/Mod/NetBoot/NetBoot.h | 33 | ||||
| -rw-r--r-- | dev/Boot/Mod/NetBoot/build.json | 24 |
5 files changed, 0 insertions, 129 deletions
diff --git a/dev/Boot/Mod/NetBoot/.hgkeep b/dev/Boot/Mod/NetBoot/.hgkeep deleted file mode 100644 index e69de29b..00000000 --- a/dev/Boot/Mod/NetBoot/.hgkeep +++ /dev/null diff --git a/dev/Boot/Mod/NetBoot/Boot.S b/dev/Boot/Mod/NetBoot/Boot.S deleted file mode 100644 index 2095b91d..00000000 --- a/dev/Boot/Mod/NetBoot/Boot.S +++ /dev/null @@ -1,28 +0,0 @@ -;; /* -;; * ======================================================== -;; * -;; * BootZ -;; * Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved. -;; * -;; * ======================================================== -;; */ - -.code64 -.intel_syntax noprefix - -#define kTypeDriver 101 -#define kArchAmd64 122 -#define kHandoverMagic 0xBADCC - -.section .ldr - -.quad kHandoverMagic -.word kTypeDriver - -.text - -.extern main -.global __main - -__main: - ret diff --git a/dev/Boot/Mod/NetBoot/NetBoot.cc b/dev/Boot/Mod/NetBoot/NetBoot.cc deleted file mode 100644 index 59610262..00000000 --- a/dev/Boot/Mod/NetBoot/NetBoot.cc +++ /dev/null @@ -1,44 +0,0 @@ -/* - * ======================================================== - * - * NetBoot - * Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved. - * - * ======================================================== - */ - -#include <Mod/NetBoot/NetBoot.h> -#include <BootKit/BootKit.h> -#include <BootKit/BootThread.h> - -EXTERN_C Int32 ModuleMain(NeOS::HEL::BootInfoHeader* handover) -{ - NETBOOT_INTERNET_HEADER inet{}; - - /// TODO: Read Packet from localhost - - if (inet.PatchLength < 0) - { - Boot::BootTextWriter writer; - writer.Write("NetBootLauncher: No Patch attached to packet.\r"); - - return kEfiFail; - } - - if (!inet.EEPROM) - { - Boot::BootThread thread(inet.Data); - - if (thread.IsValid()) - return thread.Start(handover, YES); - } - else - { - Boot::BootTextWriter writer; - writer.Write("NetBootLauncher: EEPROM flash not available for now.\r"); - - return kEfiFail; // TODO: Add support for EEPROM firmware update. - } - - return kEfiFail; -} diff --git a/dev/Boot/Mod/NetBoot/NetBoot.h b/dev/Boot/Mod/NetBoot/NetBoot.h deleted file mode 100644 index aeeaf18b..00000000 --- a/dev/Boot/Mod/NetBoot/NetBoot.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * ======================================================== - * - * NetBoot - * Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved. - * - * ======================================================== - */ - -#pragma once - -#include <NewKit/Defines.h> - -#define kNetBootINetMagic "NETB" -#define kNetBootINetMagicLength (4) - -#define kNetBootNameLen (256U) - -/// @brief the internet header is used to download updates OTA. -typedef struct NETBOOT_INTERNET_HEADER -{ - NeOS::Char NB1; /// magic char 1 'N' - NeOS::Char NB2; /// magic char 2 'E' - NeOS::Char NB3; /// magic char 3 'T' - NeOS::Char NB4; /// magic char 4 'B' - - NeOS::Char PatchName[kNetBootNameLen]; /// example: Modjo - NeOS::Int32 PatchLength; /// the patch length. - 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** -} ATTRIBUTE(packed) NETBOOT_INTERNET_HEADER; diff --git a/dev/Boot/Mod/NetBoot/build.json b/dev/Boot/Mod/NetBoot/build.json deleted file mode 100644 index 6f6d575f..00000000 --- a/dev/Boot/Mod/NetBoot/build.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compiler_path": "x86_64-w64-mingw32-g++", - "compiler_std": "c++20", - "headers_path": ["../", "../../", "../../../Kernel", "../../../", "./"], - "sources_path": [".cc", "*.S"], - "output_name": "netboot.sys", - "compiler_flags": [ - "-ffreestanding", - "-nostdlib", - "-std=c++20", - "-fPIC", - "-fno-rtti", - "-fno-exceptions", - "-Wl,--subsystem=17,--image-base,0x10000000,-e,ModuleMain" - ], - "cpp_macros": [ - "__NEOSKRNL__", - "__BOOTZ__", - "__NE_AMD64__", - "kNetBootVersionHighest=0x0100", - "kNetBootVersionLowest=0x0100", - "kNetBootVersion=0x0100" - ] -} |
