updated documentation on building and cleaned up the configs

This commit is contained in:
Izaya 2017-10-08 12:09:13 +11:00
parent 325e540905
commit 10ebeaefa9
5 changed files with 19 additions and 22 deletions

View File

@ -28,9 +28,7 @@ alias shutil.mkdir fs.mkdir
alias shutil.cp fs.cp
alias shutil.mv fs.mv
libwrap sha modules/lib/sha256.lua
modules/net/net-ext.lua
modules/applications/login.lua
modules/applications/genkernel.lua
fwrap lush exec/lush.lua
alias shell lush
fwrap skex exec/skex2.lua

View File

@ -26,7 +26,6 @@ alias shutil.mkdir fs.mkdir
alias shutil.cp fs.cp
alias shutil.mv fs.mv
modules/lib/sha256.lua
modules/net/net-ext.lua
modules/applications/login.lua
fwrap lush exec/lush.lua
alias shell lush

View File

@ -24,7 +24,6 @@ alias shutil.mkdir fs.mkdir
alias shutil.cp fs.cp
alias shutil.mv fs.mv
libwrap sha modules/lib/sha256.lua
modules/net/net-ext.lua
modules/applications/login.lua
fwrap shell exec/msh.lua
modules/applications/genkernel.lua

View File

@ -6,36 +6,35 @@
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` 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
### 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. Run genkernel()
### 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.
```
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
### genkernel.sh
genkernel.sh calls `genkernel.lua build.cfg`.
### genkernel.lua
Wrapper for modules/applications/genkernel.lua. Runs it with arguments.
### modules/applications/genkernel.lua
Both a PsychOS module and usable as a program.
#### genkernel(*bp*, *kn*)
Builds a kernel using the modules listed in *bp*, with \_OSNAME including *kn*.
You can then try loading the new kernel to check for errors:
```
=loadfile("out/everything.lua")
```
If there are no errors, it's probably safe to move it to your /boot/init.lua.

View File

@ -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.
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)).