目录
以下安装环境默认Ubuntu18.03.4
1.安装Host packages
2.安装repo
2.1:在主目录中创建一个bin文件夹
2.2安装repo的另一个选项是使用Ubuntu软件包管理系统。
3.Yocto项目设置
3.1repo init错误解决
4.1DISTRO配置的列表
4.2选择一个IMX Yocto 项目图像
4.3构建镜像
4.4 CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none 解决
因为工作需要,用了Linux来开发新产品,然后现在要学习搭建镜像。并且随手记录遇到的一些问题和如何解决。
开发板:NXP imx8mqevk
开发平台:VM
Ubuntu:18.04.3LST
工具:Yoctor
指导:i.MX Yocto Project User's Guide
以下安装环境默认Ubuntu18.03.4安装完Ubuntu之后该有的 *** 作我就不多说了
1.安装Host packages对应的是文档里的3.1
命令:
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
一次性不行就分开来输入
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 xterm2.安装repo
这里有两种方式:
2.1:在主目录中创建一个bin文件夹命令:
mkdir ~/bin curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo
然后将以下一行添加到.bashrc文件中,以确保~/bin文件夹在PATH变量中
export PATH=~/bin:$PATH2.2安装repo的另一个选项是使用Ubuntu软件包管理系统。
sudo apt-get install repo3.Yocto项目设置
首先,请确保使用下面的命令正确地设置了git
git config --global user.name "Your Name" git config --global user.email "Your Email" git config --list
然后开始下载
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 sync3.1repo init错误解决
然而到了只一步之后大部分会卡在第三句的repo init这里,因为资源都在国外,当然了,如果你有代理的话应该就不会出现这个问题
请参考:Linux ubuntu repo安装方法
修改完成之后应该是这样的
然后到了这里就说明链接到了,可以下载资源了
然后:repo sync 一下
4.构建配置 4.1DISTRO配置的列表fsl-imx-wayland fsl-imx-xwaylandsupported. fsl-imx-fb
设备名称: imx8mqevk
配置文件:imx-setup-release.sh
编译目录:IMX8mqevk
DISTRO=fsl-imx-wayland MACHINE=imx8mqevk source imx-setup-release.sh -b IMX8mqevk4.2选择一个IMX Yocto 项目图像 4.3构建镜像
我的选择是 imx-image-full 构建一个具有机器学习特性的开源Qt5图像。
bitbake imx-image-full
接下来就是漫长的等待了
4.4 CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none 解决跑到了gstreamer1.0_1.16.imx.bb的时候出现了Error
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
提示gitlab服务器证书验证失败,没有CRLfile
解决方法1:参考链接 AUKO16的更换证书方法
解决方法2:在环境变量中加入
export GIT_SSL_NO_VERIFY=1
解决方法3:取消ssl证书 参考今夜睡火星大佬的方法
我是第三个方法最终解决了
又报错了:
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
重新 repo sync了一下又继续编译,通过了又又报错了:
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
然后去opt/imx8mq/OK8MQ-linux-sdk/imx-yoctor-bsp/IMX8mqevk/tmp/work/aarch64-poky-linux/boost/1.71.0-r0/temp/log.do_compile.111645看了日志后;
百度了一下,说是虚拟机内存不够,后来想了想,我就把8个线程改成了4个,问题解决了
继续报错:
把对应的 bb文件里面的git改成gitsm
成功了
新错误:
查看log.do_fetch.7566得知
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
还在编译中,未完待续。。。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)