OC-PsychOS/docs/building.md

41 lines
1.1 KiB
Markdown
Raw Normal View History

# Building PsychOS
2017-09-06 18:47:08 +10:00
## Building on \*nix systems
### 1. Obtain source.
```
git clone https://github.com/XeonSquared/PsychOS.git
```
### 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.
2017-09-06 18:47:08 +10:00
```
./genkernel.sh
```
2017-09-06 18:47:08 +10:00
`genkernel.sh` is a wrapper script lmk that generates all the kernel configurations in config/ and places them in out/.
2017-09-06 18:47:08 +10:00
Naturally, you can modify the configuration files or add new ones to change the modules included.
2017-09-06 18:47:08 +10:00
## Building on PsychOS
### 1. Obtain source and relevant software.
**TODO: Write package recipes for the sources**
2017-09-06 18:47:08 +10:00
### 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.
2017-09-06 18:47:08 +10:00
```
cd kernel_source_dir
lmk configs/everything.lua
2017-09-06 18:47:08 +10:00
```
This will build the "everything" kernel. You can use a different configuration file if you want to generate another kernel.
You can then try loading the new kernel to check for errors:
```
=loadfile("out/everything.lua")
```
2017-09-06 18:47:08 +10:00
If there are no errors, it's probably safe to move it to your /boot/init.lua.