Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/penguin-spy/kernelua
Rasberry Pi kernel written in C that allows running Lua as an OS. Created to run ComputerCraft's CraftOS on real hardware.
https://github.com/penguin-spy/kernelua
computercraft lua raspberry-pi
Last synced: about 1 month ago
JSON representation
Rasberry Pi kernel written in C that allows running Lua as an OS. Created to run ComputerCraft's CraftOS on real hardware.
- Host: GitHub
- URL: https://github.com/penguin-spy/kernelua
- Owner: Penguin-Spy
- License: mit
- Created: 2021-08-01T07:02:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-17T06:45:05.000Z (4 months ago)
- Last Synced: 2024-11-09T03:46:14.353Z (3 months ago)
- Topics: computercraft, lua, raspberry-pi
- Language: C
- Homepage:
- Size: 966 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![clones](https://img.shields.io/endpoint?url=https%3A%2F%2Fgithubstats.penguinspy.repl.co%2Fshields%2Fkernelua)
![top language](https://img.shields.io/github/languages/top/Penguin-Spy/kernelua)
![latest commit](https://img.shields.io/github/last-commit/Penguin-Spy/kernelua?label=latest%20commit)
# Kernelua
> Pronounced "`Kernel-lua`" (as one word), capitalized as a noun. `Lua` by itself has a capital `L`: http://www.lua.org/about.html#name.Kernelua is a Rasberry Pi kernel written in C that allows running Lua as the operating system of a device. The primary goal is to run ComputerCraft's CraftOS on real hardware (ideally in a Pocket Computer enclosure).
This project is based on the valvers.com tutorial, check it out: https://www.valvers.com/open-software/raspberry-pi/bare-metal-programming-in-c-part-1.
It also makes use of USPi, a bare-metal USB driver for the RPi 1-3: https://github.com/rsta2/uspi (very cool).# Installing
Kernelua is not ready for production use yet, so to run it you must create a bootable SD card image manually.
The SD card must contain `bootcode.bin`, `fixup.dat`, and `start.elf` from the Rasberry Pi repo: https://github.com/raspberrypi/firmware, and the `kernel.img` created by building this project (output in `build/bin`, see #Compiling below).Additionally, I had to add a `config.txt` with the following contents to fix some weird margins with my display:
```
disable_overscan=1
```
The firmware will still properly boot without this file present, at least on my RPi3B+, it just caused the display to appear blurry which completly ruined the point of using an 8x8 pixel font.# Compiling
Kernelua is built using GNU make (unlike the tutorial which uses Cmake), so compiling is about as simple as running `make`.
However, you must first download the ARM compiler from the Arm website: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads and extract it to `compiler/gcc-arm-none-eabi-VERSION/`.
I only own a Rasberry Pi 3B+, and currently the build system only sets the proper flags for this model. If you have a different model, uhh look at the makefile and have fun :) Also if u use VS Code add the flags to the C/C++ extension settings so it doesn't yell at you.