Merge pull request 'init system changes' (#27) from 1.2-dev into main

Reviewed-on: #27
This commit was merged in pull request #27.
This commit is contained in:
Astronand committed 2026-10-06 10:06:08 -04:00
commit 91ff59b60c
12 files changed
+19 -21

No files matched your search

@@ -155,6 +155,9 @@ local function newtty(addr)
end,
gplt=function()
return plt
end,
gfx=function()
return false
end
}
if mode=="rw" then
+1 -1
View File
@@ -507,7 +507,7 @@ if kernel.status=="reboot" then
elseif kernel.status=="halt" then
kernel.log("System halted.")
kernel.saveLog()
while true do end
while true do EFI:yield() end
else
EFI.status="shutdown"
return true
@@ -694,7 +694,7 @@ function vfs.open(path, mode)
if disk:type(diskPath) ~= "directory" then
handle = disk:open(diskPath, mode)
if type(handle, true) ~= "table" then
error("ENFILE")
error("ENFILE".." KERR="..type(handle,true))
end
end
@@ -19,6 +19,17 @@ if not initFunc then kernel.PANIC("Failed to load init system: " .. err) end
kernel.tasks["1"] = {
coro = coroutine.create(function()
for i,v in pairs(kernel.processes) do
kernel.log("Spawning kernel task "..i)
syscall.spawn(function()
local status, err = pcall(v)
if not status then
kernel.log("Error executing kernel task '" .. i .. "': " .. err, "ERROR", 0xFF0000)
else
kernel.log("Successfully executed kernel task: " .. i)
end
end, i, nil,nil,nil,true)
end
local ok, err = xpcall(initFunc, debug.traceback, kernel)
if not ok then
kernel.panic("Init system crashed: " .. tostring(err))
-4
View File
@@ -1,4 +0,0 @@
local args={...}
syscall.remove("/sbin/init")
syscall.symlink("/usr/lib/sysinit/sysinit", "/sbin/init")
syscall.exec("/sbin/init", args)
-12
View File
@@ -5,18 +5,6 @@ kernel.saveLog()
local fs=require("fs")
kernel.log("Loaded fs")
for i,v in pairs(kernel.processes) do
kernel.log("Spawning kernel task "..i)
syscall.spawn(function()
local status, err = pcall(v)
if not status then
kernel.log("Error executing kernel task '" .. i .. "': " .. err, "ERROR", 0xFF0000)
else
kernel.log("Successfully executed kernel task: " .. i)
end
end, i, nil,nil,nil,true)
end
-- config file path setup
if not fs.exists("/etc/sysinit/") then
kernel.log("Creating conf path")
+1 -1
View File
@@ -8,6 +8,6 @@
],
"dependencies": [],
"version": "1.0.0",
"hash": "e7a2e5822cbf1e4e154014a3b4f97bb2",
"hash": "f2a112c3828345702e2c420f6bab6d5f",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-firmware-oc.tar.gz"
}
+1 -1
View File
@@ -8,6 +8,6 @@
],
"dependencies": [],
"version": "1.5.0",
"hash": "a72b269600fc4120ca93df599c519788",
"hash": "fda2d814a7c3cc1ec532175192101573",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/Hyperion-kernel.tar.gz"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -7,6 +7,6 @@
],
"dependencies": [],
"version": "1.1.0",
"hash": "8c4a3ffcf86326bb0c07338060bb7727",
"hash": "61dd459f48f7f8fabb6b649331d87886",
"tarball": "https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/packages/raw/sysinit.tar.gz"
}