`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.