Because of work needs, I used Linux to develop new products, and now I have to learn to build images. And record some problems encountered and how to solve them.
Development board: NXP imx8mqevk
Development platform: VM
Ubuntu: 18.04.3LST
Tool: Yoctor
Guide: i.MX Yocto Project User's Guide
The following installation environment defaults to Ubuntu 18 three point four
After installing Ubuntu, I won't say much about what to do
1. Install the Host packages
It corresponds to 3.1 in the document
Command:
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \ xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \ pylint3 xterm
If you can't do it at one time, enter it separately
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib sudo apt-get install build-essential chrpath socat cpio python python3 python3-pip python3-pexpect sudo apt-get install xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev sudo apt-get install pylint3 xterm
2. Install repo
There are two ways:
2.1: create a bin folder in the home directory
Command:
mkdir ~/bin curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo
Then add the following line to In the bashrc file to ensure that the ~ / bin folder is in the PATH variable
export PATH=~/bin:$PATH
2.2 another option for installing repo is to use the Ubuntu package management system.
sudo apt-get install repo
3.Yocto project setting
First, make sure that git is set correctly using the following command
git config --global user.name "Your Name" git config --global user.email "Your Email" git config --list
Then start downloading
mkdir imx-yocto-bsp cd imx-yocto-bsp repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.3-1.0.0.xml repo sync
3.1 repo init error resolution
catalogue
The following installation environment defaults to Ubuntu 18 three point four
2.1: create a bin folder in the home directory
2.2 another option for installing repo is to use the Ubuntu package management system.
4.2 select an IMX Yocto project image
catalogue
The following installation environment defaults to Ubuntu 18 three point four
2.1: create a bin folder in the home directory
2.2 another option for installing repo is to use the Ubuntu package management system.
3.1 repo init error resolution
4.2 select an IMX Yocto project image
However, after only one step, most of them will be stuck in repo init in the third sentence, because the resources are abroad. Of course, if you have an agent, this problem should not occur
Please refer to: Linux ubuntu repo installation method
After the modification, it should be like this
Then, when you get here, it means that you have linked to and can download resources
Then: repo sync
4. Build configuration
4.1DISTRO configuration list
fsl-imx-wayland fsl-imx-xwaylandsupported. fsl-imx-fb
Equipment name: imx8mqevk
Configuration file: IMX setup release sh
Compilation Directory: IMX8mqevk
DISTRO=fsl-imx-wayland MACHINE=imx8mqevk source imx-setup-release.sh -b IMX8mqevk
4.2 select an IMX Yocto project image
4.3 building images
My choice is IMX image full to build an open source Qt5 image with machine learning features.
bitbake imx-image-full
Then there is a long wait
4.4 CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none solution
Ran to GStreamer 1 0_ 1.16. imx. Error occurs during BB
WARNING: gstreamer1.0-1.16.0.imx-r0 do_fetch: Failed to fetch URL gitsm://gitlab.freedesktop.org/gstreamer/common.git;protocol=https;name=common;subpath=common;bareclone=1;nobranch=1, attempting MIRRORS if available ERROR: gstreamer1.0-1.16.0.imx-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus,guid=91b9195611c8aaefc2a500c761de75d1"; export SSH_AGENT_PID="1610"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/work/aarch64-mx8m-poky-linux/gstreamer1.0/1.16.0.imx-r0/recipe-sysroot-native/usr/bin/python3-native:/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/sources/poky/scripts:/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/work/aarch64-mx8m-poky-linux/gstreamer1.0/1.16.0.imx-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/work/aarch64-mx8m-poky-linux/gstreamer1.0/1.16.0.imx-r0/recipe-sysroot/usr/bin/crossscripts:/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/work/aarch64-mx8m-poky-linux/gstreamer1.0/1.16.0.imx-r0/recipe-sysroot-native/usr/sbin:/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/work/aarch64-mx8m-poky-linux/gstreamer1.0/1.16.0.imx-r0/recipe-sysroot-native/usr/bin:/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/work/aarch64-mx8m-poky-linux/gstreamer1.0/1.16.0.imx-r0/recipe-sysroot-native/sbin:/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/work/aarch64-mx8m-poky-linux/gstreamer1.0/1.16.0.imx-r0/recipe-sysroot-native/bin:/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/sources/poky/bitbake/bin:/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/hosttools"; export HOME="/home/cheng"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror https://gitlab.freedesktop.org/gstreamer/common.git /opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/downloads//git2/gitlab.freedesktop.org.gstreamer.common.git --progress failed with exit code 128, output: Cloning into bare repository '/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/downloads//git2/gitlab.freedesktop.org.gstreamer.common.git'... fatal: unable to access 'https://gitlab.freedesktop.org/gstreamer/common.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none ERROR: gstreamer1.0-1.16.0.imx-r0 do_fetch: gitsm: submodule download failed: FetchError Fetcher failure for URL: 'gitsm://gitlab.freedesktop.org/gstreamer/common.git;protocol=https;name=common;subpath=common;bareclone=1;nobranch=1'. Unable to fetch URL from any source. WARNING: gstreamer1.0-1.16.0.imx-r0 do_fetch: Failed to fetch URL gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https;branch=MM_04.05.03_1911_L5.4.0, attempting MIRRORS if available ERROR: gstreamer1.0-1.16.0.imx-r0 do_fetch: Fetcher failure for URL: 'gitsm://gitlab.freedesktop.org/gstreamer/common.git;protocol=https;name=common;subpath=common;bareclone=1;nobranch=1'. Unable to fetch URL from any source. ERROR: gstreamer1.0-1.16.0.imx-r0 do_fetch: Fetcher failure for URL: 'gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https;branch=MM_04.05.03_1911_L5.4.0'. Unable to fetch URL from any source. ERROR: Logfile of failure stored in: /opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/work/aarch64-mx8m-poky-linux/gstreamer1.0/1.16.0.imx-r0/temp/log.do_fetch.58393 ERROR: Task (/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/sources/meta-imx/meta-bsp/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb:do_fetch) failed with exit code '1
fatal: unable to access 'https://gitlab.freedesktop.org/gstreamer/common.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
Prompt: gitlab server certificate verification failed and there is no CRLfile
Solution 1: Refer to the certificate replacement method of link AUKO16
Solution 2: add in the environment variable
export GIT_SSL_NO_VERIFY=1
Solution 3: Cancel ssl certificate, refer to the method of sleeping Mars boss tonight
I'm the third way. It's finally solved
Error again:
ERROR: Logfile of failure stored in: /opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/work/aarch64-poky-linux/qtdeclarative/5.13.2+gitAUTOINC+4080025fed-r0/temp/log.do_compile.2582
Redo sync again and continue to compile. If it passes, it will report an error again:
ERROR: boost-1.71.0-r0 do_compile: Execution of '/opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/work/aarch64-poky-linux/boost/1.71.0-r0/temp/run.do_compile.111645' failed with exit code 1:
ERROR: Logfile of failure stored in: /opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/work/aarch64-poky-linux/boost/1.71.0-r0/temp/log.do_compile.111645
Then go to opt / imx8mq / ok8mq Linux SDK / IMX yoctor BSP / imx8mqevk / TMP / work / aarch64 poky Linux / boost / 1.71.0-r0 / temp / log do_ compile. 111645 after reading the log;
Baidu said that the virtual machine memory was not enough. Later, after thinking about it, I changed 8 threads to 4, and the problem was solved
Continue to report errors:
Change git in the corresponding bb file to gitsm
succeed
New error:
View log do_ fetch. 7566 learned
fatal: unable to access 'https://github.com/dmlc/dmlc-core/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
ERROR: armnn-onnx-1.3.0-r0 do_fetch: Fetcher failure: Unable to find revision bae6333e149a59a3faa9c4d9c44974373dcf5256 in branch master even from upstream
Still compiling, to be continued...