mirror of
https://git.shadowkat.net/izaya/OC-PsychOS2.git
synced 2024-11-21 11:35:44 -05:00
update to match latest diskpart
This commit is contained in:
parent
2edbb42aa4
commit
c2bbd7d2ca
@ -6,19 +6,19 @@ A lightweight, multi-user operating system for OpenComputers
|
||||
|
||||
### The kernel
|
||||
|
||||
The kernel is composed of a number of modules, found in the *module/* directory. Which modules are included can be customised by changing the include statements in *module/init.lua*; copying it and customizing that is recommended, so you can *git pull* later without having to stash or reset your changes.
|
||||
The kernel is composed of a number of modules, found in the *module/* directory, as specified by a file in the *kcfg* directory, `base` by default. Which modules are included can be customised by changing the include statements in the kernel configuration file; copying it and customizing that is recommended, so you can *git pull* later without having to stash or reset your changes.
|
||||
|
||||
#### Unix-like systems
|
||||
|
||||
The kernel can be built using the preproc library and provided scripts:
|
||||
|
||||
lua build.lua module/init.lua kernel.lua
|
||||
lua build.lua kcfg/base.cfg kernel.lua
|
||||
|
||||
#### PsychOS
|
||||
|
||||
The kernel can be built from inside PsychOS using the preproc library, assuming you have the kernel source available:
|
||||
|
||||
preproc("module/init.lua","kernel.lua")
|
||||
preproc("kcfg/base.cfg","kernel.lua")
|
||||
|
||||
### The boot filesystem
|
||||
|
||||
@ -27,6 +27,7 @@ A boot filesystem contains several things:
|
||||
- The kernel, as init.lua
|
||||
- The lib/ directory, containing libraries
|
||||
- The service/ directory, containing system services
|
||||
- The exec/ directory, containing single-shot executable files
|
||||
|
||||
This has been automated in the form of build.sh, pending a real makefile.
|
||||
|
||||
|
@ -1 +1 @@
|
||||
{enabled={"getty","minitel"}}
|
||||
{enabled={"getty","minitel","fsmanager"}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
--#includepkglib "diskpart" "lib/part/mtpt.lua" "part/mtpt"
|
||||
--#includepkglib "diskpart" "lib/diskpart.lua" "diskpart"
|
||||
--#includepkglib "rtfs" "lib/rtfs.lua" "rtfs"
|
||||
do
|
||||
|
@ -1,3 +1,4 @@
|
||||
--#include "module/ocelot-debug.lua"
|
||||
do
|
||||
syslog = {}
|
||||
syslog.emergency = 0
|
||||
|
22
preproc.lua
22
preproc.lua
@ -60,7 +60,7 @@ end
|
||||
preproc.directives.include = preproc.preproc
|
||||
|
||||
function preproc.directives.includelib(file, name) -- string string -- string -- Returns a preprocessed inlined library
|
||||
return string.format("package.loaded.%s = (function()\n%s\nend)()", name, preproc.preproc(file))
|
||||
return string.format("package.loaded['%s'] = (function()\n%s\nend)()", name, preproc.preproc(file))
|
||||
end
|
||||
|
||||
function preproc.directives.includepkgfile(package, file)
|
||||
@ -79,27 +79,9 @@ function preproc.directives.includepkgfile(package, file)
|
||||
end
|
||||
|
||||
function preproc.directives.includepkglib(package, file, name) -- string string -- string -- Returns a preprocessed inlined library
|
||||
return string.format("package.loaded.%s = (function()\n%s\nend)()", name, preproc.directives.includepkgfile(package, file))
|
||||
return string.format("package.loaded['%s'] = (function()\n%s\nend)()", name, preproc.directives.includepkgfile(package, file))
|
||||
end
|
||||
|
||||
--[[
|
||||
function preproc.directives.includepkglib(package, file, name)
|
||||
if (_OSVERSION or ""):sub(1,7) == "PsychOS" then
|
||||
return preproc.directives.includelib(string.format("/pkg/%s", file), name)
|
||||
else
|
||||
for path in (os.getenv("PSYCHOSPACKAGES") or "../PsychOSPackages"):gmatch("[^:]+") do
|
||||
print(string.format("%s/%s/%s", path, package, file))
|
||||
local f = io.open(string.format("%s/%s/%s", path, package, file), "r")
|
||||
if f then
|
||||
f:close()
|
||||
return preproc.directives.includelib(string.format("%s/%s/%s", path, package, file), name)
|
||||
end
|
||||
end
|
||||
end
|
||||
error(string.format("unable to locate library %s from package %s", name, package))
|
||||
end
|
||||
]]
|
||||
|
||||
return setmetatable(preproc,{__call=function(_,...)
|
||||
local tA = {...}
|
||||
local out = table.remove(tA,#tA)
|
||||
|
Loading…
Reference in New Issue
Block a user