summaryrefslogtreecommitdiffhomepage
path: root/public/tools
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-29 10:51:53 +0200
committerGitHub <noreply@github.com>2025-05-29 10:51:53 +0200
commit5c0bb7ee7b1b0fee02cc179fb21f4c57a61d6c2d (patch)
treecb17577bcdc9714c97a84ce417a075117097f146 /public/tools
parentd608230b1350b064ceb01e6572519b108f6139b0 (diff)
parent3167f59dbb401d6a79b1524537e04218baf49ee3 (diff)
Merge pull request #32 from nekernel-org/dev
0.0.2e3
Diffstat (limited to 'public/tools')
-rw-r--r--public/tools/cc/src/CommandLine.cc2
-rw-r--r--public/tools/diutil/diutil.json2
-rw-r--r--public/tools/ld.dyn/src/CommandLine.cc2
-rw-r--r--public/tools/ld.fwrk/src/CommandLine.cc2
-rw-r--r--public/tools/manual/.keep0
-rw-r--r--public/tools/manual/manual.json19
-rw-r--r--public/tools/manual/src/.keep0
-rw-r--r--public/tools/manual/src/CommandLine.cc13
-rw-r--r--public/tools/manual/vendor/.keep0
-rw-r--r--public/tools/mgmt/src/CommandLine.cc2
-rw-r--r--public/tools/mk.fwrk/Common.h2
-rw-r--r--public/tools/mk.fwrk/src/CommandLine.cc2
-rw-r--r--public/tools/mk.hefs/src/CommandLine.cc2
-rw-r--r--public/tools/mk.nefs/src/CommandLine.cc2
-rw-r--r--public/tools/open/src/CommandLine.cc2
-rw-r--r--public/tools/ping/.keep0
-rw-r--r--public/tools/ping/ping.json19
-rw-r--r--public/tools/ping/src/.keep0
-rw-r--r--public/tools/ping/src/CommandLine.cc29
-rw-r--r--public/tools/ping/vendor/.keep0
20 files changed, 90 insertions, 10 deletions
diff --git a/public/tools/cc/src/CommandLine.cc b/public/tools/cc/src/CommandLine.cc
index 719a1555..f1c72b64 100644
--- a/public/tools/cc/src/CommandLine.cc
+++ b/public/tools/cc/src/CommandLine.cc
@@ -4,7 +4,7 @@
* Copyright (c) 2024-2025 Amlal El Mahrouss
*/
-#include <user/SystemCalls.h>
+#include <libSystem/System.h>
/// @brief Placeholder program.
diff --git a/public/tools/diutil/diutil.json b/public/tools/diutil/diutil.json
index a7a49697..a863634b 100644
--- a/public/tools/diutil/diutil.json
+++ b/public/tools/diutil/diutil.json
@@ -2,7 +2,7 @@
"compiler_path": "x86_64-w64-mingw32-g++",
"compiler_std": "c++20",
"headers_path": ["./", "../../../dev/kernel", "../../../public/frameworks/", "../../../dev/", "./"],
- "sources_path": ["src/CommandLine.cc", "../../../public/frameworks/DiskImage.fwrk/src/*.cc", "../../../dev/user/src/*.cc"],
+ "sources_path": ["src/CommandLine.cc", "../../../public/frameworks/DiskImage.fwrk/src/*.cc", "../../../dev/libSystem/src/*.cc"],
"output_name": "./dist/diutil",
"cpp_macros": [
"kDUTILVersion=0x0100",
diff --git a/public/tools/ld.dyn/src/CommandLine.cc b/public/tools/ld.dyn/src/CommandLine.cc
index 377f22fa..e76c34a7 100644
--- a/public/tools/ld.dyn/src/CommandLine.cc
+++ b/public/tools/ld.dyn/src/CommandLine.cc
@@ -4,7 +4,7 @@
* Copyright (c) 2024-2025 Amlal El Mahrouss
*/
-#include <user/SystemCalls.h>
+#include <libSystem/System.h>
/// @brief Library loader.
diff --git a/public/tools/ld.fwrk/src/CommandLine.cc b/public/tools/ld.fwrk/src/CommandLine.cc
index 0fbaaf2e..e7a6e5ca 100644
--- a/public/tools/ld.fwrk/src/CommandLine.cc
+++ b/public/tools/ld.fwrk/src/CommandLine.cc
@@ -4,7 +4,7 @@
* Copyright (c) 2024-2025 Amlal El Mahrouss
*/
-#include <user/SystemCalls.h>
+#include <libSystem/System.h>
/// @brief This program loads a code framework into Kernel's memory.
diff --git a/public/tools/manual/.keep b/public/tools/manual/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/manual/.keep
diff --git a/public/tools/manual/manual.json b/public/tools/manual/manual.json
new file mode 100644
index 00000000..04626145
--- /dev/null
+++ b/public/tools/manual/manual.json
@@ -0,0 +1,19 @@
+{
+ "compiler_path": "clang++",
+ "compiler_std": "c++20",
+ "headers_path": [
+ "./",
+ "../../../dev/kernel",
+ "../../../public/frameworks/",
+ "../../../dev/",
+ "./"
+ ],
+ "sources_path": [],
+ "output_name": "./dist/manual",
+ "cpp_macros": [
+ "kSampleFWVersion=0x0100",
+ "kSampleFWVersionHighest=0x0100",
+ "kSampleFWVersionLowest=0x0100",
+ "__NE_SDK__"
+ ]
+} \ No newline at end of file
diff --git a/public/tools/manual/src/.keep b/public/tools/manual/src/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/manual/src/.keep
diff --git a/public/tools/manual/src/CommandLine.cc b/public/tools/manual/src/CommandLine.cc
new file mode 100644
index 00000000..0704384a
--- /dev/null
+++ b/public/tools/manual/src/CommandLine.cc
@@ -0,0 +1,13 @@
+#include <libSystem/System.h>
+
+SInt32 _NeMain(SInt32 argc, Char* argv[]) {
+ SCI_UNUSED(argc);
+ SCI_UNUSED(argv);
+
+ if (argc < 2) {
+ PrintOut(nullptr, "HELP: manual <tutorial_name>\n");
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+} \ No newline at end of file
diff --git a/public/tools/manual/vendor/.keep b/public/tools/manual/vendor/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/manual/vendor/.keep
diff --git a/public/tools/mgmt/src/CommandLine.cc b/public/tools/mgmt/src/CommandLine.cc
index 45990d08..f3840d01 100644
--- a/public/tools/mgmt/src/CommandLine.cc
+++ b/public/tools/mgmt/src/CommandLine.cc
@@ -1,4 +1,4 @@
-#include <user/SystemCalls.h>
+#include <libSystem/System.h>
SInt32 _NeMain(SInt32 argc, Char* argv[]) {
return EXIT_FAILURE;
diff --git a/public/tools/mk.fwrk/Common.h b/public/tools/mk.fwrk/Common.h
index be016be6..89e52471 100644
--- a/public/tools/mk.fwrk/Common.h
+++ b/public/tools/mk.fwrk/Common.h
@@ -7,6 +7,6 @@
#define APPS_COMMON_H
#include <CoreFoundation.fwrk/headers/Foundation.h>
-#include <user/SystemCalls.h>
+#include <libSystem/System.h>
#endif // APPS_COMMON_H
diff --git a/public/tools/mk.fwrk/src/CommandLine.cc b/public/tools/mk.fwrk/src/CommandLine.cc
index 202f21bb..4ef7240a 100644
--- a/public/tools/mk.fwrk/src/CommandLine.cc
+++ b/public/tools/mk.fwrk/src/CommandLine.cc
@@ -7,7 +7,7 @@
#include <Framework.h>
#include <Steps.h>
-#include <user/ProcessCodes.h>
+#include <libSystem/ProcessCodes.h>
#include <CoreFoundation.fwrk/headers/Array.h>
diff --git a/public/tools/mk.hefs/src/CommandLine.cc b/public/tools/mk.hefs/src/CommandLine.cc
index dd8be97f..711009d5 100644
--- a/public/tools/mk.hefs/src/CommandLine.cc
+++ b/public/tools/mk.hefs/src/CommandLine.cc
@@ -4,7 +4,7 @@
* Copyright (c) 2025 Amlal El Mahrouss
*/
-#include <user/SystemCalls.h>
+#include <libSystem/System.h>
/// @brief Placeholder program.
diff --git a/public/tools/mk.nefs/src/CommandLine.cc b/public/tools/mk.nefs/src/CommandLine.cc
index dd8be97f..711009d5 100644
--- a/public/tools/mk.nefs/src/CommandLine.cc
+++ b/public/tools/mk.nefs/src/CommandLine.cc
@@ -4,7 +4,7 @@
* Copyright (c) 2025 Amlal El Mahrouss
*/
-#include <user/SystemCalls.h>
+#include <libSystem/System.h>
/// @brief Placeholder program.
diff --git a/public/tools/open/src/CommandLine.cc b/public/tools/open/src/CommandLine.cc
index f2378599..6fa4e2f2 100644
--- a/public/tools/open/src/CommandLine.cc
+++ b/public/tools/open/src/CommandLine.cc
@@ -4,7 +4,7 @@
* Copyright (c) 2024-2025 Amlal El Mahrouss
*/
-#include <user/SystemCalls.h>
+#include <libSystem/System.h>
/// @brief This program opens an application from **OPEN_APP_BASE_PATH**
/// @file CommandLine.cc
diff --git a/public/tools/ping/.keep b/public/tools/ping/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/ping/.keep
diff --git a/public/tools/ping/ping.json b/public/tools/ping/ping.json
new file mode 100644
index 00000000..d8d4133a
--- /dev/null
+++ b/public/tools/ping/ping.json
@@ -0,0 +1,19 @@
+{
+ "compiler_path": "clang++",
+ "compiler_std": "c++20",
+ "headers_path": [
+ "./",
+ "../../../dev/kernel",
+ "../../../public/frameworks/",
+ "../../../dev/",
+ "./"
+ ],
+ "sources_path": [],
+ "output_name": "./dist/ping",
+ "cpp_macros": [
+ "kSampleFWVersion=0x0100",
+ "kSampleFWVersionHighest=0x0100",
+ "kSampleFWVersionLowest=0x0100",
+ "__NE_SDK__"
+ ]
+} \ No newline at end of file
diff --git a/public/tools/ping/src/.keep b/public/tools/ping/src/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/ping/src/.keep
diff --git a/public/tools/ping/src/CommandLine.cc b/public/tools/ping/src/CommandLine.cc
new file mode 100644
index 00000000..f5c82b80
--- /dev/null
+++ b/public/tools/ping/src/CommandLine.cc
@@ -0,0 +1,29 @@
+#include <libSystem/System.h>
+
+SInt32 _NeMain(SInt32 argc, Char* argv[]) {
+ SCI_UNUSED(argc);
+
+ if (argc < 2) {
+ PrintOut(nullptr, "HELP: ping <hostname>\n");
+ return EXIT_FAILURE;
+ }
+
+ PrintOut(nullptr, "Pinging %s...\n", argv[1]);
+
+ for (SizeT i = 0U; i < 4; ++i) {
+ SInt32 result = 0;
+
+ if (result != 0) {
+ PrintOut(nullptr, "Request timed out.\n");
+ return EXIT_FAILURE;
+ }
+
+ SInt32 bytes = 64; // Simulated response size
+ SInt32 time = 100 + (i * 10); // Simulated response time
+ SInt32 ttl = 64;
+
+ PrintOut(nullptr, "Reply from %s: bytes=%i time=%ims TTL=%i\n", argv[1], bytes, time, ttl);
+ }
+
+ return EXIT_SUCCESS;
+} \ No newline at end of file
diff --git a/public/tools/ping/vendor/.keep b/public/tools/ping/vendor/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/ping/vendor/.keep