Run Fails on Nwe Verdin iMX95 Mallow Board

Hardware:

  • Verdin iMX95
  • Mallow Carrier Board

Host: Ubuntu 22.04, x86_64

For the Quickstart Guide i receive error by the Create, Build and Deploy your Application section.

Hier ist the error:

Task wird ausgeführt: DOCKER_HOST= docker compose build --pull --build-arg SSHUSERNAME=torizon --build-arg APP_ROOT=/home/torizon/app --build-arg IMAGE_ARCH=arm64 --build-arg DEBUG_SSH_PORT=2231 --build-arg GPU=-imx95 test1-debug

WARN[0000] The “DOCKER_LOGIN” variable is not set. Defaulting to a blank string.[+] Building 1.8s (6/12)=> [internal] load local bake definitions                                                                                               0.0s=> => reading from stdin 730B                                                                                                           0.0s=> [internal] load build definition from Dockerfile.debug                                                                               0.0s=> => transferring dockerfile: 4.08kB                                                                                                   0.0s=> [internal] load metadata for docker.io/torizon/wayland-base-imx95:4                                                                  1.2s=> [internal] load .dockerignore                                                                                                        0.0s=> => transferring context: 56B                                                                                                         0.0s=> CACHED [1/8] FROM docker.io/torizon/wayland-base-imx95:4@sha256:2dcda035ea63b4a3355397270c7743fb7850c61a2af280781a1b36c80f1fa009     0.1s=> => resolve docker.io/torizon/wayland-base-imx95:4@sha256:2dcda035ea63b4a3355397270c7743fb7850c61a2af280781a1b36c80f1fa009            0.0s=> ERROR [2/8] RUN apt-get -q -y update &&         if [ “-imx95” = “-vivante” ] || [ “-imx95” = “-imx8” ]; then             apt-get -q  0.3s

[2/8] RUN apt-get -q -y update &&         if [ “-imx95” = “-vivante” ] || [ “-imx95” = “-imx8” ]; then             apt-get -q -y install             imx-gpu-viv-wayland-dev             libgles-dev         ; else             apt-get -q -y install             libgl1         ; fi     &&     apt-get clean && apt-get autoremove &&     rm -rf /var/lib/apt/lists/*:0.218 exec /bin/sh: exec format error

[+] build 0/1⠙ Image localhost:5002/test1-debug:arm64 Building                                                                                       1.9sDockerfile.debug:56

55 |     # for vivante GPU we need some “special” sauce

56 | >>> RUN apt-get -q -y update && \

57 | >>>         if [ “${GPU}” = “-vivante” ] || [ “${GPU}” = “-imx8” ]; then \

58 | >>>             apt-get -q -y install \

59 | >>>             imx-gpu-viv-wayland-dev \

60 | >>>             libgles-dev \

61 | >>>         ; else \

62 | >>>             apt-get -q -y install \

63 | >>>             libgl1 \

64 | >>>         ; fi \

65 | >>>     && \

66 | >>>     apt-get clean && apt-get autoremove && \

67 | >>>     rm -rf /var/lib/apt/lists/*

68 |

failed to solve: process “/bin/sh -c apt-get -q -y update &&         if [ "${GPU}" = "-vivante" ] || [ "${GPU}" = "-imx8" ]; then             apt-get -q -y install             imx-gpu-viv-wayland-dev             libgles-dev         ; else             apt-get -q -y install             libgl1         ; fi     &&     apt-get clean && apt-get autoremove &&     rm -rf /var/lib/apt/lists/*” did not complete successfully: exit code: 255

Der Terminalprozess “/usr/bin/bash ‘-c’, ‘DOCKER_HOST= docker compose build --pull --build-arg SSHUSERNAME=torizon --build-arg APP_ROOT=/home/torizon/app --build-arg IMAGE_ARCH=arm64 --build-arg DEBUG_SSH_PORT=2231 --build-arg GPU=-imx95 test1-debug’” wurde mit folgendem Exitcode beendet: 1.

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I can help you troubleshoot this Docker build error with the Verdin iMX95 and Mallow Carrier Board setup.

Problem Analysis

The error exec /bin/sh: exec format error indicates an architecture mismatch during the Docker build process. The build is trying to run ARM64 instructions on your x86_64 host system.

Solution

The issue is that your Docker build is attempting to execute ARM64 binaries on your x86_64 Ubuntu host without proper emulation. You need to set up multi-architecture support for Docker.

Step 1: Install QEMU and Enable Multi-Architecture Support

Run these commands on your Ubuntu 22.04 host:

sudo apt-get update
sudo apt-get install qemu-user-static binfmt-support
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

Step 2: Verify Docker Buildx Support

Ensure Docker Buildx is available and configured:

docker buildx create --use --name multiarch
docker buildx inspect --bootstrap

Step 3: Rebuild Your Application

After setting up the multi-architecture support, try building your application again using the Torizon IDE Extension.

Alternative Approach

If you continue experiencing issues, you can also modify the Dockerfile to use a different base image approach or build directly on the target device, though the emulation setup above should resolve the architecture mismatch(1).

Additional Context

The error occurs because the Dockerfile is configured for ARM64 architecture (--build-arg IMAGE_ARCH=arm64) and uses the torizon/wayland-base-imx95:4 base image, which contains ARM64 binaries that cannot execute natively on your x86_64 host without proper emulation(1).

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

@ToradexAI the suggestion didn’t resolve the problem.

Additional Troubleshooting Steps

Since the previous approach didn’t resolve the issue, let’s try the Toradex-recommended method for enabling ARM emulation.

Enable ARM Emulation Using Toradex Method

Run this specific command to enable ARM emulation for Docker(1):

$ docker run --rm -it --privileged torizon/binfmt

(1)

This command will install and register the interpreters that will know how to run the arm32v7 and arm64v8 instructions on your Intel x86 development PC(1).

Test the Emulation

After running the binfmt command, test whether the interpreters have been successfully installed(1):

Test arm64v8:

$ docker run --rm -it --pull always --platform linux/arm64/v8 debian arch

(1)

The return must be:

aarch64

(1)

Important Note About Persistence

ARM emulation is not persistent and must be enabled at every boot(1). If you encounter exec format error when building or running an ARM container on an x86 platform, you need to re-enable ARM emulation by running the binfmt command again(1).

Alternative Approach

If the issue persists, ensure you have Docker Engine properly installed following the Toradex recommendations(1):

  1. Install Docker Engine (not Docker Desktop) as it’s licensed under the Apache License, Version 2.0(1)
  2. Set up Docker to run without root privileges(1)

Try rebuilding your application after enabling ARM emulation with the Toradex binfmt container.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

@ToradexAI i receive this error:

docker run --rm -it --privileged torizon/binfmt
Unable to find image 'torizon/binfmt:latest' locally
latest: Pulling from torizon/binfmt
8aabc323a91f: Pull complete 
26b478ce1ac7: Pull complete 
06f8d3fb0cee: Pull complete 
Digest: sha256:4341763f8efc917a9ca02dfb9f6f0fdf53116a6358dcab0b363a03c6a0f69788
Status: Downloaded newer image for torizon/binfmt:latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /usr/bin/binfmt: exec format error

Problem Analysis

The error indicates that Docker is detecting your host platform as linux/arm64/v8 instead of the expected linux/amd64. This suggests there might be a configuration issue with your Docker setup or system architecture detection.

Solution: Check Docker Desktop Settings

Based on similar issues reported by other users, this problem can be resolved by adjusting Docker Desktop settings (1). In Docker Desktop settings under General, there is a checkbox labeled “Use containerd for pulling and storing images”. When this box is checked, you may get the “no matching manifest for linux/arm64/v8 in the manifest list entries” error (1).

Steps to Fix:

  1. Open Docker Desktop Settings
  2. Navigate to General tab
  3. Uncheck “Use containerd for pulling and storing images” (1)
  4. Restart Docker Desktop
  5. Try running the binfmt command again:
$ docker run --rm -it --privileged torizon/binfmt

(2)

Verify Your System Architecture

First, confirm your actual system architecture:

uname -m

If this shows x86_64, then your system is indeed x86_64, and the Docker platform detection issue needs to be resolved as described above.

Alternative Approach

If you’re still experiencing issues, you can also try specifying the platform explicitly when running the binfmt command:

$ docker run --rm -it --privileged --platform linux/amd64 torizon/binfmt

This should help resolve the platform mismatch and enable ARM emulation properly for building your Verdin iMX95 application.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

@ToradexAI

docker run --rm -it --pull always --platform linux/arm64/v8 debian arch
latest: Pulling from library/debian
Digest: sha256:5cf544fad978371b3df255b61e209b373583cb88b733475c86e49faa15ac2104
Status: Image is up to date for debian:latest
exec /usr/bin/arch: exec format error

ARM Emulation Not Properly Enabled

The error confirms that ARM emulation is not working correctly. The test command is failing with exec format error, which means the ARM64 emulation is not functioning (1).

Solution Steps

Step 1: Verify Your Host Architecture

First, confirm your actual system architecture:

uname -m

This should return x86_64 for your Ubuntu 22.04 system.

Step 2: Enable ARM Emulation with Platform Specification

Since the previous attempts failed, try running the binfmt command with explicit platform specification (1):

$ docker run --rm -it --privileged --platform linux/amd64 torizon/binfmt

Step 3: Test ARM Emulation Again

After successfully running the binfmt command, test the emulation (1):

$ docker run --rm -it --pull always --platform linux/arm64/v8 debian arch

The return must be (1):

aarch64

Step 4: Important Persistence Note

ARM emulation is not persistent and must be enabled at every boot (1). Therefore, it is common to encounter exec format error when building or running an ARM container on an x86 platform (1). You’ll need to run the binfmt command each time you restart your development machine.

Alternative Troubleshooting

If you’re still experiencing issues, check if you have Docker Desktop installed and verify the “Use containerd for pulling and storing images” setting is unchecked, as this can cause platform detection issues (2).

The key is ensuring the binfmt command runs successfully on the correct platform (linux/amd64) to properly set up ARM64 emulation on your x86_64 Ubuntu host.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

@ToradexAI can i speak with a support team?

Technical Support Options Available

You have several ways to get direct support from Toradex engineers (1):

Email Support

For business confidentiality or private technical questions, you can reach Toradex engineers through dedicated email (1):

  • Email: support@toradex.com (1)
  • This creates a ticket in their issue tracking system (1)
  • Engineers will work on your issue and reach out at the earliest possible time (1)

Phone Support

For direct conversation with engineers about general information (1):

  • Toradex has geographically spread offices with local language support (1)
  • Phone contacts for various geographical regions are available at: Toradex - Customer Support (1)

Community Forum

You’re already using this channel - the Community Support page where engineers curate responses (1). This is a public forum where posts are visible to all visitors (1).

Developer Center

An exhaustive repository with more than 600 technical articles at http://developer.toradex.com/ (1).

Important Note About Support Quality

You will directly interact with Toradex engineers who have designed and developed the SoMs (1). Toradex neither has a separate customer support team nor has outsourced support to 3rd party companies (1), ensuring you get the best technical support for your queries (1).

For your specific Docker/ARM emulation issue with the Verdin iMX95, I’d recommend using support@toradex.com since this appears to be a complex technical issue that may benefit from direct engineer assistance.

**


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hello @rnouga,

The ARM emulation for docker command - ie, docker run --rm -it --privileged torizon/binfmt must be executed on your development PC - your Ubuntu 22.04, x86_64 machine. After that you can try to build your VSCode project and it should work.

@rudhi.tx when i execute the command i receive another error:

docker run --rm -it --privileged torizon/binfmt
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /usr/bin/binfmt: exec format error

Hi @rnouga,

Is that executed on your development PC? From your logs, it is clear to me that you are running it on an linux/arm64/v8 machine - which I believe is the verdin iMX95 module.

@rudhi.tx it is executed on my development PC.