forked from Hyperion/HyperionOS
ooga booga i cant make my own boot script - chris
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
--:Minify:--
|
--:Minify:--
|
||||||
local BOOT_DRIVE_PATH="/$"
|
local BOOT_DRIVE_PATH=... or "/$"
|
||||||
---@diagnostic disable-next-line: undefined-global
|
---@diagnostic disable-next-line: undefined-global
|
||||||
local term = term
|
local term = term
|
||||||
local os = os
|
local os = os
|
||||||
@@ -65,7 +65,7 @@ end
|
|||||||
|
|
||||||
-- Wrap all in xpcall to catch errors
|
-- Wrap all in xpcall to catch errors
|
||||||
local ok, err = xpcall(function()
|
local ok, err = xpcall(function()
|
||||||
local apis={}
|
local apis={BOOT_DRIVE_PATH=BOOT_DRIVE_PATH}
|
||||||
|
|
||||||
-- List of standard Lua globals
|
-- List of standard Lua globals
|
||||||
local lua = {
|
local lua = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--:Minify:--
|
--:Minify:--
|
||||||
sleep(1)
|
sleep(1)
|
||||||
local BOOT_DRIVE_PATH="/$"
|
local BOOT_DRIVE_PATH=... or "/$"
|
||||||
-- UnBIOS by JackMacWindows
|
-- UnBIOS by JackMacWindows
|
||||||
-- This will undo most of the changes/additions made in the BIOS, but some things may remain wrapped if `debug` is unavailable
|
-- This will undo most of the changes/additions made in the BIOS, but some things may remain wrapped if `debug` is unavailable
|
||||||
-- To use, just place a `bios.lua` in the root of the drive, and run this program
|
-- To use, just place a `bios.lua` in the root of the drive, and run this program
|
||||||
@@ -88,7 +88,7 @@ function _G.term.native()
|
|||||||
local oldshutdown = os.shutdown
|
local oldshutdown = os.shutdown
|
||||||
os.shutdown = function()
|
os.shutdown = function()
|
||||||
os.shutdown = oldshutdown
|
os.shutdown = oldshutdown
|
||||||
return fn(table.unpack(args))
|
return fn(BOOT_DRIVE_PATH)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if debug then
|
if debug then
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--:Minify:--
|
--:Minify:--
|
||||||
local apis = ({...})[1]
|
local apis = ({...})[1]
|
||||||
local BOOT_DRIVE_PATH="/$"
|
local BOOT_DRIVE_PATH=apis.BOOT_DRIVE_PATH or "/$"
|
||||||
local fs = apis.fs
|
local fs = apis.fs
|
||||||
local native = apis.peripheral
|
local native = apis.peripheral
|
||||||
local peripheral = {}
|
local peripheral = {}
|
||||||
|
|||||||
7
tools/chrisBoot.lua
Normal file
7
tools/chrisBoot.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
local file = fs.open("/disk/boot/cct/eeprom")
|
||||||
|
local text = file.readAll()
|
||||||
|
file.close()
|
||||||
|
|
||||||
|
local func = load(text, "@bios.lua")
|
||||||
|
|
||||||
|
func()
|
||||||
Reference in New Issue
Block a user