testing version of LuaBIOS and OpenOS

people were having issues getting them to work so now we promote consistency
This commit is contained in:
2025-06-28 20:41:49 +02:00
parent 8210e20939
commit 687cfebd00
182 changed files with 14016 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
local component = require("component")
local shell = require("shell")
local args = shell.parse(...)
if #args == 0 then
io.write("Usage: primary <type> [<address>]\n")
io.write("Note that the address may be abbreviated.\n")
return 1
end
local componentType = args[1]
if #args > 1 then
local address = args[2]
if not component.get(address) then
io.stderr:write("no component with this address\n")
return 1
else
component.setPrimary(componentType, address)
os.sleep(0.1) -- allow signals to be processed
end
end
if component.isAvailable(componentType) then
io.write(component.getPrimary(componentType).address, "\n")
else
io.stderr:write("no primary component for this type\n")
return 1
end