1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-11-30 14:18:06 +11:00
Zorya-NEO/mods/loader_fuchas/init.lua

34 lines
940 B
Lua
Raw Normal View History

2020-01-15 12:07:27 +11:00
local zy = krequire("zorya")
--zy.loadmod("vdev_biosdev")
local utils = krequire("utils")
local thd = krequire("thd")
--local vdev = krequire("zorya").loadmod("util_vdev")
local oefi = zy.loadmod("util_oefiv2")
local fuchas = {}
2020-03-06 23:47:12 +11:00
function fuchas:karg(key, value)
self.args[key] = value
end
function fuchas:boot()
thd.add("fuchas", function()
self.env.loadfile("Fuchas/Kernel/boot.lua")() --This is how we do.
computer.pushSignal("fuchas_dead")
end)
while true do if computer.pullSignal() == "fuchas_dead" then break end end
end
2020-03-16 03:43:42 +11:00
return function(addr)
2020-01-15 12:07:27 +11:00
--oefi.getExtensions().ZyNeo_ExecOEFIApp(addr, ".efi/fuchas.efi2", ...)
--We don't do that here.
2020-03-12 09:19:08 +11:00
local fuch = {}
2020-03-16 03:43:42 +11:00
fuch.args = {}
fuch.env = oefi.getExtensions().ZyNeo_GetOEFIEnv(addr)
fuch.env.computer.supportsOEFI = function()
2020-01-15 12:07:27 +11:00
return true
end
fuch.env.os_arguments = fuch.args
fuch.env.loadfile = fuch.env.oefi.loadfile
return setmetatable(fuch, {__index=fuchas})
end