{"id":24897269,"url":"https://github.com/markcwatson/rpi-os","last_synced_at":"2026-05-18T10:07:13.169Z","repository":{"id":139380835,"uuid":"582110366","full_name":"markCwatson/rpi-os","owner":"markCwatson","description":"A simple operating system for the Raspberry Pi 4 Model B","archived":false,"fork":false,"pushed_at":"2023-01-15T16:11:14.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T16:51:26.318Z","etag":null,"topics":["os","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markCwatson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-25T18:06:06.000Z","updated_at":"2023-11-18T19:58:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c3b1cc8-9c02-411e-aefb-7bc5c22145e8","html_url":"https://github.com/markCwatson/rpi-os","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markCwatson/rpi-os","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markCwatson%2Frpi-os","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markCwatson%2Frpi-os/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markCwatson%2Frpi-os/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markCwatson%2Frpi-os/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markCwatson","download_url":"https://codeload.github.com/markCwatson/rpi-os/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markCwatson%2Frpi-os/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33174091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["os","raspberry-pi"],"created_at":"2025-02-01T20:17:14.440Z","updated_at":"2026-05-18T10:07:13.154Z","avatar_url":"https://github.com/markCwatson.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![C/C++ CI](https://github.com/markCwatson/rpi-os/actions/workflows/c-cpp.yml/badge.svg?branch=main)](https://github.com/markCwatson/rpi-os/actions/workflows/c-cpp.yml)\n\n# rpi-os\n\nA simple hobby operating system for the Raspberry Pi 4 Model B which is based on the Broadcom BCM2711, a quad-core ARM Cortex-A72 (ARMv8) 64-bit System on Chip (SoC). This work-in-progress is meant to help me learn OS and Linux kernel/driver development.\n\n \n## Goals\nMy goals are to develop a simple operating system capable of the following functions:\n\n\u003col type=\"1\"\u003e\n\u003cli\u003eA simple Bash-like interface.\u003c/li\u003e\n\u003cli\u003eA file system.\u003c/li\u003e\n\u003cli\u003eSymmetric Multi-Processing utilizing all 4 ARM cores.\u003c/li\u003e\n\u003cli\u003eInternet connectivity via the ethernet connector on the RPi.\u003c/li\u003e\n\u003cli\u003eBasic web server functionality.\u003c/li\u003e\n\u003cli\u003eA very much simplified Linux-like kernel.\u003c/li\u003e\n\u003c/ol\u003e\n\n \n## Building\n\nI am using GitHub Actions to trigger builds when a change is pushed to the remote. However, I am also able to build locally. Instructions for obtaining the toolchain, installing it, and building with `make` are included below.\n \n### Installing Toolchain\nMy dev machine is x86_64 running Ubuntu Linux. The target is the ARM Cortex-A72 chip on the Rasberry Pi 4. Thus, the cross-compiler I am using (`aarch64-none-elf`) is included in a toolchain by ARM which can be found [here][ARM Tool]. \n \n\n```\nsudo apt update\n\nsudo apt -y upgrade\n\nsudo apt install curl\n\nARM_TOOLCHAIN_VERSION=$(curl -s https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads | grep -Po '\u003ch4\u003eVersion \\K.+(?=\u003c/h4\u003e)')\n\ncurl -Lo aarch64-none-elf.tar.xz \"https://developer.arm.com/-/media/Files/downloads/gnu/${ARM_TOOLCHAIN_VERSION}/binrel/arm-gnu-toolchain-${ARM_TOOLCHAIN_VERSION}-x86_64-aarch64-none-elf.tar.xz\"\n\nsudo mkdir /opt/gcc-arm\n\nsudo tar xf aarch64-none-elf.tar.xz --strip-components=1 -C /opt/gcc-arm\n\necho 'export PATH=$PATH:/opt/gcc-arm/bin' | sudo tee -a /etc/profile.d/aarch64-none-elf.sh\n\n```\n\nAlternatively, I have seen others use a GNU-based cross-compiler developed and maintained by [Ubuntu Core Developers][UCD], but I have not tried it.\n\n```\nsudo apt-get update\n\nsudo apt-get install gcc-aarch64-linux-gnu \n```\n \n### Invoke Make\n\nTo build, run the following commands inside the root of the project.\n\n```\nsource /etc/profile\n\nmake\n```\n\n \n## References\nThe following resources were used to various capacities:\n\n1. Tutorial by [Sergey Matyukevich][Sergey]. He uses a Raspberry Pi 3 Model B (with BCM2837 SoC) but does a great job at comparing to how things are implemented in Linux.\n\n2. Two tutorials by Rocky Pulley: one on [writing a bare-metal OS for the Raspberry Pi][Pulley1], which extends Sergey's work, and one on [OS dev using the Linux kernel][Pulley2].\n\n3. Tutorial by [Adam Greenwood-Byrne][Adam]. Adam extends Sergey's work to the Raspberry Pi 4.\n\n4. [OSDev.org][OSDev] has a lot of content related to OS development including a section on [writing a bare-metal OS for the Rasbperry Pi][OSDev-pi].\n\n5. [ARM's offical documentation][ARM Doc].\n\n6. [The ARMv8 architecture ref manual][ARMv8].\n\n7. [BCM2711 documentation][BCM2711].\n\n8. The [Write your own Operating System][Learn OS] YouTube channel.\n\n9. I always recommend [Miro Samek's][Miro] embeded systems programming course to anyone interested in embedded development.\n\n10. [Andre Leiradella][Andre] describes RPi stubs and the ARM boot protocol.\n\n11. ANother RPi3 bare-metal OS tutorial by [Zoltan Baldaszti][Zoltan].\n\n[ARM Tool]: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads\n[UCD]: https://packages.ubuntu.com/bionic/devel/gcc-aarch64-linux-gnu\n[Sergey]: https://github.com/s-matyukevich/raspberry-pi-os\n[Pulley1]: https://youtube.com/playlist?list=PLVxiWMqQvhg9FCteL7I0aohj1_YiUx1x8\n[Pulley2]: https://youtube.com/playlist?list=PLVxiWMqQvhg8ZisiOBLAVkhLOYCkzTst0\n[Adam]: https://github.com/isometimes/rpi4-osdev\n[OSDev]: https://wiki.osdev.org/Main_Page\n[ARM Doc]: https://developer.arm.com/documentation/den0024/a\n[ARMv8]: https://developer.arm.com/documentation/ddi0487/ca/\n[BCM2711]: https://datasheets.raspberrypi.com/bcm2711/bcm2711-peripherals.pdf\n[Learn OS]: https://www.youtube.com/@writeyourownoperatingsystem\n[Miro]: https://www.state-machine.com/video-course\n[Andre]: https://leiradel.github.io/2019/01/20/Raspberry-Pi-Stubs.html\n[Zoltan]: https://github.com/bztsrc/raspi3-tutorial\n[OSDev-pi]: https://wiki.osdev.org/Raspberry_Pi_Bare_Bones","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkcwatson%2Frpi-os","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkcwatson%2Frpi-os","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkcwatson%2Frpi-os/lists"}