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

+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()