summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/system-ci.yml6
-rw-r--r--README.md6
-rw-r--r--compile_flags.txt3
m---------dev/neboot0
m---------dev/nebuild0
-rw-r--r--include/.keep (renamed from lib/libsteps/dev/.keep)0
m---------lib/libocl0
-rw-r--r--lib/libsteps/include/.keep0
-rw-r--r--lib/libsteps/include/steps/config.hpp (renamed from lib/libsteps/dev/lib/defines.hpp)6
-rw-r--r--lib/libsteps/include/steps/steps.hpp (renamed from lib/libsteps/dev/lib/steps.hpp)18
-rw-r--r--tools/StepsTool.cc (renamed from tools/steps.cc)9
-rw-r--r--tools/steps.toml2
12 files changed, 35 insertions, 15 deletions
diff --git a/.github/workflows/system-ci.yml b/.github/workflows/system-ci.yml
index a8f19dc..17ac932 100644
--- a/.github/workflows/system-ci.yml
+++ b/.github/workflows/system-ci.yml
@@ -15,6 +15,8 @@ jobs:
- uses: actions/checkout@v4
- name: Install Packages
run: sudo apt-get install libboost-all-dev
- - name: Build SuperNE
+ - name: Build SystemNe
run: |
- cd tools \ No newline at end of file
+ cd tools
+ nebuild steps.toml
+ ./steps.o --install-sysroot \ No newline at end of file
diff --git a/README.md b/README.md
index 947a4fd..b07ac6e 100644
--- a/README.md
+++ b/README.md
@@ -8,10 +8,12 @@ The purpose is the following:
- Hold the codebase in a single repository, it is way more maintable than a fragmented one.
- Easier paths based on the `system` path, i.e (../nekernel -> /system/dev/nekernel)
-- One system release is easier than releasing each component on its own.
+- One central system release is easier than releasing each component on its own.
-## Note:
+## Notes
- `dev` stands for develop, not the device directory.
+- `include` is for libSystem and other installed library headers.
+- `devices` and `network` are for network and standard devices on NeKernel.
###### Copyright 2025 - Amlal El Mahrouss & NeKernel.org Contributors. Licensed under Apache 2.0.
diff --git a/compile_flags.txt b/compile_flags.txt
index 6f5638b..fe075c4 100644
--- a/compile_flags.txt
+++ b/compile_flags.txt
@@ -5,5 +5,6 @@
-Idev/nebuild/dev
-Idev/nekernel/dev
-Idev/necti/dev
--Ilib/libocl/dev/
+-Ilib/libsteps/include/
+-Ilib/libocl/include/ocl
-I/opt/homebrew/Cellar/boost/1.89.0/include
diff --git a/dev/neboot b/dev/neboot
-Subproject 21aee2b17cdd45c0dea247e0bf26a95767bc447
+Subproject 7625c62c53fef869915499ed6332ded5d47608a
diff --git a/dev/nebuild b/dev/nebuild
-Subproject 28e3d9b250a11cc1167683e6388d8cca715bb59
+Subproject 978e187043902c1e87a6e9c3d244dabdf6f749c
diff --git a/lib/libsteps/dev/.keep b/include/.keep
index e69de29..e69de29 100644
--- a/lib/libsteps/dev/.keep
+++ b/include/.keep
diff --git a/lib/libocl b/lib/libocl
-Subproject 9a70f32ddaec0eef99efbf7ff5597c2adf08f45
+Subproject 85f89ee4bb137100cbeffcbc10168eb8ea52e6c
diff --git a/lib/libsteps/include/.keep b/lib/libsteps/include/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lib/libsteps/include/.keep
diff --git a/lib/libsteps/dev/lib/defines.hpp b/lib/libsteps/include/steps/config.hpp
index 4c7c38b..6eefe3c 100644
--- a/lib/libsteps/dev/lib/defines.hpp
+++ b/lib/libsteps/include/steps/config.hpp
@@ -10,4 +10,8 @@ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
#undef OCL_USE_UTF8
#endif
-#include <lib/core/includes.hpp>
+#include <core/includes.hpp>
+
+#include <cstring>
+#include <fstream>
+
diff --git a/lib/libsteps/dev/lib/steps.hpp b/lib/libsteps/include/steps/steps.hpp
index ce6be51..c524149 100644
--- a/lib/libsteps/dev/lib/steps.hpp
+++ b/lib/libsteps/include/steps/steps.hpp
@@ -6,9 +6,7 @@ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
#pragma once
-#include <cstring>
-#include <fstream>
-#include <libsteps/dev/lib/defines.hpp>
+#include <steps/config.hpp>
#define kStepsExtension ".stp"
#define kStepsStrLen (256U)
@@ -17,8 +15,14 @@ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
#define kStepsMagicLen (4U)
#define kStepsVersion (0x0100)
+#ifdef __GNUC__
+#define STEPS_PACKED __attribute__((packed))
+#else
+#define STEPS_PACKED
+#endif
+
namespace ocl::steps {
-struct __attribute__((packed)) record final {
+struct STEPS_PACKED record final {
ocl::char_type magic[kStepsMagicLen] = {kStepsMagic[0], kStepsMagic[1],
kStepsMagic[2], kStepsMagic[3]};
ocl::char_type name[kStepsStrLen] = "";
@@ -34,11 +38,17 @@ inline bool is_valid(record& r) noexcept {
}
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;
diff --git a/tools/steps.cc b/tools/StepsTool.cc
index 6b9a8f7..ccad634 100644
--- a/tools/steps.cc
+++ b/tools/StepsTool.cc
@@ -1,11 +1,11 @@
/* ===========================================================
-Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
+ Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license
=========================================================== */
-#include <libocl/dev/lib/io/print.hpp>
-#include <libsteps/dev/lib/steps.hpp>
+#include <io/print.hpp>
+#include <steps/steps.hpp>
/// =========================================================== ///
/// Use operators from steps namespace to compare steps records.
@@ -25,7 +25,8 @@ int main(void) {
file >> steps;
- if (!ocl::steps::is_valid(steps)) return EXIT_FAILURE;
+ if (!ocl::steps::is_valid(steps))
+ return EXIT_FAILURE;
/// AMLALE: Read steps from file and process them.
diff --git a/tools/steps.toml b/tools/steps.toml
index f9e3734..4d0de7c 100644
--- a/tools/steps.toml
+++ b/tools/steps.toml
@@ -1,7 +1,7 @@
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" ]
+sources_path = [ "StepsTool.cc" ]
output_name = "steps.o"
compiler_flags = [ "-fPIC" ]
cpp_macros = [ "__NE_STEPS__" ]