updated documentation on building and cleaned up the configs
This commit is contained in:
parent
325e540905
commit
10ebeaefa9
@ -28,9 +28,7 @@ alias shutil.mkdir fs.mkdir
|
|||||||
alias shutil.cp fs.cp
|
alias shutil.cp fs.cp
|
||||||
alias shutil.mv fs.mv
|
alias shutil.mv fs.mv
|
||||||
libwrap sha modules/lib/sha256.lua
|
libwrap sha modules/lib/sha256.lua
|
||||||
modules/net/net-ext.lua
|
|
||||||
modules/applications/login.lua
|
modules/applications/login.lua
|
||||||
modules/applications/genkernel.lua
|
|
||||||
fwrap lush exec/lush.lua
|
fwrap lush exec/lush.lua
|
||||||
alias shell lush
|
alias shell lush
|
||||||
fwrap skex exec/skex2.lua
|
fwrap skex exec/skex2.lua
|
||||||
|
@ -26,7 +26,6 @@ alias shutil.mkdir fs.mkdir
|
|||||||
alias shutil.cp fs.cp
|
alias shutil.cp fs.cp
|
||||||
alias shutil.mv fs.mv
|
alias shutil.mv fs.mv
|
||||||
modules/lib/sha256.lua
|
modules/lib/sha256.lua
|
||||||
modules/net/net-ext.lua
|
|
||||||
modules/applications/login.lua
|
modules/applications/login.lua
|
||||||
fwrap lush exec/lush.lua
|
fwrap lush exec/lush.lua
|
||||||
alias shell lush
|
alias shell lush
|
||||||
|
@ -24,7 +24,6 @@ alias shutil.mkdir fs.mkdir
|
|||||||
alias shutil.cp fs.cp
|
alias shutil.cp fs.cp
|
||||||
alias shutil.mv fs.mv
|
alias shutil.mv fs.mv
|
||||||
libwrap sha modules/lib/sha256.lua
|
libwrap sha modules/lib/sha256.lua
|
||||||
modules/net/net-ext.lua
|
|
||||||
modules/applications/login.lua
|
modules/applications/login.lua
|
||||||
fwrap shell exec/msh.lua
|
fwrap shell exec/msh.lua
|
||||||
modules/applications/genkernel.lua
|
modules/applications/genkernel.lua
|
||||||
|
@ -6,36 +6,35 @@
|
|||||||
git clone https://github.com/XeonSquared/PsychOS.git
|
git clone https://github.com/XeonSquared/PsychOS.git
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Build source.
|
### 2. Building on unix-like platforms
|
||||||
|
You'll need Lua installed. It will probably work with anything from 5.1 onwards, but PsychOS is developed against 5.2.
|
||||||
|
|
||||||
```
|
```
|
||||||
./genkernel.sh
|
./genkernel.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
`genkernel.sh` is a wrapper script for genkernel.lua which is a wrapper program for the genkernel module that is actually used to generate the code.
|
`genkernel.sh` is a wrapper script lmk that generates all the kernel configurations in config/ and places them in out/.
|
||||||
|
|
||||||
To change the modules included, modify build.cfg.
|
Naturally, you can modify the configuration files or add new ones to change the modules included.
|
||||||
|
|
||||||
## Building on PsychOS
|
## Building on PsychOS
|
||||||
### 1. Obtain source and relevant software.
|
### 1. Obtain source and relevant software.
|
||||||
At present, the way to do this is "copy them onto the installation."
|
**TODO: Write package recipes for the sources**
|
||||||
|
|
||||||
If genkernel() isn't included in your kernel you can run it as a program using luash's ! prefix.
|
### 2. Build with lmk
|
||||||
|
lmk is the Lua MaKe system used for PsychOS. The sources come with makefiles that you can use to generate a kernel.
|
||||||
### 2. Run genkernel()
|
|
||||||
|
|
||||||
```
|
```
|
||||||
genkernel("/boot/PsychOS/build.cfg","custom")
|
cd kernel_source_dir
|
||||||
|
lmk configs/everything.lua
|
||||||
```
|
```
|
||||||
|
|
||||||
This will generate a kernel from the files listed in /boot/PsychOS/build.cfg with "custom" as part of the kernel name and return the resulting kernel as a string. You can then write that string to a file or similar.
|
This will build the "everything" kernel. You can use a different configuration file if you want to generate another kernel.
|
||||||
|
|
||||||
## Files
|
You can then try loading the new kernel to check for errors:
|
||||||
### genkernel.sh
|
|
||||||
genkernel.sh calls `genkernel.lua build.cfg`.
|
```
|
||||||
### genkernel.lua
|
=loadfile("out/everything.lua")
|
||||||
Wrapper for modules/applications/genkernel.lua. Runs it with arguments.
|
```
|
||||||
### modules/applications/genkernel.lua
|
|
||||||
Both a PsychOS module and usable as a program.
|
If there are no errors, it's probably safe to move it to your /boot/init.lua.
|
||||||
#### genkernel(*bp*, *kn*)
|
|
||||||
Builds a kernel using the modules listed in *bp*, with \_OSNAME including *kn*.
|
|
||||||
|
@ -30,3 +30,5 @@ PsychOS is a multi-user cooperative multitasking operating system for OpenComput
|
|||||||
PsychOS has its [source code on GitHub](https://github.com/XeonSquared/PsychOS) and is open to pull requests, bug reports and other forms of contribution.
|
PsychOS has its [source code on GitHub](https://github.com/XeonSquared/PsychOS) and is open to pull requests, bug reports and other forms of contribution.
|
||||||
|
|
||||||
In addition, some [extra PsychOS related projects](https://git.shadowkat.net/izaya/psychos-programs) can be found on the [SKS Gogs](https://git.shadowkat.net) instance
|
In addition, some [extra PsychOS related projects](https://git.shadowkat.net/izaya/psychos-programs) can be found on the [SKS Gogs](https://git.shadowkat.net) instance
|
||||||
|
|
||||||
|
For support, discussion or general chat, you can use the [SKS IRC channel on EsperNet](irc://irc.esper.net/#SKS) ([webchat](https://webchat.esper.net/?channels=SKS)).
|
||||||
|
Loading…
Reference in New Issue
Block a user