mirror of
https://github.com/Adorable-Catgirl/Zorya-NEO.git
synced 2024-11-27 12:48:07 +11:00
Compare commits
No commits in common. "bc9617228f6f53b3112cfaaff2b0aca9cc6853f5" and "831d96de844af26180575b7b6c82db513c96a83a" have entirely different histories.
bc9617228f
...
831d96de84
@ -1,35 +0,0 @@
|
|||||||
-- cynosure loader --
|
|
||||||
local zy = krequire("zorya")
|
|
||||||
local utils = krequire("utils")
|
|
||||||
local thd = krequire("thd")
|
|
||||||
local vdev = krequire("util_vcomponent")
|
|
||||||
local function proxytable(t)
|
|
||||||
return setmetatable({}, {__index=function(self, i)
|
|
||||||
if (type(t[i]) == "table") then
|
|
||||||
self[i] = proxytable(t[i])
|
|
||||||
return rawget(self, i)
|
|
||||||
else
|
|
||||||
return t[i]
|
|
||||||
end
|
|
||||||
end})
|
|
||||||
end
|
|
||||||
local monolith_count = 0
|
|
||||||
return function(addr)
|
|
||||||
local fs = component.proxy(addr)
|
|
||||||
thd.add("cynosure$"..monolith_count, function()
|
|
||||||
local env = utils.make_env()
|
|
||||||
function env.computer.getBootAddress()
|
|
||||||
return addr
|
|
||||||
end
|
|
||||||
function env.computer.setBootAddress()end
|
|
||||||
local old_dl = utils.debug_log
|
|
||||||
load(utils.readfile(fs.address, fs.open("/boot/cynosure.lua")), "=/boot/cynosure.lua", "t", env)()
|
|
||||||
computer.pushSignal("cynosure_dead")
|
|
||||||
end)
|
|
||||||
while true do
|
|
||||||
if computer.pullSignal() == "cynosure_dead" then
|
|
||||||
utils.debug_log("Got signal.")
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,12 +0,0 @@
|
|||||||
local cfgadd = ...
|
|
||||||
local component = require("component")
|
|
||||||
for fs in component.list("filesystem") do
|
|
||||||
if component.invoke(fs, "exists", "/boot/cynosure.lua") then
|
|
||||||
print("Cynosure kernel discovered on " .. fs)
|
|
||||||
cfgadd(string.format([[
|
|
||||||
menu.add("Cynosure kernel on %s", function()
|
|
||||||
return loadmod("loader_cynosure")("%s")
|
|
||||||
end)
|
|
||||||
]], fs:sub(1,3), fs))
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user