LuPPC/README.md

48 lines
2.1 KiB
Markdown
Raw Permalink Normal View History

# LuPPC
Lua-based operating system, based on [LuPI2](https://github.com/Starchasers/LuPI2/), with a focus on PowerPC based Macintosh machines and an aim to support more OpenComputers-style components and mirror OpenComputers behavior more closely where practical.
2016-01-07 09:45:37 +11:00
2016-02-13 03:28:47 +11:00
Build
2016-01-22 09:44:28 +11:00
-----
2016-01-22 01:10:49 +11:00
1. Clone this repository
2. Get musl cross compiler (like arm-linux-musleabihf or powerpc-linux-musl), simplest way is to use [musl-cross-make](https://github.com/richfelker/musl-cross-make)
2016-02-13 03:28:47 +11:00
3. Get `xxd` utility (usually packaged with vim)
2016-02-24 08:05:42 +11:00
4. Build dependencies using scripts/dependencies.sh script for your platform(s)
2016-02-13 03:28:47 +11:00
5. Execute `make build`
2021-05-23 12:23:18 +10:00
6. You will need to put some OS to `root` directory where you run the binary. For now you can get PsychOS2 from the [PsychOS build server](https://oc.shadowkat.net/psychos/psychos.cpio)
2016-02-13 03:28:47 +11:00
In case of problems poke me/someone at #lupi on Freenode
2016-01-22 01:10:49 +11:00
2016-01-07 09:45:37 +11:00
Idea
-----
Design of system APIs is heavily influenced by [OpenComputers](https://github.com/MightyPirates/OpenComputers) minecraft mod. Some Lua code parts are
2016-02-13 03:28:47 +11:00
actually copied from there (all of the code is under the MIT License). Main advantage of the API is that it's event/component based, which provides great
2016-01-07 09:45:37 +11:00
level of abstraction. Custom components can be created and used with very little effort, being event-based simplifies code further, providing one unified
queue for events instead of multiple ways of handling them.
```lua
local component = require("component")
--Create virtual LED component using built-in GPIO component
local led = {}
led.toggle = function() component.gpio.togglePin(27) end
component.register(nil, "LED", led)
--Blink the LED
while true do
os.sleep(1)
component.led.toggle()
end
```
Implementation
-----
On the low-level side LuPI will run on very stripped-down version of Linux kernel as init, it will be the only binary executable in system. Kernel will
only provide hardware drivers and abstract some of the things. Entire userspace is meant to be done using Lua. Security isn't the primary goal but still
needs to be considered.
2016-01-22 09:44:28 +11:00
Get involved
-----
There are many ways you can help.
* Report issues
* Contribete via pull requests
* Talk on IRC (#lupi on Freenode)