From c8b5a4cc2981c4fd8987b7f048380a13d80981fd Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 2 Feb 2024 10:09:27 +0100 Subject: See below. - Pack NewFS data structures. - Add README.TXT in /Drivers/ - Move /Internals/Tools in just /Tools. Signed-off-by: Amlal El Mahrouss --- Drivers/README.TXT | 15 +++++++++++++++ Internal/.gitkeep | 0 Internal/Tools/.gitkeep | 0 Internal/Tools/NewFSPartTool.cxx | 26 -------------------------- Private/FSKit/NewFS.hxx | 8 ++++---- Private/NewBoot/BootKit/BootKit.hxx | 2 -- Tools/.gitkeep | 0 Tools/PartTool.cxx | 27 +++++++++++++++++++++++++++ 8 files changed, 46 insertions(+), 32 deletions(-) create mode 100644 Drivers/README.TXT delete mode 100644 Internal/.gitkeep delete mode 100644 Internal/Tools/.gitkeep delete mode 100644 Internal/Tools/NewFSPartTool.cxx create mode 100644 Tools/.gitkeep create mode 100644 Tools/PartTool.cxx diff --git a/Drivers/README.TXT b/Drivers/README.TXT new file mode 100644 index 00000000..d26f409b --- /dev/null +++ b/Drivers/README.TXT @@ -0,0 +1,15 @@ +========================== +Basic Device Drivers (BDD) +========================== + +1 - Build them +2 - Place them inside Private/Root +3 - And continue your build. + + +==================== +What are these? +==================== + +These are HCore device drivers. +Running in Ring-3. To let the driver restart in case of a crash. diff --git a/Internal/.gitkeep b/Internal/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/Internal/Tools/.gitkeep b/Internal/Tools/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/Internal/Tools/NewFSPartTool.cxx b/Internal/Tools/NewFSPartTool.cxx deleted file mode 100644 index 41bdd392..00000000 --- a/Internal/Tools/NewFSPartTool.cxx +++ /dev/null @@ -1,26 +0,0 @@ -/* ------------------------------------------- - - Copyright Mahrouss Logic - - File: MakeNewFS.cpp - Purpose: Partition a drive with a NewFS/EPM filesystem in it. - - Revision History: - - 31/01/24: Added file (amlel) - -------------------------------------------- */ - -/***********************************************************************************/ -/// @file MakeNewFS.cxx -/// @brief NewFS partition program. -/***********************************************************************************/ - -#include - -int main() { - std::cout - << "NewFSPartTool: Make a NewFS partition image from a directory!\n" - << "Copyright Mahrouss Logic, all rights reserved. (INTERNAL TOOL)\n"; - return 0; -} diff --git a/Private/FSKit/NewFS.hxx b/Private/FSKit/NewFS.hxx index 022100cb..75f4e554 100644 --- a/Private/FSKit/NewFS.hxx +++ b/Private/FSKit/NewFS.hxx @@ -30,7 +30,7 @@ enum { kUnknowmn = 0xFF, // unknown device or unsupported (floppy) }; -struct NewBootBlock final { +struct PACKED NewBootBlock final { HCore::Char Ident[kIdentLen]; HCore::Char Shell[kNameLen]; @@ -56,7 +56,7 @@ struct NewBootBlock final { #define kKindDirectory 2 #define kKindSymlink 3 -struct NewCatalog final { +struct PACKED NewCatalog final { HCore::Char Name[kNameLen]; HCore::Int32 Flags; @@ -66,7 +66,7 @@ struct NewCatalog final { HCore::Lba LastFork; }; -struct NewFork { +struct PACKED NewFork final { HCore::Int32 Flags; HCore::Int32 Kind; @@ -90,7 +90,7 @@ struct NewFork { #define kConfigLen 64 #define kPartLen 32 -struct NewPartitionBlock final { +struct PACKED NewPartitionBlock final { HCore::Char PartitionName[kPartLen]; HCore::Char JsonPath[kConfigLen]; diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx index 90ef5156..70519aba 100644 --- a/Private/NewBoot/BootKit/BootKit.hxx +++ b/Private/NewBoot/BootKit/BootKit.hxx @@ -81,8 +81,6 @@ class BFileReader final { private: Int32 mErrorCode{kOperationOkay}; CharacterType mPath[255]; - - private: BATADevice mDevice; }; diff --git a/Tools/.gitkeep b/Tools/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Tools/PartTool.cxx b/Tools/PartTool.cxx new file mode 100644 index 00000000..df40ae3c --- /dev/null +++ b/Tools/PartTool.cxx @@ -0,0 +1,27 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + + File: MakeNewFS.cpp + Purpose: Partition a drive with a NewFS/EPM filesystem in it. + + Revision History: + + 31/01/24: Added file (amlel) + +------------------------------------------- */ + +/***********************************************************************************/ +/// @file MakeNewFS.cxx +/// @brief NewFS partition program. +/***********************************************************************************/ + +#include + +int main() { + std::cout + << "PartTool: build a NewFS partition image from a directory!\n" + << "Copyright Mahrouss Logic, all rights reserved. (INTERNAL TOOL)\n"; + + return 0; +} -- cgit v1.2.3