Giter Club home page Giter Club logo

arm-kernel's Introduction

===============================================================================
LancelOS arm-kernel
===============================================================================

Description:
-------------------------------------------------------------------------------
The goal is to write a simple ARM kernel for Raspberry (only Pi 2 for now but
it won't be too hard to port) in Zig.
I want to understand how my computer work and I like learning by doing.
This is not and will never be intended for any kind of production environment.

Features:
-------------------------------------------------------------------------------
[x] Boot
[x] UART Read/Write
[x] Kernel/Userspace memory separation
[x] "device file" model
[x] open, read, write, close syscalls (on char devices only)
[x] brk syscall, malloc/free in userspace
[x] Framebuffer Read/Write
[x] Virtual TTY with a home-made font :)
[ ] Keyboard
[ ] File system
[x] Multiple processes running at the same time, context switching
[ ] Non system-blocking syscalls
[ ] Pipe
[ ] Userspace shell
... Maybe more, don't know yet

Usage:
-------------------------------------------------------------------------------
You need to have the bare-metal ARM cross-assembly/link tools install
On Archlinux it's extra/arm-none-eabi-binutils

As well as the zig compiler and qemu if you want to test it on your machine.

You can build the kernel with:
	make

This will build the kernel to an ./init.bin file

To launch it in qemu:
	make qemu-screen

License:
-------------------------------------------------------------------------------
This project is licensed under the "THE GAME LICENSE"

Resources:
-------------------------------------------------------------------------------
https://wiki.osdev.org

https://developer.arm.com/documentation/ddi0595/2021-12/AArch32-Registers

@AsahiLina's explanation of CVE-2022-32947 is a very entertaining way to
understand page tables https://www.youtube.com/watch?v=hDek2cp0dmI

BROADCOM BCM2837 ARM Peripherals datasheet

https://linux-kernel-labs.github.io/refs/heads/master/index.html

https://www.kernel.org/doc/html/latest/index.html

arm-kernel's People

Contributors

lowczarc avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.