ooga booga i cant make my own boot script - chris

This commit is contained in:
2026-01-16 16:53:29 -05:00
parent df4823940d
commit 1b21c87654
4 changed files with 12 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
--:Minify:--
local BOOT_DRIVE_PATH="/$"
local BOOT_DRIVE_PATH=... or "/$"
---@diagnostic disable-next-line: undefined-global
local term = term
local os = os
@@ -65,7 +65,7 @@ end
-- Wrap all in xpcall to catch errors
local ok, err = xpcall(function()
local apis={}
local apis={BOOT_DRIVE_PATH=BOOT_DRIVE_PATH}
-- List of standard Lua globals
local lua = {

View File

@@ -1,6 +1,6 @@
--:Minify:--
sleep(1)
local BOOT_DRIVE_PATH="/$"
local BOOT_DRIVE_PATH=... or "/$"
-- 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
-- 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
os.shutdown = function()
os.shutdown = oldshutdown
return fn(table.unpack(args))
return fn(BOOT_DRIVE_PATH)
end
end
if debug then

View File

@@ -1,6 +1,6 @@
--:Minify:--
local apis = ({...})[1]
local BOOT_DRIVE_PATH="/$"
local BOOT_DRIVE_PATH=apis.BOOT_DRIVE_PATH or "/$"
local fs = apis.fs
local native = apis.peripheral
local peripheral = {}

7
tools/chrisBoot.lua Normal file
View 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()