{"id":15020555,"url":"https://github.com/lueschem/edi-pi","last_synced_at":"2025-04-10T00:18:19.359Z","repository":{"id":44571473,"uuid":"106961230","full_name":"lueschem/edi-pi","owner":"lueschem","description":"Debian tool chain and image generation for Raspberry Pi 2, 3, 4 and 5.","archived":false,"fork":false,"pushed_at":"2025-04-05T20:46:31.000Z","size":53311,"stargazers_count":54,"open_issues_count":2,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T00:18:08.406Z","etag":null,"topics":["ansible","arm64","buster","cross-compiler","debian","digital-twin","edi","image","lxd-container","mender","raspberry-pi","raspberry-pi-3","raspberry-pi-4","raspberry-pi-5","raspberry-pi-image","u-boot","ubuntu"],"latest_commit_sha":null,"homepage":"https://www.get-edi.io","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lueschem.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":"2017-10-14T20:40:05.000Z","updated_at":"2025-04-05T20:46:34.000Z","dependencies_parsed_at":"2023-02-12T00:46:08.045Z","dependency_job_id":"c43fe821-9e2d-47b7-8bde-22b7df4fc92a","html_url":"https://github.com/lueschem/edi-pi","commit_stats":{"total_commits":295,"total_committers":6,"mean_commits":"49.166666666666664","dds":0.07796610169491525,"last_synced_commit":"a210b6f19d199f0dfe0b644b18fb314b2cdbdfbf"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lueschem%2Fedi-pi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lueschem%2Fedi-pi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lueschem%2Fedi-pi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lueschem%2Fedi-pi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lueschem","download_url":"https://codeload.github.com/lueschem/edi-pi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131318,"owners_count":21052820,"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":["ansible","arm64","buster","cross-compiler","debian","digital-twin","edi","image","lxd-container","mender","raspberry-pi","raspberry-pi-3","raspberry-pi-4","raspberry-pi-5","raspberry-pi-image","u-boot","ubuntu"],"created_at":"2024-09-24T19:55:15.829Z","updated_at":"2025-04-10T00:18:19.323Z","avatar_url":"https://github.com/lueschem.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# edi Project Configuration for Raspberry Pi Devices\n\nDebian tool chain and image generation for the Raspberry Pi 2, 3, 4 and 5.\n\n\u003cimg alt=\"Raspberry Pi\" src=https://www.get-edi.io/assets/images/blog/pi-hardware.png width=\"75%\"/\u003e\n\n\u003e [!NOTE]\n\u003e The *master* branch is **experimental** and currently based on Debian *trixie*.\n\u003e To get the stable Debian *bookworm* configuration please check out the *debian_bookworm* branch.\n\n## Introduction\n\nThe edi configuration contained in this repository can be used to\ngenerate the following artifacts:\n\n* A Debian trixie arm64 (64bit) image suitable for the Raspberry Pi 3, 4 or 5.\n* A Debian trixie armhf (32bit) image suitable for the Raspberry Pi 2.\n* Matching Mender update artifacts for the above configurations.\n* A Podman/Docker image with a pre-installed cross development toolchains (armhf/arm64) for C and C++.\n\n## Basic Usage\n\n### Preparation\n\nPrior to using this edi project configuration you have to install\n[edi](https://www.get-edi.io) according to\n[this instructions](https://docs.get-edi.io/en/stable/getting_started_v2.html).\nPlease take a careful look at the \"Setting up ssh Keys\" section since you\nwill need a proper ssh key setup in order to access the\nthe target device using ssh.\n\nThe artifact generation requires some additional tools. On\nUbuntu 24.04 and newer those tools can be installed as follows:\n\n``` bash\nsudo apt install buildah containers-storage crun curl distrobox dosfstools e2fsprogs fakeroot genimage git mender-artifact mmdebstrap mtools parted python3-sphinx python3-testinfra podman rsync zerofree\n```\n\n### Cloning this Repository\n\nThe edi-pi project configuration contained in this git repository can be cloned as follows:\n\n``` bash\nmkdir -p ~/edi-workspace/ \u0026\u0026 cd ~/edi-workspace/\ngit clone --recursive https://github.com/lueschem/edi-pi.git\n```\n\nThe following steps assume that you are located within the project configuration directory:\n\n``` bash\ncd ~/edi-workspace/edi-pi/\n```\n\nIf the repository has already been cloned earlier, do not forget to update the submodules:\n\n``` bash\ngit submodule update --init\n```\n\n### Optional: Connecting to Mender\n\nTo enable over the air (OTA) updates, the generated images are configured\nto connect to [https://hosted.mender.io/](https://hosted.mender.io/).\nIn order to connect to your Mender tenant you have to provide your tenant token prior to building the images.\nThe tenant token can be added to `configuration/mender/mender.yml`. If you do not want to\nadd the tenant token to the version control system you can also copy `configuration/mender/mender.yml` to\n`configuration/mender/mender_custom.yml` and add the tenant token there.\n\n### Creating a Raspberry Pi Image\n\nA Raspberry Pi image can be created using the following command:\n\nFor Raspberry Pi 5, arm64:\n\n``` bash\nedi -v project make pi5.yml\n```\n\nFor Raspberry Pi 5, arm64, prepared for GitOps (git and Ansible preinstalled):\n\n``` bash\nedi -v project make pi5-gitops.yml\n```\n\nFor Raspberry Pi 4, arm64:\n\n``` bash\nedi -v project make pi4.yml\n```\n\nFor Raspberry Pi 4, arm64, prepared for GitOps (git and Ansible preinstalled):\n\n``` bash\nedi -v project make pi4-gitops.yml\n```\n\nFor Raspberry Pi 3, arm64:\n\n``` bash\nedi -v project make pi3.yml\n```\n\nFor Raspberry Pi 2, armhf:\n\n``` bash\nedi -v project make pi2.yml\n```\n\nThe resulting image can be copied to a SD card (here /dev/mmcblk0)\nusing the following command\n(**Please note that everything on the SD card will be erased!**):\n\nExample for Raspberry Pi 5, arm64:\n\n``` bash\nsudo umount /dev/mmcblk0p?\nsudo dd if=artifacts/pi5.img of=/dev/mmcblk0 bs=4M conv=fsync status=progress\n```\n\nOnce you have booted the Raspberry Pi using this SD card you can\naccess it using ssh (the access should be granted thanks to your\nssh keys):\n\n``` bash\nssh pi@IP_ADDRESS\n```\n\nThe password for the user _pi_ is _raspberry_ (just in case you want to\nexecute a command using `sudo` or login via a local terminal).\n\n### Creating a Cross Development Container\n\nA Podman image of a cross development container can be created using the\nfollowing command:\n\n``` bash\nedi -v project make pi-cross-dev.yml\n```\n\ndistrobox can be used to transform the image into a convenient development container:\n\n``` bash\nsource artifacts/pi-cross-dev_manifest\ndistrobox create --image ${podman_image} --name SOME_CONTAINER_NAME --init --unshare-all --additional-packages \"systemd libpam-systemd\"\n```\n\nFor all the development work the container can be entered as follows:\n\n``` bash\ndistrobox enter SOME_CONTAINER_NAME\n```\n\nYou can directly start to cross compile applications:\n\nFor the Raspberry Pi 3, 4 or 5, arm64:\n\n``` bash\naarch64-linux-gnu-g++ ...\n```\n\nFor the Raspberry Pi 2, armhf:\n\n``` bash\narm-linux-gnueabihf-g++\n```\n\n## Documenting an Artifact\n\nDuring the image build the documentation gets rendered to artifacts/CONFIGNAME_documentation\nas reStructuredText. The text files can be transformed into a nice pdf file with some\nadditional tools that need to be installed first:\n\n``` bash\nsudo apt install texlive-latex-recommended texlive-pictures texlive-latex-extra texlive-xetex latexmk\n```\n\nThen the pdf can be generated using the following commands:\n\n``` bash\ncd artifacts/CONFIGNAME_documentation\nmake PDFLATEX=xelatex latexpdf\nmake PDFLATEX=xelatex latexpdf\n```\n\n### More Information\n\nFor more information about this setup please read the [edi documentation](https://docs.get-edi.io) and\n[this blog post](https://www.get-edi.io/Rootless-Creation-of-Debian-OS-and-OCI-Images/).\n\nFor details about the Mender based robust update integration please refer to this\n[blog post](https://www.get-edi.io/Updating-a-Debian-Based-IoT-Fleet/).\n\nIf you are curious about the U-Boot bootloader setup please take a look at this\n[blog post](https://www.get-edi.io/Booting-Debian-with-U-Boot/).\n\nFor the kernel build instructions related to the Raspberry Pi 4 and 5 please check\n[this blog post](https://www.get-edi.io/Getting-Started-with-a-new-Embedded-System/).\n\nThe WiFi setup is [documented here](docs/wifi_setup.md).\n\nA GitOps example can be found [here](https://www.get-edi.io/Surprisingly-Easy-IoT-Device-Management/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flueschem%2Fedi-pi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flueschem%2Fedi-pi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flueschem%2Fedi-pi/lists"}