{"id":17601142,"url":"https://github.com/jonaspfi/rpi4-os","last_synced_at":"2025-08-09T21:05:44.071Z","repository":{"id":258702254,"uuid":"864052831","full_name":"JonasPfi/rpi4-os","owner":"JonasPfi","description":"This project is a bare-metal OS for the Raspberry Pi 4.","archived":false,"fork":false,"pushed_at":"2025-03-13T00:01:26.000Z","size":69,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T07:49:17.731Z","etag":null,"topics":["bare-metal","raspberry-pi-4","scheduler","timer-interrupt"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JonasPfi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-09-27T12:04:03.000Z","updated_at":"2025-03-13T00:01:30.000Z","dependencies_parsed_at":"2024-10-22T17:33:27.559Z","dependency_job_id":"394125e8-0558-44a6-ba83-80d990ec178e","html_url":"https://github.com/JonasPfi/rpi4-os","commit_stats":null,"previous_names":["jonaspfi/rpi4-os"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonasPfi%2Frpi4-os","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonasPfi%2Frpi4-os/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonasPfi%2Frpi4-os/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonasPfi%2Frpi4-os/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonasPfi","download_url":"https://codeload.github.com/JonasPfi/rpi4-os/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666226,"owners_count":21624290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bare-metal","raspberry-pi-4","scheduler","timer-interrupt"],"created_at":"2024-10-22T12:08:45.499Z","updated_at":"2025-04-30T07:49:29.444Z","avatar_url":"https://github.com/JonasPfi.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rpi4-os\n\n# Build Instructions\n\nThis project uses a sh to automate the build process and generate the `kernel8.img` file. Follow the steps below to successfully compile the project:\n\n\n## Prerequisites\n\n1. **GCC Toolchain**: The Makefile uses the `aarch64-elf` cross-compiler. Ensure that this toolchain is installed.\n   - You can download the toolchain from the official [Arm website](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads).\n\n2. **ARMGNU Variable**: The Makefile defines the cross-compiler prefix with the `ARMGNU` variable. If your toolchain has a different prefix, adjust the `ARMGNU` variable in the Makefile:\n\n   ```makefile\n   ARMGNU ?= aarch64-elf\n   ```\n\nBy following these steps and adjusting the Makefile variables and paths as necessary, you should be able to compile and build your project successfully.\n\n## Build Command\n\nTo build the project, run the following command:\n\n```bash\n./build.sh\n```\n\n\n## UART Setup for Raspberry Pi 4\n\nTo enable UART communication on your Raspberry Pi 4, follow these steps to correctly connect the TTL-to-USB adapter to the Pi’s GPIO pins.\n\n#### 1. Pin Connections:\nUse the following GPIO pins on the Raspberry Pi 4 for UART:\n\n- **TX (Transmit)**: GPIO 14 (Pin 8)\n- **RX (Receive)**: GPIO 15 (Pin 10)\n- **GND (Ground)**: Pin 6\n\nNow, connect the TTL-to-USB adapter cables as follows:\n\n- **Adapter TX** (usually an green wire) → **Raspberry Pi RX** (GPIO 15, Pin 10)\n- **Adapter RX** (usually a white wire) → **Raspberry Pi TX** (GPIO 14, Pin 8)\n- **Adapter GND** (usually a black wire) → **Raspberry Pi GND** (Pin 6)\n\n#### 2. Enable UART on the Raspberry Pi 4:\nTo enable UART on the Pi, follow these steps:\n\n1. Edit the config.txt file on the sd card:\n\n2. Add the following lines to enable UART:\n\n   ```bash\n   enable_uart=1\n   enable_gic=1\n   hdmi_group=1\n   hdmi_mode=16\n   core_freq_min=500\n   ```\n\n#### 3. Use a Terminal Application:\nOnce connected, you can use a terminal application (like `Putty` on Windows or `minicom` on Linux) to interface with the Raspberry Pi via the UART connection. Ensure you set the baud rate to **115200**.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonaspfi%2Frpi4-os","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonaspfi%2Frpi4-os","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonaspfi%2Frpi4-os/lists"}