{"id":13577759,"url":"https://github.com/HesselM/rpicross_notes","last_synced_at":"2025-04-05T15:31:24.998Z","repository":{"id":94585264,"uuid":"84536084","full_name":"HesselM/rpicross_notes","owner":"HesselM","description":"Guide to Cross Compiling on a Raspberry Pi","archived":false,"fork":false,"pushed_at":"2021-12-11T20:15:52.000Z","size":587,"stargazers_count":59,"open_issues_count":4,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-05T15:47:48.230Z","etag":null,"topics":["c-plus-plus","cmake","cross-platform","example-project","guide","opencv","python","raspberry-pi","ros","rpi","toolchain","virtualbox"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HesselM.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}},"created_at":"2017-03-10T08:14:08.000Z","updated_at":"2024-04-04T19:19:45.000Z","dependencies_parsed_at":"2023-03-06T21:30:31.117Z","dependency_job_id":null,"html_url":"https://github.com/HesselM/rpicross_notes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HesselM%2Frpicross_notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HesselM%2Frpicross_notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HesselM%2Frpicross_notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HesselM%2Frpicross_notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HesselM","download_url":"https://codeload.github.com/HesselM/rpicross_notes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247358697,"owners_count":20926271,"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":["c-plus-plus","cmake","cross-platform","example-project","guide","opencv","python","raspberry-pi","ros","rpi","toolchain","virtualbox"],"created_at":"2024-08-01T15:01:24.125Z","updated_at":"2025-04-05T15:31:24.048Z","avatar_url":"https://github.com/HesselM.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Guide to Cross Compilation for a Raspberry Pi\n\n1. **\u003e [Start](readme.md)**\n1. [Setup XCS and RPi](01-setup.md)\n1. [Setup RPi Network and SSH](02-network.md)\n1. [Setup RPi Peripherals](03-peripherals.md)\n1. [Setup Cross-compile environment](04-xc-setup.md)\n1. [Cross-compile and Install Userland](05-xc-userland.md)\n1. [Cross-compile and Install OpenCV](06-xc-opencv.md)\n1. [Cross-compile and Install ROS](07-xc-ros.md)\n1. [Compile and Install OpenCV](08-native-opencv.md)\n1. [Compile and Install ROS](09-native-ros.md)\n1. [Remote ROS (RPi node and XCS master)](10-ros-remote.md)\n1. [ROS package development (RPi/XCS)](11-ros-dev.md)\n1. [Compile and Install WiringPi](12-wiringpi.md)\n\n# 1. Start\n\nWelcome at this Cross Compilation Guide for a Raspberry Pi.\n\nThis repository started as a personal guide to keep track of how to setup a proper cross-compilation system, but grew to a public guide, where it hopefully can help many others too. It also contains toolchains and scripts to ease the cross-compilation process as well as examples and tests to verify the setup.\n\nThe system is build within a VirtualBox running an Ubuntu OS. This VirtualBox holds all tools for the cross-compilation. A VirtualBox is chosen to ensure that we cannot mess up the main machine with faulty (library) installations or accidentally changing system-critical symbolic links (which happened to me on earlier journeys).\n\nDuring this guide the following systems will be configured, (cross)compiled and installed:\n- [Userland](https://github.com/raspberrypi/userland)\n- [OpenCV](http://opencv.org/) (with GTK and Python Bindings)\n- [ROS](http://www.ros.org/) (with Python Bindings)\n- [WiringPi](http://wiringpi.com)\n\nAdditionally we setup:\n- headless VirtualBox, locally accessible via SSH.\n- headless Pi (you do not need an additional monitor or keyboard for the pi!).\n- DNS and folder sharing of the VirtualBox with the Host.\n- Wifi and SSH access on the Raspberry Pi.\n- SSH over USB to connect to the Pi when there is no WiFi.\n- Peripherals such as: i2c, RTC, IO expanders and the Pi Camera.\n- Different ROS configurations.\n- and more!\n\nTo use this guide, experience with VirtualBox, C, Python and the terminal/nano are assumed. You also need a Raspberry Pi and SDCard-reader (as we'll initially configure the Pi via the SDCard, connected to the VirtualBox).\n\n# How to Read?\n\nThe notes are in chronological order and can be followed with the table of contents on the [top of the page](#guide-to-cross-compilation-for-a-raspberry-pi).\nAs both the VirtualBox and Raspberry Pi will be configured to run headless (that is, without a display) instructions are command-line styled. These instructions are prefixed with identifiers, as we use 3 different systems (Host, XCS and RPI):\n\n- `HOST~$` commands executed on the Host. (This guide is developed on an OSX system, but probably works on Linux or Windows with MinGW or PuTTy too).\n- `XCS~$` commands executed on the Cross-Compilation Server / VirtualBox. (Also called XCS)\n- `RPI~$` commands executed on the Raspberry Pi. (Shortened as RPi)\n\nIn the [github-repo](https://github.com/HesselM/rpicross_notes) three important folders can be found:\n\n- \"hello\" - containing examples and test files:\n  - pi: to test the cross-compile setup.\n      \u003e  Hello World!\n  - raspicam: to test the cross-compiled Userland setup.\n      \u003e Snapping a picture with the PiCamera with a self-compiled version of \"raspivid\"\n  - ocv: to test the cross-compiled OpenCV infrastructure.\n      \u003e Displaying a picture via the OpenCV calls `imread` and `imshow`.\n  - ros: to test the cross-compiled ROS setup.\n      \u003e Running `roscore` and `roscomm `on the Pi, printing \"Hello World\"\n  - WiringPi: to test the cross-compiled WiringPi setup.\n      \u003e Blinking a Led.\n- \"scripts\" - containing several synchronisation tools\n- \"ros\" - more complex tests for more complex ROS setups.\n\nIn the main directory you can also find the toolchain which will be used throughout this guide.\n\nIf you encounter problems or see mistakes, feel free to create an [issue](https://github.com/HesselM/rpicross_notes/issues/new) or [pull request](https://github.com/HesselM/rpicross_notes/compare).\n\nEnjoy!\nHessel.\n\nPS. This guide is also available at https://hesselm.github.io/rpicross_notes/.\n\nPPS. Special thanks to: [RaymondKirk](https://github.com/RaymondKirk), [ConnorChristie](https://github.com/ConnorChristie), [Skammi](https://github.com/Skammi), [compyl118](https://github.com/compyl118) for suggestions, fixes, testing and helping out.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHesselM%2Frpicross_notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHesselM%2Frpicross_notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHesselM%2Frpicross_notes/lists"}