From 7e980011726dc280a92c109ff11797acd2ffb71f Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Wed, 6 Sep 2017 18:47:08 +1000 Subject: [PATCH] made building.md suck less. --- docs/building.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/docs/building.md b/docs/building.md index 4c9c9a2..309acb2 100644 --- a/docs/building.md +++ b/docs/building.md @@ -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`.