Skip to content

๐ŸŽ›๏ธ | Sokhibjon's ARM RaspberryPi Kernel

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
license-apache
MIT
license-mit
Notifications You must be signed in to change notification settings

kibertexnik/sark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

38 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Kibertexnik's {Sark}

Minimal embedded monolith kernel for Raspberry Pi boards.

Top Used Language Test CI

About

After attempting to strip down Linux kernel to remove any unnecessary driver & support and achieve minimal size and performant Linux kernel, another motivation to write own kernel was born as a research & experiment done afterwork. The main purpose of the project is to attempt to ship embed software right into kernel itself, so it's native and booting kernel will run everything necessary.

This project doesn't accept PRs as it's very immature and not well shaped yet. This project is just an experiment conducted in Kibertexnik and maintained by @orzklv himself.

Features

  • Written on Rust
  • Monolith model
  • Raspberry 3, 4, 5
  • Conditional targetting
  • Embedded software/product

Development

Prerequisites

Setting up Rust embedded toolchain is a bit of tidious proceses. Therefore, a few prerequisite software should be installed before you start working with the project.

Nix / Nix-less

If you have Nix package manager installed on your machine or your Linux distribution happens to be NixOS, then you're partially ready to go just by executing (I've already done the dirtiest job part for you):

nix develop -c $SHELL

If you don't have Nix package manager installed machine and you want to do everything imperative way, just open shell.nix:17-45 and install whatever software inside this array. After doing so, you need to install nightly version of Rust programming language toolchain with the exact version stated in rust-toolchain.toml. Also, don't forget to install target specific standard library "rust-src" and components as stated in toolchain file. I don't know what operating system you do use, so you gotta figure out yourself how to get these installed, my responsibility ends at provoding full Nix & Docker dev container support.

Docker / Development Image

Make sure to have docker installed on your computer to be able to run development container which will help you to utilize ARM embedded tooling. Well, I'm not going to teach you how to install docker on your PC, you're free to google it. Just make sure it is installed and running on background. I tried my best to create the dev env entirely on Nix, but imperative nature of Arm LLC won't let me do so.

After the installation process, you need to decide whether will you build the devkit image from scratch (recommended if you have couple CPU cores biting dust in the corner) or fetch daily built image from our registry.

If you decide to fetch pre-built image:

docker pull ghcr.io/kibertexnik/sark-dev:main

If you decide to build image locally from scratch:

cd ./.github/docker && make local

Development Environment

Now when you're done with setting up all necessary stuff to proceed with development, a few things you should know:

Commands

I wrote a huge ass Makefile to simplify environment & args settings. You can execute:

  • make test - Run tests to make sure correct kernel behavior
  • make qemu - Compiling & running compiled image on qemu emulator
  • make clippy - Linting rust codebase with clippy
  • make clean - Clean up compiled ojbects and binaries
  • make readelf - Parse and show ELF header metatags
  • make objdump - Explore binary's assembly instruction sets
  • make doc - Open developer documentation (mostly from author)
  • make nm - Explore binary's command sequence

Makefile

There are few properties that can be set to change compilation behavior. Let's start with:

  • BSP - this property is used to specify the geneartion of raspberry's board to which compiler will compile for and emulate images on. Refer to for more
  • SERIAL - specify whether the emulated environment should show assembly of running image or serial outputs. Refer to for more
  • DOCKER - use only docker or nix environment in all commands. [WIP]

Developer documentation

There are also some developer/maintainer written documentation acrosos all codebases which can be accessed either by running make doc or opening https://kibertexnik.github.io/sark.

License

This project is licensed under dual licensing as the Apache-2.0 and MIT License - see the LICENSE-APACHE or LICENSE-MIT file for details.

Kibertexnik's {Sark}

About

๐ŸŽ›๏ธ | Sokhibjon's ARM RaspberryPi Kernel

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
license-apache
MIT
license-mit

Stars

Watchers

Forks

Releases

No releases published

Packages