diff --git a/configs/everything.cfg b/configs/everything.cfg index bf4bce3..4e4ce77 100755 --- a/configs/everything.cfg +++ b/configs/everything.cfg @@ -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 diff --git a/configs/headless.cfg b/configs/headless.cfg index ac78bf5..bde71d7 100755 --- a/configs/headless.cfg +++ b/configs/headless.cfg @@ -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 diff --git a/configs/minimal.cfg b/configs/minimal.cfg index 2423332..bb50be2 100755 --- a/configs/minimal.cfg +++ b/configs/minimal.cfg @@ -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 diff --git a/docs/building.md b/docs/building.md index 309acb2..5f102b4 100644 --- a/docs/building.md +++ b/docs/building.md @@ -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. diff --git a/docs/index.md b/docs/index.md index 459886e..3ab7f67 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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)).