ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

yocto

2021-11-01 20:30:13  阅读:461  来源: 互联网

标签:yocto git bitbake repo 编译 linux imx


1、Ubuntu18.04.4

2、$ sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev

$ sudo apt-get install  python-pysqlite2

$ sudo apt-get install  curl

3、$ mkdir ~/bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

4、vi ~/.bashrc
export PATH=~/bin:$PATH

5、git
添加 git config
$ git config --global user.name “Your Name”
$ git config --global user.email “Your Email”
查看 git config -list

1、NXP
https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applications-processors:IMXLINUX?tab=In-Depth_Tab

2、https://source.codeaurora.org/external/imx/imx-manifest/tree/README?h=imx-linux-warrior

3、L4.19.35

4、下载
$ cd ~
$ mkdir imx-yocto-bsp
$ cd imx-yocto-bsp
$ repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-warrior -m imx-4.19.35-1.1.0.xml --repo-url=https://mirrors.tuna.tsinghua.edu.cn/git/git-repo

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

repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.47-2.2.0.xml --repo-url=https://mirrors.tuna.tsinghua.edu.cn/git/git-repo

repo sync

5、执行编译
$ DISTRO=fsl-imx-xwayland MACHINE=imx8mqevk source fsl-setup-release.sh -b build-xwayland

Qt
$bitbake imx-image-full

清理重新编译
//bitbake imx-image-full -c cleanall

$bitbake -c cleansstate imx-image-full

6、编译Qt5的交叉编译工具链
$ bitbake meta-toolchain-qt5 // 生成带有qt5的交叉编译工具链

7、编译时可添加的参数

-c fetch		先下载后编译

-c deploy		将编译生成的镜像,部署到rootfs

8、U-Boot
首次编译出的uboot,是SD卡启动的

U-Boot配置文件,在local.conf中设置UBOOT_CONFIG

$ MACHINE=imx8mqevk bitbake -c deploy u-boot-imx


echo "UBOOT_CONFIG = \"emmc\"" >> conf/local.conf

9、ERROR: Task (/home/touchvision/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-graphics/opencv/opencv_4.0.1.imx.bb:do_compile) failed with exit code ‘1’

10、 $ bitbake -c cleansstate imx-image-full
$ bitbake -c clean imx-image-full

$ bitbake imx-image-full --runall=fetch
$ bitbake imx-image-full

11、重新开始
$ source setup-environment build-xwayland
$ bitbake imx-image-full

12、kernel源代码目录 链接文件 /tmp/work/imx8qmmek-poky-linux/linux-imx/4.14.98-r0/git

/tmp/work-shared/imx8mqevk/kernel-source

13、u-boot源代码目录

/tmp/work/imx8qmmek-poky-linux/u-boot-imx/2018.03-r0

14、单独编译kernel u-boot

注意:
我们修改了kernel或者u-boot的源代码,直接运行bitbake fsl-image-qt5是不会编译我们修改的源代码的。所以就需要我们单独编译源代码。


例子:
$ cd ~/imx8qm/imx-4.14.98-2.0.0_ga //进入工程目录
$ source setup-environment build-xwayland-imx8qmmek-xen //加载编译环境

配置menuconfig
$ bitbake -c menuconfig -v linux-imx

kernel:
$ bitbake -c compile -f -v linux-imx
$ bitbake linux-imx -c compile_kernelmodules -f -v
$ bitbake -c deploy -f -v linux-imx

u-boot:
$bitbake -c compile -f -v u-boot-imx
$bitbake -c deploy -f -v u-boot-imx

bitbake -c cleanstate u-boot

tmp/deploy/images/imx8mqevk/Image

标签:yocto,git,bitbake,repo,编译,linux,imx
来源: https://blog.csdn.net/weixin_40723768/article/details/121087930

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有