summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/chk.hefs.cpp17
-rwxr-xr-xtools/kapp.py (renamed from tools/mkapp.py)4
-rwxr-xr-xtools/kconf.py13
-rwxr-xr-xtools/kernel13
-rwxr-xr-xtools/kfwrk.py2
-rw-r--r--tools/mkfs.hefs.cpp5
6 files changed, 26 insertions, 28 deletions
diff --git a/tools/chk.hefs.cpp b/tools/chk.hefs.cpp
index 69a4312c..a0f56b77 100644
--- a/tools/chk.hefs.cpp
+++ b/tools/chk.hefs.cpp
@@ -3,15 +3,14 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/ne-foss-org/nekernel
-
-#include <tools/libmkfs/mkfs.hpp>
-#include <tools/libmkfs/openhefs.hpp>
#include <cstdlib>
#include <fstream>
+#include <tools/libmkfs/mkfs.hpp>
+#include <tools/libmkfs/openhefs.hpp>
/// @note decimal base.
static uint16_t kNumericalBase = 10;
-static auto kMinArgs = 2;
+static auto kMinArgs = 2;
int main(int argc, char** argv) {
if (argc < kMinArgs) {
@@ -20,9 +19,9 @@ int main(int argc, char** argv) {
return EXIT_FAILURE;
}
- auto args = mkfs::detail::build_args(argc, argv);
+ auto args = mkfs::detail::build_args(argc, argv);
auto opt_disk = mkfs::get_option<char>(args, "in");
- auto origin = mkfs::get_option<char>(args, "b");
+ auto origin = mkfs::get_option<char>(args, "b");
if (opt_disk.empty()) {
mkfs::console_out() << "chk: hefs: error: OpenHeFS partition is empty! Exiting..."
@@ -58,8 +57,8 @@ int main(int argc, char** argv) {
if (strncmp(boot_node.magic, kOpenHeFSMagic, kOpenHeFSMagicLen) != 0 ||
boot_node.sectorCount < 1 || boot_node.sectorSize < kMkFsSectorSz) {
- mkfs::console_out() << "chk: hefs: error: Device does not contain an OpenHeFS disk: " << opt_disk
- << "\n";
+ mkfs::console_out() << "chk: hefs: error: Device does not contain an OpenHeFS disk: "
+ << opt_disk << "\n";
return EXIT_FAILURE;
}
@@ -69,7 +68,7 @@ int main(int argc, char** argv) {
return EXIT_FAILURE;
}
- mkfs::console_out() << "chk: hefs: OpenHeFS partition is healthy. Exiting...\n";
+ mkfs::console_out() << "chk: hefs: The OpenHeFS partition is healthy. Exiting...\n";
return EXIT_SUCCESS;
}
diff --git a/tools/mkapp.py b/tools/kapp.py
index e3128a52..c18e7b01 100755
--- a/tools/mkapp.py
+++ b/tools/kapp.py
@@ -12,7 +12,7 @@ def create_directory_structure(base_path, project_name):
},
"src": {
".keep": None,
- "CommandLine.cc": None,
+ "CommandLine.cpp": None,
},
"vendor": {
".keep": None
@@ -69,7 +69,7 @@ def create_directory_structure(base_path, project_name):
if __name__ == "__main__":
if len(sys.argv) != 2:
- print("HELP: mkapp.py <project_name>")
+ print("HELP: kapp.py <project_name>")
sys.exit(os.EX_CONFIG)
base_path = os.getcwd() # Use the current working directory as the base path
diff --git a/tools/kconf.py b/tools/kconf.py
deleted file mode 100755
index a54d6244..00000000
--- a/tools/kconf.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-import os, json, sys
-
-if __name__ == '__main__':
- print("kconf: running kernel as standalone...")
- os.system("../scripts/debug_ahci_x64.sh")
- sys.exit(0)
-
-
-
-
diff --git a/tools/kernel b/tools/kernel
new file mode 100755
index 00000000..d9a639e7
--- /dev/null
+++ b/tools/kernel
@@ -0,0 +1,13 @@
+#! /usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+import os, sys
+
+KERNEL_SCRIPT="./scripts/debug_ahci_x64.sh"
+MODULES_SCRIPT="./scripts/modules_ahci_x64.sh"
+
+if __name__ == '__main__':
+ os.system(MODULES_SCRIPT)
+ os.system(KERNEL_SCRIPT)
+ sys.exit(0)
+
diff --git a/tools/kfwrk.py b/tools/kfwrk.py
index 3f104465..9d3833de 100755
--- a/tools/kfwrk.py
+++ b/tools/kfwrk.py
@@ -18,7 +18,7 @@ def create_directory_structure(base_path_fwrk, project_file_name, project_name):
},
"src": {
".keep": None,
- "DylibMain.cc": None,
+ "DylibMain.cpp": None,
},
"xml": {
".keep": None
diff --git a/tools/mkfs.hefs.cpp b/tools/mkfs.hefs.cpp
index ad60c675..c6e528ad 100644
--- a/tools/mkfs.hefs.cpp
+++ b/tools/mkfs.hefs.cpp
@@ -3,14 +3,13 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/ne-foss-org/nekernel
-
-#include <tools/libmkfs/mkfs.hpp>
-#include <tools/libmkfs/openhefs.hpp>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <limits>
+#include <tools/libmkfs/mkfs.hpp>
+#include <tools/libmkfs/openhefs.hpp>
static std::uint16_t kVersion = kOpenHeFSVersion;
static std::uint16_t kNumericalBase = 10;