NC firmware update (thanks spsf). opencomputers now uses mutiple gpus to speed up rendering and now has net drivers. currently working on kernel memory protections to prevent malicious kernel drivers. spm does not work on opencomputers, this is a known issue i am working on fixing it :D sorry for the slow development.

This commit is contained in:
Astronand committed 2026-11-04 14:19:15 -05:00
1 parent fbaafc7cff
commit ef4b856ee6
89 files changed
+3955 -563

No files matched your search

+52
View File
@@ -0,0 +1,52 @@
@echo off
setlocal
pushd "%~dp0.."
set "OUT=%~1"
if "%OUT%"=="" set "OUT=nc-disk"
if not exist "Build\$\" (
echo error: Build\$ and Build\root missing; run 'python build.py build --arch nc' first 1>&2
popd
exit /b 1
)
if not exist "Build\root\" (
echo error: Build\$ and Build\root missing; run 'python build.py build --arch nc' first 1>&2
popd
exit /b 1
)
if exist "%OUT%" rmdir /s /q "%OUT%"
mkdir "%OUT%\hyperion" "%OUT%\root"
xcopy "Build\$\*" "%OUT%\hyperion\" /E /I /H /Y >nul
if errorlevel 1 (
popd
exit /b 1
)
xcopy "Build\root\*" "%OUT%\root\" /E /I /H /Y >nul
if errorlevel 1 (
popd
exit /b 1
)
python tools\nc_mkdisk_meta.py "%OUT%\root"
if errorlevel 1 (
popd
exit /b 1
)
(
echo {
echo "entrypoint": "hyperion:nc/boot.lua",
echo "language": "Lua",
echo "partitions": [
echo { "path": "hyperion", "readonly": false, "hidden": false },
echo { "path": "root", "readonly": false, "hidden": false }
echo ]
echo }
) > "%OUT%\build.json"
echo wrote %OUT% (boot=hyperion, system=root)
popd
endlocal
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
set -eu
OUT="${1:-nc-disk}"
if [ ! -d Build/'$' ] || [ ! -d Build/root ]; then
echo "error: Build/\$ and Build/root missing; run 'python build.py build --arch nc' first" >&2
exit 1
fi
rm -rf "$OUT"
mkdir -p "$OUT/hyperion" "$OUT/root"
cp -r Build/'$'/. "$OUT/hyperion"/
cp -r Build/root/. "$OUT/root"/
python3 "$(dirname "$0")/nc_mkdisk_meta.py" "$OUT/root"
cat > "$OUT/build.json" <<'EOF'
{
"entrypoint": "hyperion:nc/boot.lua",
"language": "Lua",
"partitions": [
{ "path": "hyperion", "readonly": false, "hidden": false },
{ "path": "root", "readonly": false, "hidden": false }
]
}
EOF
echo "wrote $OUT (boot=hyperion, system=root)"
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env python3
import json
import struct
import sys
from pathlib import Path
def main():
root = Path(sys.argv[1])
src = Path(sys.argv[2]) if len(sys.argv) > 2 else Path(__file__).resolve().parent.parent / "Src"
links = {}
for sj in sorted(src.glob("*/control/symlinks.json")):
try:
data = json.loads(sj.read_text())
except Exception as e:
print(f"warning: cannot parse {sj}: {e}")
continue
for link, target in data.items():
if not link.startswith("/") or not target.startswith("/"):
print(f"warning: skipping non-absolute symlink {link} -> {target}")
continue
parent, _, name = link.rpartition("/")
if not parent:
parent = "/"
links.setdefault(parent, {})[name] = target
PERMS = 32 + 16 + 512 + 8 + 4 + 256 + 2 + 1 + 128 # vfs.PERM.RWXRWXRWX
for parent, entries in sorted(links.items()):
d = root.joinpath(*[p for p in parent.split("/") if p])
d.mkdir(parents=True, exist_ok=True)
blob = struct.pack("B", 0x02)
for name in sorted(entries):
tgt = entries[name].encode()
blob += struct.pack("B", len(name)) + name.encode()
blob += struct.pack("B", 0x01) # etype symlink
blob += struct.pack("<HHH", 0, 0, PERMS)
blob += struct.pack("B", len(tgt)) + tgt
(d / ".meta").write_bytes(blob)
print(f"symlinks in {parent}: " + ", ".join(f"{k} -> {v}" for k, v in sorted(entries.items())))
if __name__ == "__main__":
main()