{"id":16358937,"url":"https://github.com/lueschem/edi-var","last_synced_at":"2025-03-23T01:32:16.529Z","repository":{"id":114505183,"uuid":"286689747","full_name":"lueschem/edi-var","owner":"lueschem","description":"This repository contains an edi project configuration for Variscite system on modules (SOMs).","archived":false,"fork":false,"pushed_at":"2024-10-20T20:39:54.000Z","size":927,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-21T01:12:28.831Z","etag":null,"topics":["edi","variscite"],"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-08-11T08:33:21.000Z","updated_at":"2024-10-20T20:39:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"1d189e08-f145-45e2-b6cc-1694b37c9643","html_url":"https://github.com/lueschem/edi-var","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-var","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lueschem%2Fedi-var/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lueschem%2Fedi-var/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lueschem%2Fedi-var/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lueschem","download_url":"https://codeload.github.com/lueschem/edi-var/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221842086,"owners_count":16890106,"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":["edi","variscite"],"created_at":"2024-10-11T02:07:06.905Z","updated_at":"2024-10-28T14:43:54.028Z","avatar_url":"https://github.com/lueschem.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# edi Project Configuration for Variscite Boards\n\nThis [edi](https://www.get-edi.io) project configuration currently supports the\n[Variscite var-som-mx8m-nano](https://www.variscite.com/product/system-on-module-som/cortex-a53-krait/var-som-mx8m-nano-nxp-i-mx-8m-nano/)\non the [Symphony-Board](https://www.variscite.com/product/single-board-computers/symphony-board/).\n\n\u003cimg alt=\"var-som-mx8m-nano\" src=https://www.get-edi.io/assets/images/blog/VAR-SOM-MX8M-NANO.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** (e.g. no display, no sound) Debian trixie arm64 (64bit) image suitable for the Variscite var-som-mx8m-nano.\n* A matching Mender update artifacts 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-var 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-var.git\n```\n\nThe following steps assume that you are located within the project configuration directory:\n\n``` bash\ncd ~/edi-workspace/edi-var/\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 var-som-mx8m-nano.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\n``` bash\nsudo umount /dev/mmcblk0p?\nsudo dd if=artifacts/var-som-mx8m-nano.img of=/dev/mmcblk0 bs=4M conv=fsync status=progress\n```\n\nOnce you have booted the device using this SD card you can\naccess it using ssh (the access should be granted thanks to to your\nssh keys):\n\n``` bash\nssh variscite@IP_ADDRESS\n```\n\nThe password for the user _variscite_ is _variscite_ (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 SD card can also be flashed to the builtin eMMC as follows:\n\nCopy the image to the device that has been booted from the SD card:\n\n``` bash\nscp artifacts/var-som-mx8m-nano.img variscite@IP_ADDRESS:\n```\n\nAccess the device:\n\n``` bash\nssh variscite@IP_ADDRESS\n```\n\nFlash the image to the eMMC (**Everything on mmcblk2 will be erased!**):\n\n``` bash\nsudo dd if=var-som-mx8m-nano.img of=/dev/mmcblk2 bs=4M conv=fsync status=progress\n```\n\nNow you can switch the device off and toggle the \"BOOT SELECT\" switch from \"SD\" to \"INT\".\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 var-som-mx8m-nano-cross-dev.yml\n```\n\ndistrobox can be used to transform the image into a convenient development container:\n\n``` bash\nsource artifacts/var-som-mx8m-nano-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 Variscite hardware please take a look at the\n[official documentation](https://variwiki.com/index.php?title=Debian_Build_Release\u0026release=RELEASE_BULLSEYE_V1.0_VAR-SOM-MX8M-NANO).\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flueschem%2Fedi-var","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flueschem%2Fedi-var","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flueschem%2Fedi-var/lists"}