made building.md suck less.

This commit is contained in:
Izaya 2017-09-06 18:47:08 +10:00
parent 5996ce4cbf
commit 7e98001172
1 changed files with 28 additions and 2 deletions

View File

@ -1,9 +1,35 @@
# Building PsychOS
## Building
## Building on \*nix systems
### 1. Obtain source.
```
git clone https://github.com/XeonSquared/PsychOS.git
```
### 2. Build source.
```
./genkernel.sh
```
Builds a kernel using files in `build.cfg` and saves it to `kernel.lua`
`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.
To change the modules included, modify build.cfg.
## Building on PsychOS
### 1. Obtain source and relevant software.
At present, the way to do this is "copy them onto the installation."
If genkernel() isn't included in your kernel you can run it as a program using luash's ! prefix.
### 2. Run genkernel()
```
genkernel("/boot/PsychOS/build.cfg","custom")
```
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.
## Files
### genkernel.sh
genkernel.sh calls `genkernel.lua build.cfg`.