This edi project configuration currently supports the Compulab iot-gate-imx8 as well as the Compulab iot-din-imx8plus device.
Note
The master branch is currently based on Debian trixie. To get the Debian bookworm configuration, please check out the debian_bookworm branch.
The edi configuration contained in this repository can be used to generate the following artifacts:
- Minimal Debian trixie arm64 (64bit) images suitable for the Compulab iot-gate-imx8 or iot-din-imx8plus.
- Matching Mender update artifacts for the above configurations.
- A Podman/Docker image with a pre-installed cross development toolchain (arm64) for C and C++.
Note
The iot-din-imx8plus images do currently not include scripts that are required for operating the I/O extension modules. If those scripts are required for your project, please consider fetching them from this repository and adding them to the image.
Prior to using this edi project configuration you have to install edi according to this instructions. Please take a careful look at the "Setting up ssh Keys" section since you will need a proper ssh key setup to access the target device using ssh.
The artifact generation requires some additional tools. On Ubuntu 24.04 and newer, those tools can be installed as follows:
sudo apt install buildah containers-storage crun curl distrobox dosfstools e2fsprogs fakeroot genimage git mender-artifact mmdebstrap mtools parted python3-sphinx python3-testinfra podman rsync zerofreeThe edi-cl project configuration contained in this git repository can be cloned as follows:
mkdir -p ~/edi-workspace/ && cd ~/edi-workspace/
git clone --recursive https://github.com/lueschem/edi-cl.gitThe following steps assume that you are located within the project configuration directory:
cd ~/edi-workspace/edi-cl/If the repository has already been cloned earlier, remember to update the submodules:
git submodule update --initTo enable over the air (OTA) updates, the generated images are configured
to connect to https://hosted.mender.io/.
To connect to your Mender tenant, you have to provide your tenant token before building the images.
The tenant token can be added to configuration/mender/mender.yml. If you do not want to
add the tenant token to the version control system you can also copy configuration/mender/mender.yml to
configuration/mender/mender_custom.yml and add the tenant token there.
A target image can be created using the following command:
For the iot-gate-imx8 device:
edi -v project make iot-gate-imx8.ymlFor the iot-din-imx8plus device:
edi -v project make iot-din-imx8plus.ymlThe resulting image can be copied to a USB stick (here /dev/sda) using the following command (Please note that everything on the USB stick will be erased!):
For the iot-gate-imx8 device:
sudo umount /dev/sda?
sudo dd if=artifacts/iot-gate-imx8.img of=/dev/sda bs=4M conv=fsync status=progressFor the iot-din-imx8plus device:
sudo umount /dev/sda?
sudo dd if=artifacts/iot-din-imx8plus.img of=/dev/sda bs=4M conv=fsync status=progressWarning (iot-gate-imx8): The image requires u-boot version 2.0 or above! Please follow the Compulab instructions in case you need to upgrade the bootloader of your device.
Once you have booted the device using the above USB stick (plugged into the USB port (iot-gate-imx8: USB port next to the power button)), you can access it using ssh (the access should be granted thanks to to your ssh keys):
ssh compulab@IP_ADDRESSThe password for the user compulab is compulab (just in case you want to
execute a command using sudo or login via a local terminal).
The same image that has been used for the USB stick can also be flashed to the builtin eMMC as follows:
Copy the image to the device that has been booted from the USB stick:
For the iot-gate-imx8 device:
scp artifacts/iot-gate-imx8.img compulab@IP_ADDRESS:For the iot-din-imx8plus device:
scp artifacts/iot-din-imx8plus.img compulab@IP_ADDRESS:Access the device:
ssh compulab@IP_ADDRESSFlash the image to the eMMC (Everything on mmcblk2 will be erased!):
For the iot-gate-imx8 device:
sudo dd if=iot-gate-imx8.img of=/dev/mmcblk2 bs=4M conv=fsync status=progressFor the iot-din-imx8plus device:
sudo dd if=iot-din-imx8plus.img of=/dev/mmcblk2 bs=4M conv=fsync status=progressNow you can remove the power supply and the USB stick from the device. When powering up the device again, it should boot the new image from the eMMC storage device.
A Podman image of a cross development container can be created using the following command:
edi -v project make iot-gate-imx8-cross-dev.ymldistrobox can be used to transform the image into a convenient development container:
source artifacts/iot-gate-imx8-cross-dev_manifest
distrobox create --image ${podman_image} --name SOME_CONTAINER_NAME --init --unshare-all --additional-packages "systemd libpam-systemd"For all the development work the container can be entered as follows:
distrobox enter SOME_CONTAINER_NAMEYou can directly start to cross compile applications:
aarch64-linux-gnu-g++ ...For your convenience, the LXD container shares the folder edi-workspace with the host operating system.
During the image build the documentation gets rendered to artifacts/CONFIGNAME_documentation as reStructuredText. The text files can be transformed into a nice pdf file with some additional tools that need to be installed first:
sudo apt install texlive-latex-recommended texlive-pictures texlive-latex-extra texlive-xetex latexmkThen the pdf can be generated using the following commands:
cd artifacts/CONFIGNAME_documentation
make PDFLATEX=xelatex latexpdf
make PDFLATEX=xelatex latexpdfFor more information about the Compulab device please take a look at the official documentation.
For more information about this setup please read the edi documentation and this blog post.
For details about the Mender based robust update integration please refer to this blog post.
If you are curious about the U-Boot bootloader setup please take a look at this blog post.
For the kernel build instructions please check the docs folder of this project.
The WiFi setup is documented here.