Search code examples
ubuntuyoctorepo

Building a Yocto image IMX8


I'm trying to follow a SolidRun tutorial about Yocto image from here (https://github.com/SolidRun/meta-solidrun-arm-imx8).

My command sequence is the following:

First place, I install essentials:

sudo apt update
sudo apt upgrade
sudo apt install -y bc build-essential chrpath cpio diffstat gawk git texinfo wget gdisk 
python3 python3-pip
sudo apt install python-is-python3
sudo apt install python2

I install repo manually on the directory yocto (where i want to build the image) and use repo:

mkdir yocto
cd yocto    
mkdir -p ~/.bin
PATH="${HOME}/.bin:${PATH}"
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
chmod a+rx ~/.bin/repo

repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m 
imx-5.4.70-2.3.0.xml
repo sync

Then I download as they do in their tutorial, and make the other steps:

cd sources
git clone https://github.com/SolidRun/meta-solidrun-arm-imx8.git --branch zeus-imx8mp
cd ..
DISTRO=fsl-imx-xwayland MACHINE=imx8mpsolidrun source imx-setup-release.sh -b build-xwayland-imx8mpsolidrun

I add this line BBLAYERS += "${BSPDIR}/sources/meta-solidrun-arm-imx8" into conf/bblayers.conf.

Then:

bitbake core-image-minimal

But I receive a lot of errors like this:

ERROR: rpm-native-1_4.14.2.1-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export PATH="/home/holoh/yocto/sources/poky/scripts/native-intercept:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/x86_64-linux/rpm-native/1_4.14.2.1-r0/recipe-sysroot-native/usr/bin/python3-native:/home/holoh/yocto/sources/poky/scripts:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/x86_64-linux/rpm-native/1_4.14.2.1-r0/recipe-sysroot-native/usr/bin/x86_64-linux:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/x86_64-linux/rpm-native/1_4.14.2.1-r0/recipe-sysroot-native/usr/bin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/x86_64-linux/rpm-native/1_4.14.2.1-r0/recipe-sysroot-native/usr/sbin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/x86_64-linux/rpm-native/1_4.14.2.1-r0/recipe-sysroot-native/usr/bin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/x86_64-linux/rpm-native/1_4.14.2.1-r0/recipe-sysroot-native/sbin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/x86_64-linux/rpm-native/1_4.14.2.1-r0/recipe-sysroot-native/bin:/home/holoh/yocto/sources/poky/bitbake/bin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/hosttools"; export HOME="/home/holoh"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror git://github.com/rpm-software-management/rpm /home/holoh/yocto/downloads//git2/github.com.rpm-software-management.rpm --progress failed with exit code 128, output: Cloning into bare repository '/home/holoh/yocto/downloads//git2/github.com.rpm-software-management.rpm'... fatal: unable to connect to github.com: github.com[0: 140.82.121.4]: errno=Connection timed out

ERROR: rpm-native-1_4.14.2.1-r0 do_fetch: Fetcher failure for URL: 'git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x'. Unable to fetch URL from any source. ERROR: Logfile of failure stored in: /home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/x86_64-linux/rpm-native/1_4.14.2.1-r0/temp/log.do_fetch.2200 ERROR: Task (virtual:native:/home/holoh/yocto/sources/poky/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb:do_fetch) failed with exit code '1' ERROR: jailhouse-0.12-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export PATH="/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/imx8mpsolidrun-poky-linux/jailhouse/0.12-r0/recipe-sysroot-native/usr/bin/python3-native:/home/holoh/yocto/sources/poky/scripts:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/imx8mpsolidrun-poky-linux/jailhouse/0.12-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/imx8mpsolidrun-poky-linux/jailhouse/0.12-r0/recipe-sysroot/usr/bin/crossscripts:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/imx8mpsolidrun-poky-linux/jailhouse/0.12-r0/recipe-sysroot-native/usr/sbin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/imx8mpsolidrun-poky-linux/jailhouse/0.12-r0/recipe-sysroot-native/usr/bin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/imx8mpsolidrun-poky-linux/jailhouse/0.12-r0/recipe-sysroot-native/sbin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/imx8mpsolidrun-poky-linux/jailhouse/0.12-r0/recipe-sysroot-native/bin:/home/holoh/yocto/sources/poky/bitbake/bin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/hosttools"; export HOME="/home/holoh"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror ssh://source.codeaurora.org/external/imx/imx-jailhouse.git /home/holoh/yocto/downloads//git2/source.codeaurora.org.external.imx.imx-jailhouse.git --progress failed with exit code 128, output: Cloning into bare repository '/home/holoh/yocto/downloads//git2/source.codeaurora.org.external.imx.imx-jailhouse.git'... ssh: connect to host source.codeaurora.org port 22: Connection timed out fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

ERROR: jailhouse-0.12-r0 do_fetch: Fetcher failure for URL: 'git://source.codeaurora.org/external/imx/imx-jailhouse.git;protocol=ssh;branch=imx_5.4.70_2.3.0'. Unable to fetch URL from any source. ERROR: Logfile of failure stored in: /home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/imx8mpsolidrun-poky-linux/jailhouse/0.12-r0/temp/log.do_fetch.27149 ERROR: Task (/home/holoh/yocto/sources/meta-imx/meta-sdk/recipes-extended/jailhouse/jailhouse_0.12.bb:do_fetch) failed with exit code '1' ERROR: systemd-1_243.2-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export PATH="/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/aarch64-poky-linux/systemd/1_243.2-r0/recipe-sysroot-native/usr/bin/python3-native:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/aarch64-poky-linux/systemd/1_243.2-r0/recipe-sysroot-native/usr/bin/perl-native:/home/holoh/yocto/sources/poky/scripts:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/aarch64-poky-linux/systemd/1_243.2-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/aarch64-poky-linux/systemd/1_243.2-r0/recipe-sysroot/usr/bin/crossscripts:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/aarch64-poky-linux/systemd/1_243.2-r0/recipe-sysroot-native/usr/sbin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/aarch64-poky-linux/systemd/1_243.2-r0/recipe-sysroot-native/usr/bin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/aarch64-poky-linux/systemd/1_243.2-r0/recipe-sysroot-native/sbin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/aarch64-poky-linux/systemd/1_243.2-r0/recipe-sysroot-native/bin:/home/holoh/yocto/sources/poky/bitbake/bin:/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/hosttools"; export HOME="/home/holoh"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror git://github.com/systemd/systemd-stable.git /home/holoh/yocto/downloads//git2/github.com.systemd.systemd-stable.git --progress failed with exit code 128, output: Cloning into bare repository '/home/holoh/yocto/downloads//git2/github.com.systemd.systemd-stable.git'... fatal: unable to connect to github.com: github.com[0: 140.82.121.4]: errno=Connection timed out

ERROR: systemd-1_243.2-r0 do_fetch: Fetcher failure for URL: 'git://github.com/systemd/systemd-stable.git;protocol=git;branch=v243-stable'. Unable to fetch URL from any source. ERROR: Logfile of failure stored in: /home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/aarch64-poky-linux/systemd/1_243.2-r0/temp/log.do_fetch.22584 ERROR: Task (/home/holoh/yocto/sources/poky/meta/recipes-core/systemd/systemd_243.2.bb:do_fetch) failed with exit code '1'

It is like there would be some repository problems, but I have tried changed the repo with this:

repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m 
imx-5.4.70-2.3.8.xml

But it is the same. The tutorial doesn't give more information about the build. What is the problem?

I'm using WSL on Windows, Ubuntu 20.04.

EDIT:I was using that Kernel version because I was following the tutorial on the solidrun github tutorial. Now I'm trying in Ubuntu 22.04 for this kernel and layer version:

repo init -u source.codeaurora.org/external/imx/imx-manifest -b imx-linux-hardknott -m imx-5.10.72-2.2.0.xml 

But now, i get a new error:

ERROR: m4-native-1.4.18-r0 do_compile: oe_runmake failed ERROR: m4-native-1.4.18-r0 do_compile: Execution of '/home/holoh/yocto/build-xwayland-imx8mpsolidrun/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/run.do_compile.10148' failed with exit code 1


Solution

  • Yocto is trying to down clone the git repositories, but that is not working. The question is why would that fail.

    Connection timed out
    

    But your recipe is actually trying to clone (via ssh) from git://source.codeaurora.org/external/imx/imx-jailhouse.git

    Someone has the exact same issue as you

    https://community.nxp.com/t5/i-MX-Processors/report-bsp-imx-4-19-35-1-1-0-bug-fetch-jailhouse-failed/m-p/1002652

    git diff
    diff --git a/imx/meta-sdk/recipes-extended/jailhouse/jailhouse_0.10.bb b/imx/meta-sdk/recipes-extended/jailhouse/jailhouse_0.10.bb
    index 2079718dc..fb4e376ec 100644
    --- a/imx/meta-sdk/recipes-extended/jailhouse/jailhouse_0.10.bb
    +++ b/imx/meta-sdk/recipes-extended/jailhouse/jailhouse_0.10.bb
    @@ -1,7 +1,7 @@
     require jailhouse.inc
     
    -SRCBRANCH = "imx_v0.10_y"
    -IMX_JAILHOUSE_SRC ?= "git://source.codeaurora.org/external/imx/imx-jailhouse.git;protocol=ssh"
    +SRCBRANCH = "imx_4.19.35_1.1.0"
    +IMX_JAILHOUSE_SRC ?= "git://source.codeaurora.org/external/imx/imx-jailhouse.git;protocol=https"
    

    So the obvious solution is to change the protocol=ssh to protocol=https but that is only the start of your problem. There are two real questions you should be asking.

    • Question one, this issue was fixed in 2019 (allegedly), why do you not have the lasted version of this layer/recipe.

    • Question two, you are building a 4.19 Linux kerel, in 2022. 4.19 is was released on, October 2018, so it is okay. But I would recommend a 5 kernel for all new work.