Merge pull request '1.2 dev' (#21) from 1.2-dev into main

Reviewed-on: #21
This commit was merged in pull request #21.
This commit is contained in:
2026-08-15 22:41:41 -04:00
57 changed files with 46 additions and 38 deletions
@@ -31,10 +31,18 @@ local function loadExecutable(path)
return func, euid, suid_set return func, euid, suid_set
end end
local function createTask(func, name, envars, args, tgid, real_uid, eff_uid) local function createTask(func, name, envars, args, tgid, real_uid, eff_uid, clearFds)
local id = nextpid local id = nextpid
nextpid = nextpid + 1 nextpid = nextpid + 1
local fds={}
if not clearFds then
for id, file in pairs(kernel.currentTask.fd) do
file.refcount=file.refcount+1
fds[id]=file
end
end
tasks[tostring(id)] = { tasks[tostring(id)] = {
coro = coroutine.create(function() coro = coroutine.create(function()
local ok, err = xpcall(func, debug.traceback, table.unpack(args or {})) local ok, err = xpcall(func, debug.traceback, table.unpack(args or {}))
@@ -71,7 +79,7 @@ local function createTask(func, name, envars, args, tgid, real_uid, eff_uid)
euid = eff_uid, euid = eff_uid,
gid = (kernel.currentTask and kernel.currentTask.gid) or 0, gid = (kernel.currentTask and kernel.currentTask.gid) or 0,
groups = (kernel.currentTask and kernel.currentTask.groups) or {}, groups = (kernel.currentTask and kernel.currentTask.groups) or {},
fd = {}, fd = fds,
sleep = 0, sleep = 0,
ivs = 0, ivs = 0,
vs = 0, vs = 0,
@@ -93,14 +101,14 @@ local function createTask(func, name, envars, args, tgid, real_uid, eff_uid)
return id return id
end end
function sys.spawn(func, name, envars, args, tgid) function sys.spawn(func, name, envars, args, tgid, clearFds)
local caller = kernel.currentTask local caller = kernel.currentTask
local real_uid = caller and caller.uid or kernel.uid local real_uid = caller and caller.uid or kernel.uid
local eff_uid = caller and caller.euid or real_uid local eff_uid = caller and caller.euid or real_uid
return createTask(func, name, envars, args, tgid, real_uid, eff_uid) return createTask(func, name, envars, args, tgid, real_uid, eff_uid, clearFds)
end end
function sys.execspawn(path, name, envars, args, tgid) function sys.execspawn(path, name, envars, args, tgid, keepFds)
local func, euid, suid_active = loadExecutable(path, kernel._U) local func, euid, suid_active = loadExecutable(path, kernel._U)
local caller = kernel.currentTask local caller = kernel.currentTask
@@ -114,7 +122,7 @@ function sys.execspawn(path, name, envars, args, tgid)
) )
end end
return createTask(func, name or path, envars, args, tgid, real_uid, euid) return createTask(func, name or path, envars, args, tgid, real_uid, euid, not keepFds)
end end
function sys.exec(path, args, envars) function sys.exec(path, args, envars)
+2 -2
View File
@@ -1222,7 +1222,7 @@ local function runCommand(command)
-- compiled from disk by the kernel (via loadExecutable -> freshUserEnv), -- compiled from disk by the kernel (via loadExecutable -> freshUserEnv),
-- so the child cannot share any upvalue or syscall table state with hysh. -- so the child cannot share any upvalue or syscall table state with hysh.
syscall.exec(cmdPath, {table.unpack(args, 2)}) syscall.exec(cmdPath, {table.unpack(args, 2)})
end, progName) end, progName, nil, nil, nil, true)
while true do while true do
local exited, code = syscall.collect(proc) local exited, code = syscall.collect(proc)
@@ -1231,7 +1231,7 @@ local function runCommand(command)
return return
end end
if terminate then if terminate then
local ok2 = syscall.kill(proc) local ok2 = syscall.kill(proc, true)
if ok2 then if ok2 then
syscall.devctl(1,"sbgc",16); syscall.devctl(1,"sfgc",0xFF0000) syscall.devctl(1,"sbgc",16); syscall.devctl(1,"sfgc",0xFF0000)
print("\nProgram Terminated."); syscall.devctl(1,"sfgc",0xFFFFFF) print("\nProgram Terminated."); syscall.devctl(1,"sfgc",0xFFFFFF)
+2 -2
View File
@@ -547,7 +547,7 @@ local spm = function(...)
if cloptions.u then if cloptions.u then
for i,v in ipairs(table.keys(pkgdb)) do for i,v in ipairs(table.keys(pkgdb)) do
local pkg, err = getPkg(v) local pkg, err = getPkg(v)
if pkg then if pkg and not found[v] then
needed[#needed+1] = pkg needed[#needed+1] = pkg
found[v]=true found[v]=true
end end
@@ -586,7 +586,7 @@ local spm = function(...)
local files = {} local files = {}
for _,v in ipairs(needed) do for _,v in ipairs(needed) do
if not pkgdb[v.id] or not pkgdb[v.id].hash==v.hash then if not pkgdb[v.id] or not pkgdb[v.id].hash==v.hash or cloptions.u then
w("Downloading "..v.id) w("Downloading "..v.id)
local resp = get(v.tar) local resp = get(v.tar)
if not resp then if not resp then
+2 -2
View File
@@ -14,7 +14,7 @@ for i,v in pairs(kernel.processes) do
else else
kernel.log("Successfully executed kernel task: " .. i) kernel.log("Successfully executed kernel task: " .. i)
end end
end, i) end, i, nil,nil,nil,true)
end end
-- config file path setup -- config file path setup
@@ -42,7 +42,7 @@ for i,v in ipairs(files) do
else else
kernel.log("Successfully executed startup script: " .. filepath) kernel.log("Successfully executed startup script: " .. filepath)
end end
end, "startup:" .. v) end, "startup:" .. v, nil,nil,nil,true)
end end
end end
kernel.saveLog() kernel.saveLog()
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "10231c287c97ab72adf77117886d2de3", "hash": "8c5cd772a7f2369cd013a592f9af9735",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-core.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-core.tar.gz"
} }
+1 -1
View File
@@ -8,6 +8,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "a44f05701db0feef517f196047a198d7", "hash": "80a565f47149dc3fe8dac43129d926e2",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-ac.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-ac.tar.gz"
} }
+1 -1
View File
@@ -4,6 +4,6 @@
"authors": [], "authors": [],
"dependencies": [], "dependencies": [],
"version": "0.0.0", "version": "0.0.0",
"hash": "cba0823f33d942e92ddad54c2d4a7004", "hash": "9f1f7f0667ec678d544ee08c6e2e644d",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-addon-cct.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-addon-cct.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "4021ef17d9a26200b255e5fdad3766cc", "hash": "a57fa8c133267f2bd4da564640b4cd2b",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-ccpc.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-ccpc.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.3.0", "version": "1.3.0",
"hash": "341e92ee642399fb7b6892be669ad881", "hash": "20b907135b9917c3f718291480d05da5",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-cct.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-cct.tar.gz"
} }
+1 -1
View File
@@ -4,6 +4,6 @@
"authors": [], "authors": [],
"dependencies": [], "dependencies": [],
"version": "0.0.0", "version": "0.0.0",
"hash": "f9fcd282170185f174fd5c1e7b9cb93e", "hash": "ece345ad01466fbcb828b1fc972c0440",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-lua.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-lua.tar.gz"
} }
+1 -1
View File
@@ -6,6 +6,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "0.1.0", "version": "0.1.0",
"hash": "3090e7b03b8212052fb697987b1f5024", "hash": "60804b53c7d7d8dd69afc33fad930727",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-oc.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-oc.tar.gz"
} }
+1 -1
View File
@@ -4,6 +4,6 @@
"authors": [], "authors": [],
"dependencies": [], "dependencies": [],
"version": "0.0.0", "version": "0.0.0",
"hash": "ceb96ec6a50538e6d162215639698077", "hash": "753cd941da3c38f1d4350abc944f6e87",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-vm.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-vm.tar.gz"
} }
+1 -1
View File
@@ -8,6 +8,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.5.0", "version": "1.5.0",
"hash": "21a9ab0c0637273e97527870acc24bba", "hash": "447e8663723d28d03c951f347494b750",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-kernel.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-kernel.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "89efe44800c2559b125c3e5315a5d5a4", "hash": "812e11b5ee4cfc2096b9b4326fd1773e",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/bit32.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/bit32.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "c41dc8025c5bcf657e5b52c40ddfe6be", "hash": "296979e95c6ff4ef89f5ee211d64e69c",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/blake2s.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/blake2s.tar.gz"
} }
+1 -1
View File
@@ -8,6 +8,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "988c894f0faa19ff79f26270e6567c5f", "hash": "2d7afba8394e2f2cb574bcc96e042ef6",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/coreutils.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/coreutils.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0-release", "version": "1.0.0-release",
"hash": "23ef21eef7e266d416bddee1eb673e30", "hash": "c1b0ebb35d786793442663ae5d7ff384",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/deflate.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/deflate.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "5c423cc612d946e70e54fb517a71d22e", "hash": "af09f814eb4b0ff24085ce9022b5f135",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/gfxterm.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/gfxterm.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.3.0", "version": "1.3.0",
"hash": "c3c914f7aecc642464cb5b14f2e135fa", "hash": "1974e196fade22bafb94789883bb6841",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/hysh.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/hysh.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "81177ba78d1febbd6fff59bb23a16080", "hash": "b35ff313352ba8f1d4399a22f6616015",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/iniparse.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/iniparse.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "203ace7ad9135d21691e2a6b9e62be9f", "hash": "e0ab0768f51cde02820f1ec456e88ee9",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/installer.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/installer.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "6602fa70ec8e1288015168eddf817664", "hash": "464350121b7cc02dba96f15d2c584d29",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/json.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/json.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.2.0", "version": "1.2.0",
"hash": "31e0103563ca3443e5c3ab8257325138", "hash": "4530588587327821be46e46bcb64edaf",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/lua.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/lua.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "916d8f4dabdcef58524e9a4c59ea8957", "hash": "2fb19eeac778528f0ebf4843bd8ca2aa",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/micro.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/micro.tar.gz"
} }
+1 -1
View File
@@ -8,6 +8,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "87cb37074598899bf446d76bee0945a4", "hash": "77327d7d90d17316afaca2ee14945596",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/minify.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/minify.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "c48c7078c5b5c9309ed3d6ee4fb38c2c", "hash": "0a0f515b64d2dca9cc0e1a9162cd90d9",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/pid.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/pid.tar.gz"
} }
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -14,6 +14,6 @@
"Hyperion-core" "Hyperion-core"
], ],
"version": "1.0.0", "version": "1.0.0",
"hash": "d068cb61524229f62f9bf1447d2a7840", "hash": "b98b74face55bd4feedb312aa638795d",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/spm.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/spm.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.1.0", "version": "1.1.0",
"hash": "8bbf77d2efc8d0b857b54baa850dd75a", "hash": "7c4a2e241b7ced224084471b219390bf",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/sysinit.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/sysinit.tar.gz"
} }
+1 -1
View File
@@ -7,6 +7,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "", "version": "",
"hash": "71544921565f3fc09fd9d48235fd76f5", "hash": "2f0419446840e85b5142252c28da35d9",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/tar.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/tar.tar.gz"
} }
+1 -1
View File
@@ -10,6 +10,6 @@
], ],
"dependencies": [], "dependencies": [],
"version": "1.0.0", "version": "1.0.0",
"hash": "6597d3d7a191398acf2728bfff09fcbb", "hash": "7de373a2272d21a58a1d9c7fcd462781",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/xz.tar.gz" "tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/xz.tar.gz"
} }