STM32MP1 yocto qt构建

0 - 相关文章

  01-PanGu STM32MP1资料下载
  02-STM32MP1 开发环境搭建
  03-PanGu 开发板固件更新
  04-STM32MP1 uboot编译
  05-STM32MP1 linux编译
  05-STM32MP1 yocto qt构建

目录

    • 0 - 相关文章
    • 1 - 环境准备
    • 2 - 资源准备
    • 3 - 解压
    • 4 - DISTRO
    • 5 - 构建qt系统
    • 6 - 报错与解决方案
      • 1 - linux-i2som_4.19.bb
      • 2 - worker process exited unexpectedly
      • 3 - 不明报错
    • 欢迎加群

1 - 环境准备

  官方使用ubuntu16.04,笔者使用的环境为ubuntu18.04。建议读者使用这两个版本。
  请不要加载任何交叉工具链,避免编译出错。

2 - 资源准备

  PanGu板yocto资源可以访问如下链接:PanGu资料

  下载到的资源放在~/PanGu/目录下:
STM32MP1 yocto qt构建_第1张图片
STM32MP1 yocto qt构建_第2张图片
  i2som-pangu-yocto-predownload是Yocto在编译期间默认下载需要的软件包的目录。直接解压这个包,可以节省下载时间。
  i2som-pangu-sstate-cache是Yocto在编译时使用的软件包校验信息目录。直接解压这个包,可以节省下载时间。

3 - 解压

  输入如下命令进行解压:

xinluyao@ubuntu:~/PanGu$ tar xvf i2som-pangu-predownload.tar.xz
xinluyao@ubuntu:~/PanGu$ tar xvf i2som-pangu-sstate-cache.tar.xz
xinluyao@ubuntu:~/PanGu$ tar xvzf i2SOM-ST-Yocto.tar.gz
xinluyao@ubuntu:~/PanGu$ tar xvzf linux-st.tar.gz
xinluyao@ubuntu:~/PanGu$ tar xvzf u-boot-st.tar.gz
xinluyao@ubuntu:~/PanGu$ tar xvzf arm-trusted-firmware.tar.gz
xinluyao@ubuntu:~/PanGu$ tar xvf i2SOM-ST-Yocto.tar.gz

4 - DISTRO

xinluyao@ubuntu:~/PanGu$ cd i2SOM-ST-Yocto/
xinluyao@ubuntu:~/PanGu/i2SOM-ST-Yocto$ DISTRO=openstlinux-eglfs MACHINE=pangu source layers/meta-i2som-styocto/scripts/envsetup.sh

  ''DISTRO=openstlinux-eglfs MACHINE=pangu source layers/meta-i2som-styocto/scripts/envsetup.sh"是初始化Yocto的构建目录,执行后会自动创建"build-openstlinuxeglfs-pangu"目录,并自动切换到"build-openstlinuxeglfs-pangu"目录 且 加载环境变量。

  执行命令后效果如下图:
STM32MP1 yocto qt构建_第3张图片

5 - 构建qt系统

  使用bitbake命令开始构建qt系统:

xinluyao@ubuntu:~/PanGu/i2SOM-ST-Yocto/build-openstlinuxeglfs-pangu$ bitbake i2som-image-qt

  执行上述命令后,构建系统如下图所示:
STM32MP1 yocto qt构建_第4张图片
  笔者电脑是Ryzen 3700(8核16线程),16G内存。给虚拟机分配8线程8G内存,整个构建大概花费2个小时。

6 - 报错与解决方案

1 - linux-i2som_4.19.bb

WARNING: linux-i2som-4.19+github+AUTOINC+59ba0fce4f-r0 do_fetch: Failed to fetch URL git:////home/xinluyao/PanGu/linux-st;protocol=file;branch=v4.19-r1.4-pangu;name=linux, attempting MIRRORS if available
ERROR: linux-i2som-4.19+github+AUTOINC+59ba0fce4f-r0 do_fetch: Fetcher failure: Unable to find revision 59ba0fce4f864b8c88df08d2e3a5d715982a63e5 in branch v4.19-r1.4-pangu even from upstream
ERROR: linux-i2som-4.19+github+AUTOINC+59ba0fce4f-r0 do_fetch: Fetcher failure for URL: 'git:////home/xinluyao/PanGu/linux-st;protocol=file;branch=v4.19-r1.4-pangu;name=linux'. Unable to fetch URL from any source.
ERROR: linux-i2som-4.19+github+AUTOINC+59ba0fce4f-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/xinluyao/PanGu/i2SOM-ST-Yocto/build-openstlinuxeglfs-pangu/tmp-glibc/work/pangu-openstlinux_eglfs-linux-gnueabi/linux-i2som/4.19+github+AUTOINC+59ba0fce4f-r0/temp/log.do_fetch.33479
ERROR: Task (/home/xinluyao/PanGu/i2SOM-ST-Yocto/layers/meta-i2som-styocto/recipes-kernel/linux/linux-i2som_4.19.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1137 tasks of which 84 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory

Summary: 1 task failed:
  /home/xinluyao/PanGu/i2SOM-ST-Yocto/layers/meta-i2som-styocto/recipes-kernel/linux/linux-i2som_4.19.bb:do_fetch
Summary: There were 3 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.

  报错的意思是查找内核源代码相关部分出错,请详细检查recipes-kernel/linux/linux-i2som_4.19.bb文件:

SRC_URI = "git:///${HOME}/PanGu/linux-st;protocol=file;branch=v${LINUX_VERSION}-r1.4-pangu;name=linux"
SRCREV = "ef13b6fb251d52984793d3aba4c9d19f822047c4"
SRCREV_FORMAT = "linux"
PV = "${LINUX_VERSION}+github+${SRCPV}"

2 - worker process exited unexpectedly

STM32MP1 yocto qt构建_第5张图片
  这个错误可以编辑i2SOM-ST-Yocto/build-openstlinuxeglfs-pangu/conf/local.conf文件夹,在文件最后加上如下内容:

BB_NUMBER_THREADS = "6"

3 - 不明报错

  遇到其它报错,可以尝试先清除构建:

bitbake package -c clean

  package是报错的菜谱名,清除后可以尝试重新编译:

bitbake i2som-image-qt

欢迎加群

扣扣群号:105335490

你可能感兴趣的:(STM32MP1,电子技术)