summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-05 08:55:19 -0500
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-05 08:55:19 -0500
commit190de2472aca200d33dea42d3a7e839a697dd02e (patch)
tree1cfbec9b9c2477b4cd3b160f5fdae3ba373c9189
parentd88e68dab4518017e09709a325eb6259b1154b6e (diff)
chore: tools: improved tooling and security in chk.hefs, and mkfs.hefs.
chore: update README. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--README.md8
-rw-r--r--tools/chk.hefs.cc2
-rwxr-xr-xtools/mk_app.py4
-rwxr-xr-xtools/mk_fwrk.py4
-rwxr-xr-xtools/mk_htman.py1
-rwxr-xr-xtools/mk_img.py5
-rw-r--r--tools/mkfs.hefs.cc2
7 files changed, 10 insertions, 16 deletions
diff --git a/README.md b/README.md
index 2c11cede..b7078b97 100644
--- a/README.md
+++ b/README.md
@@ -50,9 +50,9 @@
## Getting Started
### **Requirements**
-- [MinGW](https://www.mingw-w64.org/) (cross-compiling)
-- [Clang](https://clang.llvm.org/)
-- [NASM](https://nasm.us/)
+- [MinGW](https://www.mingw-w64.org/) (AMD64 targets)
+- [Clang](https://clang.llvm.org/) (ARM targets)
+- [NASM](https://nasm.us/) (AMD64 targets)
- [NeBuild](https://github.com/nekernel-org/nebuild) (build system)
### **Build & Run**
@@ -75,6 +75,8 @@ cd nekernel
- `src/boot/` — Bootloader, platform bring-up, and early system code
- `src/libDDK/` — Driver Development Kit (DDK) and sample drivers
- `src/libSystem/` — Userland system call interface and runtime
+- `src/launch/` — NeKernel Launch System
+- `src/libMsg/` — NeKernel OpenMSG framework
- `public/tools/` — CLI tools (mkfs, fsck, open, manual, etc.)
- `public/frameworks/` — Userland frameworks (CoreFoundation, DiskImage, etc.)
- `docs/` — Specifications, design docs, and diagrams
diff --git a/tools/chk.hefs.cc b/tools/chk.hefs.cc
index a520d231..c1c58c6e 100644
--- a/tools/chk.hefs.cc
+++ b/tools/chk.hefs.cc
@@ -59,7 +59,7 @@ 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() << "hefs: error: Device is not an OpenHeFS disk: " << opt_disk << "\n";
+ mkfs::console_out() << "hefs: error: Device does not contain an OpenHeFS disk: " << opt_disk << "\n";
return EXIT_FAILURE;
}
diff --git a/tools/mk_app.py b/tools/mk_app.py
index 90aa2df5..793dd4a4 100755
--- a/tools/mk_app.py
+++ b/tools/mk_app.py
@@ -1,9 +1,7 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
-import os
-import json
-import sys
+import os, json, sys
def create_directory_structure(base_path, project_name):
# Define the directory structure
diff --git a/tools/mk_fwrk.py b/tools/mk_fwrk.py
index d47e4609..3779cd42 100755
--- a/tools/mk_fwrk.py
+++ b/tools/mk_fwrk.py
@@ -1,9 +1,7 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
-import os
-import json
-import sys
+import os, json, sys
"""
Create directory structure for the framework.
diff --git a/tools/mk_htman.py b/tools/mk_htman.py
index e865f7c5..366cd732 100755
--- a/tools/mk_htman.py
+++ b/tools/mk_htman.py
@@ -28,7 +28,6 @@ if __name__ == "__main__":
print(f"ERROR: Manual file '{manual_path}' is empty.")
sys.exit(os.EX_DATAERR)
html_content = f"<html><head><title>NeKernel Manual: {manual_path}</title></head><body><pre>{content}</pre></body></html>"
-
html_path = manual_path.replace('.man', '.html')
with open(html_path, 'w') as html_file:
diff --git a/tools/mk_img.py b/tools/mk_img.py
index f0fa0609..23b94eb1 100755
--- a/tools/mk_img.py
+++ b/tools/mk_img.py
@@ -1,10 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-import os
-import sys
-import subprocess
-import glob as file_glob
+import os, sys, subprocess, glob as file_glob
def copy_to_fat(image_path, source_dir):
if not os.path.isfile(image_path):
diff --git a/tools/mkfs.hefs.cc b/tools/mkfs.hefs.cc
index 0f11142b..7016bf18 100644
--- a/tools/mkfs.hefs.cc
+++ b/tools/mkfs.hefs.cc
@@ -20,7 +20,7 @@ static std::u8string kDiskLabel;
static size_t kDiskSectorSz = 512;
int main(int argc, char** argv) {
- if (argc < 2) {
+ if (argc != 10) {
mkfs::console_out()
<< "hefs: usage: mkfs.hefs -L=<label> -s=<sector_size> -b=<ind_start> -e=<ind_end> "
"-bs=<block_start> -be=<block_end> -is=<in_start> -ie=<in_end> "