imx8 yocto 下载编译全过程

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 rsync curl zstd pzstd lz4c lz4

2、Setting up the Repo utility
Create a bin folder in the home directory.

$ mkdir ~/bin (this step may not be needed if the bin folder already exists)
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

Add the following line to the .bashrc file to ensure that the ~/bin folder is in your PATH variable.

export PATH=~/bin:$PATH

3、Yocto Project Setup
First, make sure that Git is set up properly with the commands below:

$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ git config –list

构建yocto

$ mkdir imx-yocto-bsp
$ cd imx-yocto-bsp
$ repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-kirkstone -m imx-5.15.32-2.0.0.xml
$ repo sync

报错问题1

vim ~/bin/repo
import ssl ssl._create_default_https_context = ssl._create_unverified_context 
vim ~/.bashrc
export REPO_URL = 'https://gerrit.googlesource.com/git-repo
source ~/.bashrc 

4、编译
调用脚本选择evk配置
The syntax for the imx-setup-release.sh script is shown below:
$ DISTRO= MACHINE= source imx-setup-release.sh -b
DISTRO= <发行版配置名称> 是发行版,配置构建环境,存储在meta-imx/meta-sdk/conf/distro.
MACHINE= <机器配置名> 是指向conf/machine in meta-freescale and meta-imx
-b 指定由 imx-setup-release.sh 脚本创建的构建目录的名称。

当脚本运行时,它会提示用户接受 EULA。 一旦 EULA 被接受,接受就存储在
每个构建文件夹中的 local.conf,并且不再显示该构建文件夹的 EULA 接受查询。
脚本运行后,工作目录就是脚本刚刚创建的目录,使用 -b 选项指定。 创建了一个 conf 文件夹
包含文件 bblayers.conf 和 local.conf 。
/conf/bblayers.conf 文件包含 i.MX Yocto Project 版本中使用的所有元层。
local.conf 文件包含机器和发行版规范:
MACHINE ??= ‘imx7ulpevk’
DISTRO ?= ‘fsl-imx-xwayland’

ACCEPT_FSL_EULA = "1"

如有必要,可以通过编辑此文件来更改 MACHINE 配置。
local.conf 文件中的 ACCEPT_FSL_EULA 表示您已接受 EULA 的条件。
在 meta-imx 层,为 i.MX 提供了统一的机器配置( imx6qpdlsolox.conf 和 imx6ul7d.conf )
6 和 i.MX 7 机器。 i.MX 使用这些来构建一个通用映像,其中所有设备树都在一个映像中进行测试。 不使用
这些机器用于测试以外的任何用途。

i.MX Yocto project images:
core-image-minimal
core-image-base
core-image-sato
imx-image-core
fsl-image-machine-test
imx-image-multimedia
imx-image-full

bitbake 是这个系统的编译工具

images路径:

/tmp/deploy/images .

指定要编译的板子
Wayland image on i.MX 8M Quad EVK 板子

$ DISTRO=fsl-imx-wayland MACHINE=imx8mqevk source imx-setup-release.sh -b build-wayland
$ bitbake imx-image-multimedia
DISTRO=fsl-imx-xwayland MACHINE=imx8mqevk source imx-setup-release.sh -b build
bitbake imx-image-multimedia

bitbake fsl-image-validation-imx 编译基于wayland 的支持GUI 的测试镜像

问题:1imx8 yocto 下载编译全过程_第1张图片

方法:
修改 poky.conf 对我不起作用(从我读到的内容来看,修改 Poky 下的任何内容对于长期解决方案来说都是禁忌)。

修改/conf/local.conf 是唯一对我有用的解决方案。只需添加以下两个选项之一:

#check connectivity using google
CONNECTIVITY_CHECK_URIS = "https://www.google.com/"

#skip connectivity checks
CONNECTIVITY_CHECK_URIS = ""

问题2
imx8 yocto 下载编译全过程_第2张图片

第 1 步:手动下载包(wget、git clone …)
第 2 步:将包复制到./build/downloads
第 3 步:touch 一个 package_name.done文件。
第 4 步:更改*.done文件的权限:chmod 777 package_name.done

问题3
imx8 yocto 下载编译全过程_第3张图片
编译时出现Error: open CFI at the end of file; missing .cfi_endproc directive
方法:
1,尝试重启

基本上是内存不足造成的,有实际内存的可以加大虚拟机内存,如果没有可以增加Ubuntu的swap空间

参考这个https://blog.csdn.net/yc461515457/article/details/53610412

你可能感兴趣的:(imx8,git,python,github)