Skip to content

Commit 64c070c

Browse files
committed
Integrated lwext4 bare-metal driver, VFS tarball extraction, and GUI directory listing
1 parent 3708794 commit 64c070c

17 files changed

Lines changed: 769 additions & 834 deletions

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# Rust build outputs
22
/target/
3+
# NyxOS Build Artifacts
4+
*.img
5+
*.tar
6+
build_initrd/

Build.sh

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,46 @@ echo "[6/7] Building Network Suite (nyx-network)..."
3333
echo "[7/7] Building System Monitor (nyx-sysmon)..."
3434
(cd nyx-sysmon && $BUILD_CMD)
3535

36-
echo "[8/8] Packaging Initramfs (initrd.tar)..."
37-
# Create a staging folder
36+
echo "[8/8] Generating App Tarball..."
3837
rm -rf build_initrd
39-
mkdir -p build_initrd
4038

41-
# Copy all compiled binaries into the staging folder
42-
cp target/x86_64-nyx/release/nyx-* build_initrd/
43-
44-
# Pack them into a standard Uncompressed TAR archive
39+
# 1. Create the App Folders
40+
mkdir -p build_initrd/apps/Init.nyx
41+
mkdir -p build_initrd/apps/WindowServer.nyx
42+
mkdir -p build_initrd/apps/Terminal.nyx
43+
mkdir -p build_initrd/apps/Settings.nyx
44+
mkdir -p build_initrd/apps/Explorer.nyx
45+
mkdir -p build_initrd/apps/Network.nyx
46+
mkdir -p build_initrd/apps/SystemMonitor.nyx
47+
48+
# 2. Copy the compiled binaries into the folders as 'run.bin'
49+
cp target/x86_64-nyx/release/nyx-init build_initrd/apps/Init.nyx/run.bin
50+
cp target/x86_64-nyx/release/nyx-user build_initrd/apps/WindowServer.nyx/run.bin
51+
cp target/x86_64-nyx/release/nyx-terminal build_initrd/apps/Terminal.nyx/run.bin
52+
cp target/x86_64-nyx/release/nyx-settings build_initrd/apps/Settings.nyx/run.bin
53+
cp target/x86_64-nyx/release/nyx-explorer build_initrd/apps/Explorer.nyx/run.bin
54+
cp target/x86_64-nyx/release/nyx-network build_initrd/apps/Network.nyx/run.bin
55+
cp target/x86_64-nyx/release/nyx-sysmon build_initrd/apps/SystemMonitor.nyx/run.bin
56+
57+
# NEW: 3. Copy any JSON manifests from the source folders into the App Bundles
58+
# (The '2>/dev/null || true' prevents the script from crashing if an app doesn't have a JSON file)
59+
cp nyx-init/*.json build_initrd/apps/Init.nyx/ 2>/dev/null || true
60+
cp nyx-user/*.json build_initrd/apps/WindowServer.nyx/ 2>/dev/null || true
61+
cp nyx-terminal/*.json build_initrd/apps/Terminal.nyx/ 2>/dev/null || true
62+
cp nyx-settings/*.json build_initrd/apps/Settings.nyx/ 2>/dev/null || true
63+
cp nyx-explorer/*.json build_initrd/apps/Explorer.nyx/ 2>/dev/null || true
64+
cp nyx-network/*.json build_initrd/apps/Network.nyx/ 2>/dev/null || true
65+
cp nyx-sysmon/*.json build_initrd/apps/SystemMonitor.nyx/ 2>/dev/null || true
66+
67+
# 4. Package it into a lightweight tape archive
4568
cd build_initrd
46-
tar -cvf ../nyx-kernel/src/initrd.tar *
69+
tar -cf ../initrd.tar apps
4770
cd ..
48-
49-
# Cleanup staging folder
50-
rm -rf build_initrd
51-
52-
# Touch main.rs to force Cargo to rebuild the kernel with the new TAR archive
71+
cp initrd.tar nyx-kernel/src/initrd.tar
5372
touch nyx-kernel/src/main.rs
5473

55-
echo "=========================================="
56-
echo " Build Complete! Ready to compile Kernel. "
57-
echo "=========================================="
58-
5974
echo "=========================================="
6075
echo " Compiling NyxOS Kernel "
6176
echo "=========================================="
62-
# 🚨 CRITICAL: Unset RUSTFLAGS so we don't inject the userspace linker into the Kernel!
63-
unset RUSTFLAGS
64-
65-
# Force recompilation of main.rs so it packs the newly copied binaries
66-
touch nyx-kernel/src/main.rs
67-
68-
# Run the Kernel via your custom Runner crate!
77+
unset RUSTFLAGS
6978
cargo run --package nyx-kernel --release --target x86_64-unknown-none

Cargo.lock

Lines changed: 77 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

0 commit comments

Comments
 (0)