{"id":16358936,"url":"https://github.com/lueschem/edi-cl","last_synced_at":"2025-03-21T00:31:39.167Z","repository":{"id":114504988,"uuid":"278179916","full_name":"lueschem/edi-cl","owner":"lueschem","description":"This repository contains an edi project configuration for Compulab embedded devices.","archived":false,"fork":false,"pushed_at":"2024-12-10T19:27:09.000Z","size":177,"stargazers_count":11,"open_issues_count":5,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-17T19:21:23.554Z","etag":null,"topics":["compulab","edi","iot-gate-imx8","mender"],"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":"2020-07-08T19:44:18.000Z","updated_at":"2025-03-10T04:55:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"ff7cce52-7da2-4f7d-8ddc-042d796aeb97","html_url":"https://github.com/lueschem/edi-cl","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/lueschem%2Fedi-cl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lueschem%2Fedi-cl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lueschem%2Fedi-cl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lueschem%2Fedi-cl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lueschem","download_url":"https://codeload.github.com/lueschem/edi-cl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717391,"owners_count":20498283,"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":["compulab","edi","iot-gate-imx8","mender"],"created_at":"2024-10-11T02:07:06.748Z","updated_at":"2025-03-21T00:31:38.902Z","avatar_url":"https://github.com/lueschem.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# edi Project Configuration for Compulab Devices\n\nThis [edi](https://www.get-edi.io) project configuration currently supports the\n[Compulab iot-gate-imx8](https://www.compulab.com/products/iot-gateways/iot-gate-imx8-industrial-arm-iot-gateway/).\n\n\u003cimg alt=\"Compulab iot-gate-imx8\" src=https://www.get-edi.io/assets/images/blog/IOT-GATE-iMX8.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 **minimal** Debian trixie arm64 (64bit) image suitable for the Compulab iot-gate-imx8.\n* A matching Mender update artifact for the above configuration.\n* A Podman/Docker image with a pre-installed cross development toolchain (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-cl 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-cl.git\n```\n\nThe following steps assume that you are located within the project configuration directory:\n\n``` bash\ncd ~/edi-workspace/edi-cl/\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 Target Image\n\nA target image can be created using the following command:\n\n``` bash\nedi -v project make iot-gate-imx8.yml\n```\n\nThe resulting image can be copied to a USB stick (here /dev/sda)\nusing the following command\n(**Please note that everything on the USB stick will be erased!**):\n\n``` bash\nsudo umount /dev/sda?\nsudo dd if=artifacts/iot-gate-imx8.img of=/dev/sda bs=4M conv=fsync status=progress\n```\n\n**Warning: The image requires u-boot version 2.0 or above!** Please follow the\n[Compulab instructions](https://mediawiki.compulab.com/w/index.php?title=IOT-GATE-iMX8_and_SBC-IOT-iMX8:_U-Boot:_Update)\nin case you need to upgrade the bootloader of your device.\n\nOnce you have booted the device using the above USB stick (plugged into the USB port\nnext to the power button) you can access it using ssh (the access should be granted\nthanks to to your ssh keys):\n\n``` bash\nssh compulab@IP_ADDRESS\n```\n\nThe password for the user _compulab_ is _compulab_ (just in case you want to\nexecute a command using `sudo` or login via a local terminal).\n\n### Flashing the Image to the eMMC\n\nThe same image that has been used for the USB stick can also be flashed to the builtin eMMC as follows:\n\nCopy the image to the device that has been booted from the USB stick:\n\n``` bash\nscp artifacts/iot-gate-imx8.img compulab@IP_ADDRESS:\n```\n\nAccess the device:\n\n``` bash\nssh compulab@IP_ADDRESS\n```\n\nFlash the image to the eMMC (**Everything on mmcblk2 will be erased!**):\n\n``` bash\nsudo dd if=iot-gate-imx8.img of=/dev/mmcblk2 bs=4M conv=fsync status=progress\n```\n\nNow you can remove the power supply and the USB stick from the device.\nWhen powering up the device again, it should boot the new image from the eMMC storage device.\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 iot-gate-imx8-cross-dev.yml\n```\n\ndistrobox can be used to transform the image into a convenient development container:\n\n``` bash\nsource artifacts/iot-gate-imx8-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\n\n``` bash\naarch64-linux-gnu-g++ ...\n```\n\nFor your convenience, the LXD container shares the folder _edi-workspace_\nwith the host operating system.\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 the Compulab device please take a look at the\n[official documentation](https://www.compulab.com/products/iot-gateways/iot-gate-imx8-industrial-arm-iot-gateway/).\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 please check the [docs folder of this project](docs/kernel_build.md).\n\nThe WiFi setup is [documented here](docs/wifi_setup.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flueschem%2Fedi-cl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flueschem%2Fedi-cl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flueschem%2Fedi-cl/lists"}