Tdx-reference-minimal-image failure (Apalis-iMx8)

I’m facing error while building reference images for Apalis-iMx8 .
Ubuntu setup details:
`Build setup details here:

  1. Ubuntu version – Ubuntu 20.04.4 LTS
  2. Referred link : Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center
  3. Python version – Python 3.8.10
  4. Build/conf/local.conf - MACHINE ?= “apalis-im8” , IMAGE_FSTYPES=“wic.gz” and ACCEPT_FSL_EULA = “1”
  5. Run - $ bitbake tdx-reference-multimedia-image

Preformatted text
bitbake tdx-reference-multimedia-image
Parsing recipes: 100% |#####################################################################################################################################################################| Time: 0:00:27
Parsing of 2751 .bb files complete (0 cached, 2751 parsed). 3917 targets, 240 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = “1.46.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “ubuntu-20.04”
TARGET_SYS = “aarch64-tdx-linux”
MACHINE = “apalis-imx8”
DISTRO = “tdx-xwayland”
DISTRO_VERSION = “5.7.0-devel-20220526181742+build.0”
TUNE_FEATURES = “aarch64”
TARGET_FPU = “”
meta-toradex-nxp = “HEAD:3f4b3f6af10534aa826a17b04f2801cd7c084bba”
meta-freescale = “HEAD:3dbca0ef2ae1ea3862e540c59ad77adbcb419d57”
meta-freescale-3rdparty = “HEAD:c52f64973cd4043a5e8be1c7e29bb9690eb4c3e5”
meta-toradex-tegra = “HEAD:260b24d13c2f7f693519bd2cf24761beb532037f”
meta-toradex-bsp-common = “HEAD:7bf3a4432c4d329c2b291440d51c03d89e6116ff”
meta-oe
meta-filesystems
meta-gnome
meta-xfce
meta-initramfs
meta-networking
meta-multimedia
meta-python = “HEAD:8ff12bfffcf0840d5518788a53d88d708ad3aae0”
meta-freescale-distro = “HEAD:5d882cdf079b3bde0bd9869ce3ca3db411acbf3b”
meta-toradex-demos = “HEAD:8e5c459bb5934a550a21de35c5332f780c7688ac”
meta-qt5 = “HEAD:5ef3a0ffd3324937252790266e2b2e64d33ef34f”
meta-toradex-distro = “HEAD:cbde0286cb85bc445e70210b8df38f29b4784c08”
meta-poky = “HEAD:7e0063a8546250c4c5b9454cfa89fff451a280ee”
meta = “HEAD:8e81d38048c953d0823abf04d5b2506cd988f0bb”

NOTE: Fetching uninative binary shim http://downloads.yoctoproject.org/releases/uninative/3.5/x86_64-nativesdk-libc-3.5.tar.xz;sha256sum=e8047a5748e6f266165da141eb6d08b23674f30e477b0e5505b6403d50fbc4b2 (will check PREMIRRORS first)
Initialising tasks: 100% |##################################################################################################################################################################| Time: 0:00:06
Sstate summary: Wanted 3309 Found 0 Missed 3309 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks
WARNING: linux-toradex-5.4.161+gitAUTOINC+0f00118249-r0 do_fetch: Failed to fetch URL git://git.toradex.com/linux-toradex.git;protocol=https;branch=toradex_5.4-2.3.x-imx;name=machine, attempting MIRRORS if available
WARNING: kernel-module-imx-gpu-viv-6.4.3.p1.4-r0 do_fetch: Failed to fetch URL git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=imx_5.4.70_2.3.0;subpath=drivers/mxc/gpu-viv;destsuffix=git/src, attempting MIRRORS if available
ERROR: linux-toradex-5.4.161+gitAUTOINC+0f00118249-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS=“unix:path=/run/user/1002/bus”; export SSH_AGENT_PID=“2510”; export SSH_AUTH_SOCK=“/run/user/1002/keyring/ssh”; export PATH=“/home/deepak/oe-core/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/deepak/oe-core/layers/openembedded-core/scripts:/home/deepak/oe-core/build/tmp/work/apalis_imx8-tdx-linux/linux-toradex/5.4.161+gitAUTOINC+0f00118249-r0/recipe-sysroot-native/usr/bin/aarch64-tdx-linux:/home/deepak/oe-core/build/tmp/work/apalis_imx8-tdx-linux/linux-toradex/5.4.161+gitAUTOINC+0f00118249-r0/recipe-sysroot/usr/bin/crossscripts:/home/deepak/oe-core/build/tmp/work/apalis_imx8-tdx-linux/linux-toradex/5.4.161+gitAUTOINC+0f00118249-r0/recipe-sysroot-native/usr/sbin:/home/deepak/oe-core/build/tmp/work/apalis_imx8-tdx-linux/linux-toradex/5.4.161+gitAUTOINC+0f00118249-r0/recipe-sysroot-native/usr/bin:/home/deepak/oe-core/build/tmp/work/apalis_imx8-tdx-linux/linux-toradex/5.4.161+gitAUTOINC+0f00118249-r0/recipe-sysroot-native/sbin:/home/deepak/oe-core/build/tmp/work/apalis_imx8-tdx-linux/linux-toradex/5.4.161+gitAUTOINC+0f00118249-r0/recipe-sysroot-native/bin:/home/deepak/oe-core/layers/openembedded-core/bitbake/bin:/home/deepak/oe-core/build/tmp/hosttools”; export HOME=“/home/deepak”; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror “Index of /linux-toradex.git” /home/deepak/oe-core/build/…/downloads/git2/git.toradex.com.linux-toradex.git --progress failed with exit code 128, no output
ERROR: linux-toradex-5.4.161+gitAUTOINC+0f00118249-r0 do_fetch: Bitbake Fetcher Error: FetchError(‘Unable to fetch URL from any source.’, ‘git://git.toradex.com/linux-toradex.git;protocol=https;branch=toradex_5.4-2.3.x-imx;name=machine’)
ERROR: Logfile of failure stored in: /home/deepak/oe-core/build/tmp/work/apalis_imx8-tdx-linux/linux-toradex/5.4.161+gitAUTOINC+0f00118249-r0/temp/log.do_fetch.503537
ERROR: Task (/home/deepak/oe-core/build/…/layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_5.4-2.3.x.bb:do_fetch) failed with exit code ‘1’

Second Keyboard Interrupt, stopping…

Summary: 1 task failed:
/home/deepak/oe-core/build/…/layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_5.4-2.3.x.bb:do_fetch
Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

OTE: Fetching uninative binary shim http://downloads.yoctoproject.org/releases/uninative/3.5/x86_64-nativesdk-libc-3.5.tar.xz;sha256sum=e8047a5748e6f266165da141eb6d08b23674f30e477b0e5505b6403d50fbc4b2 (will check PREMIRRORS first)

WARNING: Checksum mismatch for local file /home/deepak/yocto/build/…/downloads/uninative/e8047a5748e6f266165da141eb6d08b23674f30e477b0e5505b6403d50fbc4b2/x86_64-nativesdk-libc-3.5.tar.xz

Cleaning and trying again.

WARNING: Renaming /home/deepak/yocto/build/…/downloads/uninative/e8047a5748e6f266165da141eb6d08b23674f30e477b0e5505b6403d50fbc4b2/x86_64-nativesdk-libc-3.5.tar.xz to /home/deepak/yocto/build/…/downloads/uninative/e8047a5748e6f266165da141eb6d08b23674f30e477b0e5505b6403d50fbc4b2/x86_64-nativesdk-libc-3.5.tar.xz_bad-checksum_c1b61024aed4de23917974883f5c5b47be409c943cf8661bb9da35c2e110787f

Initialising tasks: 100% |##################################################################################################################################################################| Time: 0:00:06

Sstate summary: Wanted 3309 Found 0 Missed 3309 Current 0 (0% match, 0% complete)

NOTE: Executing Tasks

WARNING: u-boot-toradex-2020.04-r0 do_fetch: Failed to fetch URL git://git.toradex.com/u-boot-toradex.git;protocol=https;branch=toradex_imx_v2020.04_5.4.70_2.3.0, attempting MIRRORS if available

ERROR: u-boot-toradex-2020.04-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS=“unix:path=/run/user/1002/bus”; export SSH_AGENT_PID=“2306”; export SSH_AUTH_SOCK=“/run/user/1002/keyring/ssh”;

Dear @djewargi, how are you?

It seems that you’re having some troubles due to a wrong configuration file.

You can see on your warnings that you couldn’t find a machine matching with the branch:

And looking to how you defined the .conf file, I can see a typo:

The machine name should be apalis-imx8.

Can you please give it a try?

Best regards,
Guilherme

Thanks, Guilherme, Given try with following changes in local.conf
Build/conf/local.conf file
MACHINE? = “apalis-imx8”
IMAGE_FSGTYPE = “wic.gz”

Rebuild it same error .
WARNING: linux-toradex-5.4.161+gitAUTOINC+0f00118249-r0 do_fetch: Failed to fetch URL git://git.toradex.com/linux-toradex.git;protocol=https;branch=toradex_5.4-2.3.x-imx;name=machine, attempting MIRRORS if available

Regards
Deepak

Dear @djewargi, can you please share your full local.conf file and also the bblayers.conf file?

Best regards,
Guilherme

Hi Guiherme,

Please find the attached local.conf and bblayers file.

Issue.
After configuration as mentioned local.conf file
Got Erro’s as follows

  1. ERROR: u-boot-toradex-2020.04-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS=“unix:path=/run/user/1002/bus”; export SSH_AGENT_PID=“2306”; export SSH_AUTH_SOCK=“/run/user/1002/keyring/ssh”;

  2. ERROR: linux-toradex-5.4.161+gitAUTOINC+0f00118249-r0 do_fetch: Bitbake Fetcher Error: FetchError(‘Unable to fetch URL from any source.’, ‘git://git.toradex.com/linux-toradex.git;protocol=https;branch=toradex_5.4-2.3.x-imx;name=machine’)
    ERROR: Logfile of failure stored in: /home/deepak/oe-core/build/tmp/work/apalis_imx8-tdx-linux/linux-toradex/5.4.161+gitAUTOINC+0f00118249-r0/temp/log.do_fetch.503537
    ERROR: Task (/home/deepak/oe-core/build/…/layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_5.4-2.3.x.bb:do_fetch) failed with exit code ‘1’

  3. When I tried to rebuild again, "bitbake tdx-reference-multimedia-image
    bblayers.conf (1.1 KB)
    local.conf (11.5 KB)
    " build got struck at 96% and never completed after several hours.

Regard’s
Deepak J

Dear @djewargi,

Can you please try to erase all the files of your Yocto build and redo the tutorial from the beginning and compile a clean build? Maybe when you did the first repo sync there was a bug on the data you cloned. Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center

I just tested with a new repo from zero and it built the image. The first build always takes much longer than the next one. My first build took almost 5 hours. I’ve also added your changes to my local configuration file from an older build (5.6.0) and I’ve also been able to compile it.


By the way, do you want to only have the wic.gz format or do you wish it in addition to other formats? If the second is the answer, then you don’t need to add this line as it should come by default on our images.

Best regards,
Guilherme

Hi Guilherme,
Sorry for the late reply.
Thanks for your inputs, Yes i’m able to build the toradex images for wic.gz format with “bitbake tdx-reference-minimal-image”

Issue, when tried to build the images with “bitbake tdx-reference-multimedia-image” . The build going to struck at 93% or 96% as shown in the attached screen shot.

Laptop setup details:

  1. Ubuntu 20.04 LTS
  2. RAM 32 GB
    3.LAN internet speed is 170 mbps

Please help me out, if I have missed any configuration to build tdx-reference-multimedia-image

Regards,
Deepak

Hi @djewargi,

Are you still facing issue building image? Have you tried building individual package specially for Qt and thereafter build full image?

Best Regards
Ritesh kumar

*[quote=“ritesh.tx, post:8, topic:17025, full:true”]
Hi @djewargi,

Are you still facing issue building image? Have you tried building individual package specially for Qt and thereafter build full image?

Best Regards
Ritesh kumar
[/quote]

Hi Ritesh,

Yes, still facing issue building image with $ bitbake tdx-reference-multimedia-image, build is getting struck at 96 % while do_compling with Qt files.

If run command with $ bitbake tdx-reference-minimal-image , build is completing 100% and target images are getting generated.

local.conf configuration:
Build/conf/local.conf file
MACHINE? = “apalis-imx8”
IMAGE_FSGTYPE = “wic.gz”

Please let me know , if any extra configuration or setup is required.

Laptop environment :slight_smile:

  1. Ubuntu 20.04 LTS
  2. RAM 32 GB
  3. Python version – Python 3.8.10
    4.LAN internet speed is 170 mbps

Regards,
Deepak

Hi @djewargi,

To me it seems like while building qt you are running out of resource. Can you please try below workarounds and see if you are able to compile image

Option 1.) Build the qt package individually and after build is complete build final image.
Option 2.) In your local.conf limit number of parallel build by adding below lines

BB_NUMBER_THREADS = “2”
PARALLEL_MAKE = “-j 2”

Best Regards
Ritesh Kumar