summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-29 13:58:35 -0500
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-29 13:58:51 -0500
commit2e74dfd96fb97b03bf44035d7a3864066af4ece8 (patch)
treecb1a004d0f2a1c1e6921e1056f26eb4a6206ed4b
parent0e06135601f94f68e1bfcacfe5d77e2cd50c1863 (diff)
chore: Redesigned sysroot repository.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
m---------docs/openknowledge0
-rw-r--r--include/.keep0
-rw-r--r--lib/.keep0
m---------lib/libocl0
-rw-r--r--lib/libsteps/include/.keep0
-rw-r--r--lib/libsteps/include/steps/config.hpp17
-rw-r--r--lib/libsteps/include/steps/steps.hpp71
-rwxr-xr-xlib/libsteps/make_dist_linux.sh12
-rwxr-xr-xlib/libsteps/make_dist_osx.sh11
-rw-r--r--sysroot/include/.keep (renamed from EXTERNAL_HEADERS/.keep)0
-rw-r--r--sysroot/include/EXTERNAL_HEADERS/.keep (renamed from docs/.keep)0
-rw-r--r--sysroot/include/EXTERNAL_HEADERS/llvm/__config (renamed from EXTERNAL_HEADERS/llvm/__config)0
-rw-r--r--sysroot/include/EXTERNAL_HEADERS/llvm/cstdarg (renamed from EXTERNAL_HEADERS/llvm/cstdarg)0
-rw-r--r--tests/.keep0
-rw-r--r--tools/.keep0
-rw-r--r--tools/steps.cc36
-rw-r--r--tools/steps.toml8
17 files changed, 0 insertions, 155 deletions
diff --git a/docs/openknowledge b/docs/openknowledge
deleted file mode 160000
-Subproject 70bd28d7cc865c622903e2cafeb4cf96ee518ce
diff --git a/include/.keep b/include/.keep
deleted file mode 100644
index e69de29..0000000
--- a/include/.keep
+++ /dev/null
diff --git a/lib/.keep b/lib/.keep
deleted file mode 100644
index e69de29..0000000
--- a/lib/.keep
+++ /dev/null
diff --git a/lib/libocl b/lib/libocl
deleted file mode 160000
-Subproject e4aa91788918b5a0acf3c4f4ce2c8d560ad5949
diff --git a/lib/libsteps/include/.keep b/lib/libsteps/include/.keep
deleted file mode 100644
index e69de29..0000000
--- a/lib/libsteps/include/.keep
+++ /dev/null
diff --git a/lib/libsteps/include/steps/config.hpp b/lib/libsteps/include/steps/config.hpp
deleted file mode 100644
index 6eefe3c..0000000
--- a/lib/libsteps/include/steps/config.hpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/* -------------------------------------------
-
-Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
-
-------------------------------------------- */
-
-#pragma once
-
-#ifdef OCL_USE_UTF8
-#undef OCL_USE_UTF8
-#endif
-
-#include <core/includes.hpp>
-
-#include <cstring>
-#include <fstream>
-
diff --git a/lib/libsteps/include/steps/steps.hpp b/lib/libsteps/include/steps/steps.hpp
deleted file mode 100644
index c524149..0000000
--- a/lib/libsteps/include/steps/steps.hpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -------------------------------------------
-
-Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
-
-------------------------------------------- */
-
-#pragma once
-
-#include <steps/config.hpp>
-
-#define kStepsExtension ".stp"
-#define kStepsStrLen (256U)
-
-#define kStepsMagic " pls"
-#define kStepsMagicLen (4U)
-#define kStepsVersion (0x0100)
-
-#ifdef __GNUC__
-#define STEPS_PACKED __attribute__((packed))
-#else
-#define STEPS_PACKED
-#endif
-
-namespace ocl::steps {
-struct STEPS_PACKED record final {
- ocl::char_type magic[kStepsMagicLen] = {kStepsMagic[0], kStepsMagic[1],
- kStepsMagic[2], kStepsMagic[3]};
- ocl::char_type name[kStepsStrLen] = "";
- ocl::char_type company[kStepsStrLen] = "";
- ocl::char_type author[kStepsStrLen] = "";
- int32_t version = 0;
- int32_t pages = 0;
- int32_t check_page = 0, eula_page = 0;
-};
-
-inline bool is_valid(record& r) noexcept {
- return r.pages > 1 && r.version > 0 && strcmp(r.magic, kStepsMagic) == 0;
-}
-
-namespace operators {
-/// =========================================================== ///
-/// @brief Read operator for steps records.
-/// =========================================================== ///
-inline std::ifstream &operator>>(std::ifstream &f, record &r) {
- f.read((char *)&r, sizeof(r));
- return f;
-}
-
-/// =========================================================== ///
-/// @brief Write operator for steps records.
-/// =========================================================== ///
-inline std::ofstream &operator<<(std::ofstream &f, record &r) {
- f.write((char *)&r, sizeof(r));
- return f;
-}
-
-/// =========================================================== ///
-/// @brief Equal operator for steps records.
-/// =========================================================== ///
-inline bool operator==(const record &r, const record &l) {
- return (std::strncmp(r.magic, l.magic, kStepsMagicLen) == 0);
-}
-
-/// =========================================================== ///
-/// @brief Not equal operator for steps records.
-/// =========================================================== ///
-inline bool operator!=(const record &r, const record &l) {
- return (std::strncmp(r.magic, l.magic, kStepsMagicLen) > 0);
-}
-} // namespace operators
-} // namespace ocl::steps
diff --git a/lib/libsteps/make_dist_linux.sh b/lib/libsteps/make_dist_linux.sh
deleted file mode 100755
index fe58a8d..0000000
--- a/lib/libsteps/make_dist_linux.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-outputDir=dist/lib/
-
-mkdir -p $outputDir
-
-for f in *.hpp; do
-baseName=`echo $f | cut -d "." -f 1`
-echo "RUN:" cp --parents $f.hpp $outputDir$baseName
-cp --parents $f.hpp $outputDir$baseName
-done
-
diff --git a/lib/libsteps/make_dist_osx.sh b/lib/libsteps/make_dist_osx.sh
deleted file mode 100755
index 318ae4d..0000000
--- a/lib/libsteps/make_dist_osx.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-
-outputDir=dist/
-
-mkdir -p $outputDir
-
-for f in *.hpp; do
-baseName=`echo $f | cut -d "." -f 1`
-echo "RUN:" ditto $baseName.hpp $outputDir$baseName
-ditto $baseName.hpp $outputDir$baseName
-done
diff --git a/EXTERNAL_HEADERS/.keep b/sysroot/include/.keep
index e69de29..e69de29 100644
--- a/EXTERNAL_HEADERS/.keep
+++ b/sysroot/include/.keep
diff --git a/docs/.keep b/sysroot/include/EXTERNAL_HEADERS/.keep
index e69de29..e69de29 100644
--- a/docs/.keep
+++ b/sysroot/include/EXTERNAL_HEADERS/.keep
diff --git a/EXTERNAL_HEADERS/llvm/__config b/sysroot/include/EXTERNAL_HEADERS/llvm/__config
index 2948134..2948134 100644
--- a/EXTERNAL_HEADERS/llvm/__config
+++ b/sysroot/include/EXTERNAL_HEADERS/llvm/__config
diff --git a/EXTERNAL_HEADERS/llvm/cstdarg b/sysroot/include/EXTERNAL_HEADERS/llvm/cstdarg
index e8147d4..e8147d4 100644
--- a/EXTERNAL_HEADERS/llvm/cstdarg
+++ b/sysroot/include/EXTERNAL_HEADERS/llvm/cstdarg
diff --git a/tests/.keep b/tests/.keep
deleted file mode 100644
index e69de29..0000000
--- a/tests/.keep
+++ /dev/null
diff --git a/tools/.keep b/tools/.keep
deleted file mode 100644
index e69de29..0000000
--- a/tools/.keep
+++ /dev/null
diff --git a/tools/steps.cc b/tools/steps.cc
deleted file mode 100644
index ccad634..0000000
--- a/tools/steps.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-/* ===========================================================
-
- Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license
-
-=========================================================== */
-
-#include <io/print.hpp>
-#include <steps/steps.hpp>
-
-/// =========================================================== ///
-/// Use operators from steps namespace to compare steps records.
-/// =========================================================== ///
-using namespace ocl::steps::operators;
-
-const auto kStepsFileRoot = "/system/install.stp";
-
-/// =========================================================== ///
-/// @brief Main function for running steps on NeKernel.
-/// =========================================================== ///
-int main(void) {
- ocl::io::print("steps: running steps for program...\n");
-
- std::ifstream file(kStepsFileRoot);
- ocl::steps::record steps;
-
- file >> steps;
-
- if (!ocl::steps::is_valid(steps))
- return EXIT_FAILURE;
-
- /// AMLALE: Read steps from file and process them.
-
- ocl::io::print("steps: done.\n");
-
- return EXIT_SUCCESS;
-} \ No newline at end of file
diff --git a/tools/steps.toml b/tools/steps.toml
deleted file mode 100644
index 8de64fc..0000000
--- a/tools/steps.toml
+++ /dev/null
@@ -1,8 +0,0 @@
-compiler_path = "clang++"
-compiler_std = "c++20"
-headers_path = [ "../lib", "../lib/libocl/dev/", "/opt/homebrew/Cellar/boost/1.89.0/include" ]
-sources_path = [ "steps.cc" ]
-output_name = "steps-sysroot"
-compiler_flags = [ "-fPIC" ]
-cpp_macros = [ "__NE_STEPS__" ]
-run_after_build = false