谷动谷力

 找回密码
 立即注册
查看: 1412|回复: 0
打印 上一主题 下一主题
收起左侧

STM32MP157D-DK1 Qt镜像构建

[复制链接]
跳转到指定楼层
楼主
发表于 2024-1-3 16:04:28 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
STM32MP157D-DK1 Qt镜像构建

上篇介绍了STM32MP57-DK1开发板官方系统的烧录。那个系统包含Linux系统的基础功能,如果要进行Qt开发,还需要重新构建带有Qt功能的镜像

本篇就来介绍如何构建带有Qt功能的系统镜像,并在开发板中烧录构建的镜像。

1 Distribution包的构建

STM32微处理器平台的STM32MPU嵌入式软件发行版支持三个软件包:

  • Starter Package 入门包可快速轻松地从任何STM32MP微处理器设备开始。Starter Package 是从分发包生成的。
  • Developer Package 开发人员包,用于在 STM32MPU 嵌入式软件发行版之上添加您自己的开发,或替换初学者包预构建的二进制文件。开发人员包是从分发包生成的。
  • Distribution Packag 分发包,用于创建您自己的 Linux® 发行版、您自己的入门包和您自己的开发人员包。

上一篇烧录的属于Starter Package 入门包,本篇是要构建Distribution Packag 分发包。

1.1 repo初始化

本篇使用的Ubuntu20系统进行测试。

  1. cd  ~/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package

  2. #repo init python3 ~/bin/repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mp1-v23.06.21

  3. #使用国内镜像源
  4. export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'

  5. #repo sync
  6. python3 ~/bin/repo sync
复制代码

初始化完成后会有一个layers文件夹:

1.2 构建系统初始化

OpenSTLinux提供了两种基于QT的镜像和SDK,这两种镜像和SDK的构建命令如下:

  • QT image and SDK with EGLFS


    1. # Initialize the OpenEmbedded build environment for the openstlinux-eglfs distro:

    2. $ DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
    3. # Build the image and the SDK:
    4. $ bitbake st-example-image-qt
    5. $ bitbake st-example-image-qt -c populate_sdk
    复制代码

  • QT image and SDK with weston/wayland

    1. # Initialize the OpenEmbedded build environment for the openstlinux-weston distro:

    2. $ DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
    3. # Build the image and the SDK:
    4. $ bitbake st-example-image-qtwayland
    5. $ bitbake st-example-image-qtwayland -c populate_sdk
    复制代码

    本篇使用第2种方式,即:


    1. DISTRO=openstlinux-weston MACHINE=stm32mp1
    2. source layers/meta-st/scripts/envsetup.sh
    3. bitbake st-example-image-qtwayland
    4. bitbake st-example-image-qtwayland -c populate_sdk
    复制代码


1.2.1 参数的含义

上述指令中, DISTRO、MACHINE以及bitbake后的镜像,可选的参数及含义如下:

DISTRO有3种可选:

Distro
Description

openstlinux-eglfsOpenSTLinux featuring eglfs - no X11, no Wayland
openstlinux-westonOpenSTLinux featuring Weston/Wayland
nodistroDEFAULT OPENEMBEDDED SETTING : DISTRO is not defined

MACHINE有4种可选:

Machine
Description

stm32mp1Machine configuration for STM32MP1 microprocessor device boards
stm32mp13-discoExample of machine configuration for STM32MP13 disco board (STM32MP135F-DK in OP-TEE boot mode on SDCard)
stm32mp15-discoExample of machine configuration for STM32MP1 disco board (Only STM32MP157F-DK2 in OP-TEE boot mode on SDCard)
stm32mp15-evalExample of machine configuration for STM32MP1 evaluation board (Only STM32MP157F-EV1 in OP-TEE boot mode on SDCard)

bitbake后的镜像有4种可选:

Image
Description

Official images

st-image-westonOpenSTLinux weston image with basic Wayland support (if enabled in distro)
Supported images

st-image-coreOpenSTLinux core image
Images, proposed as example only

st-example-image-qtST example of image based on QT framework
st-example-image-qtwaylandST example of image based on QT framework (available for ecosystem release ≥ v2.1.0 )1.2.2 初始化OpenEmbedded构建环境

在执行上述的第一行时,提示安装:

EXIT退出

n3-jinja2 python3-pip socat texinfo xterm zstd
  1. <div class="blockcode"><blockquote>sudo apt-get update
  2. sudo apt-get install build-essential chrpath diffstat gawk gcc-multilib libegl1-mesa libmpc-dev libsdl1.2-dev libssl-dev pylint python3-git python3-jinja2 python3-pip socat texinfo xterm zstd
复制代码

安装完依赖包后,再次执行初始化指令即可。

1.3 bitbake构建系统

执行第二句

  1. bitbake st-example-image-qtwayland
复制代码

可能会报以下错误:

注:截图中使用的bitbake st-image-weston指令,实际应该使用bitbake st-example-image-qtwayland.

1.3.1 URL问题解决

上述的URL问题,在local.conf中增加以下内容,三选一,可自己按理解修改,个人使用跳过检查连接

  1. #检查连接使用谷歌

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

  4. #跳过检查连接
  5. #skip connectivity checks
  6. CONNECTIVITY_CHECK_URIS = ""

  7. #检查连接使用百度
  8. #skip connectivity checks
  9. CONNECTIVITY_CHECK_URIS = "www.baidu.com"
复制代码

再次构建

  1. xxpcb@xxpcb-ubuntu20:~/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1$ bitbake st-example-image-qtwayland

  2. NOTE: Started PRServer with DBfile: /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/cache/prserv.sqlite3, Address: 127.0.0.1:44821, PID: 2899
  3. Loading cache: 100% |##############################################################################################################################################################| Time: 0:00:03
  4. Loaded 4879 entries from dependency cache.
  5. NOTE: Resolving any missing task queue dependencies

  6. Build Configuration:
  7. BB_VERSION           = "2.4.0"
  8. BUILD_SYS            = "x86_64-linux"
  9. NATIVELSBSTRING      = "universal"
  10. TARGET_SYS           = "arm-ostl-linux-gnueabi"
  11. MACHINE              = "stm32mp1"
  12. DISTRO               = "openstlinux-weston"
  13. DISTRO_VERSION       = "4.2.1-snapshot-20231222"
  14. TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
  15. TARGET_FPU           = "hard"
  16. DISTRO_CODENAME      = "mickledore"
  17. ACCEPT_EULA_stm32mp1 = "1"
  18. GCCVERSION           = "12.%"
  19. PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
  20. meta-python         
  21. meta-oe              
  22. meta-gnome           
  23. meta-initramfs      
  24. meta-multimedia      
  25. meta-networking      
  26. meta-webserver      
  27. meta-filesystems     
  28. meta-perl            = "HEAD:c032fd0b1a9d444711103c2703dfa8e2964a3865"
  29. meta-st-stm32mp      = "HEAD:931b3f5be2c00f55d114c8f9122082a9d229b776"
  30. meta-qt5             = "HEAD:cf6ffcbad5275a3428f6046468a0c9d572e813d1"
  31. meta-st-openstlinux  = "HEAD:8c780facff81d3c3878c5fdcd18bdd24fc36478d"
  32. meta                 = "HEAD:20cd64812d286c920bd766145ab1cd968e72667e"

  33. Initialising tasks: 100% |#########################################################################################################################################################| Time: 0:00:07
  34. Sstate summary: Wanted 1929 Local 252 Mirrors 0 Missed 1677 Current 1255 (13% match, 47% complete)
  35. NOTE: Executing Tasks
  36. WARNING: m4projects-stm32mp1-1.6.0-r0 do_fetch: Failed to fetch URL git://github.com/STMicroelectronics/STM32CubeMP1.git;protocol=https;branch=master, attempting MIRRORS if available
  37. ERROR: m4projects-stm32mp1-1.6.0-r0 do_fetch: Fetcher failure: Fetch commandexport PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus,guid=376020f3fcf9357f25d0b0e6658590d9"; export SSH_AGENT_PID="2123"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/sysroots-uninative/x86_64-linux/usr/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/m4projects-stm32mp1/1.6.0-r0/recipe-sysroot-native/usr/bin/python3-native:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/openembedded-core/scripts:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/m4projects-stm32mp1/1.6.0-r0/recipe-sysroot-native/usr/bin/arm-ostl-linux-gnueabi:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/m4projects-stm32mp1/1.6.0-r0/recipe-sysroot/usr/bin/crossscripts:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/m4projects-stm32mp1/1.6.0-r0/recipe-sysroot-native/usr/sbin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/m4projects-stm32mp1/1.6.0-r0/recipe-sysroot-native/usr/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/m4projects-stm32mp1/1.6.0-r0/recipe-sysroot-native/sbin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/m4projects-stm32mp1/1.6.0-r0/recipe-sysroot-native/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/openembedded-core/bitbake/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/hosttools"; export HOME="/home/xxpcb"; LANG=C git -c gc.autoDetach=false -c core.pager=cat clone --bare --mirror https://github.com/STMicroelectronics/STM32CubeMP1.git /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/downloads/git2/github.com.STMicroelectronics.STM32CubeMP1.git --progress failed with exit code 128, no output
  38. ERROR: m4projects-stm32mp1-1.6.0-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://github.com/STMicroelectronics/STM32CubeMP1.git;protocol=https;branch=master')
  39. ERROR: Logfile of failure stored in: /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/stm32mp1-ostl-linux-gnueabi/m4projects-stm32mp1/1.6.0-r0/temp/log.do_fetch.5445
  40. ERROR: Task (/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/meta-st/meta-st-stm32mp/recipes-extended/m4projects/m4projects-stm32mp1.bb:do_fetch) failed with WARNING: gcc-arm-none-eabi-native-11-r0 do_fetch: Failed to fetch URL https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz;name=gcc-arm-x86, attempting MIRRORS if available
  41. ERROR: gcc-arm-none-eabi-native-11-r0 do_fetch: Fetcher failure: Fetch commandexport PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus,guid=376020f3fcf9357f25d0b0e6658590d9"; export SSH_AGENT_PID="2123"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/openembedded-core/scripts/native-intercept:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/sysroots-uninative/x86_64-linux/usr/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/openembedded-core/scripts:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-linux/gcc-arm-none-eabi-native/11-r0/recipe-sysroot-native/usr/bin/x86_64-linux:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-linux/gcc-arm-none-eabi-native/11-r0/recipe-sysroot-native/usr/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-linux/gcc-arm-none-eabi-native/11-r0/recipe-sysroot-native/usr/sbin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-linux/gcc-arm-none-eabi-native/11-r0/recipe-sysroot-native/usr/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-linux/gcc-arm-none-eabi-native/11-r0/recipe-sysroot-native/sbin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-linux/gcc-arm-none-eabi-native/11-r0/recipe-sysroot-native/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/openembedded-core/bitbake/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/hosttools"; export HOME="/home/xxpcb"; /usr/bin/env wget -t 2 -T 30 --passive-ftp -O /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/downloads/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz.tmp -P /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/downloads 'https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz' --progress=dot -v failed with exit code 4, no output
  42. ERROR: gcc-arm-none-eabi-native-11-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz;name=gcc-arm-x86')
  43. ERROR: Logfile of failure stored in: /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-linux/gcc-arm-none-eabi-native/11-r0/temp/log.do_fetch.7490
  44. ERROR: Task (/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/meta-st/meta-st-stm32mp/recipes-devtools/gcc-arm-none-eabi/gcc-arm-none-eabi-native_11.bb:do_fetch) failed with exit code '1'
  45. NOTE: Tasks Summary: Attempted 4026 tasks of which 4016 didn't need to be rerun and 2 failed.
  46. NOTE: Writing buildhistory
  47. NOTE: Writing buildhistory took: 9 seconds

  48. Summary: 2 tasks failed:
  49.   /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/meta-st/meta-st-stm32mp/recipes-extended/m4projects/m4projects-stm32mp1.bb:do_fetch
  50.   /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/meta-st/meta-st-stm32mp/recipes-devtools/gcc-arm-none-eabi/gcc-arm-none-eabi-native_11.bb:do_fetch
  51. Summary: There were 2 WARNING messages.
  52. Summary: There were 4 ERROR messages, returning a non-zero exit code.
  53. xxpcb@xxpcb-ubuntu20:~/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1$
复制代码

1.3.2 do_fetch失败问题解决
  • 找到do_fetch失败的xx.bb文件目录位置,在bb文件中找到相关的下载地址,如 git://github.com/STMicroelectronics/STM32CubeMP1.git。然后去github网站下载对应的开发包
  • 在xx.bb文件的同级目录下创建files目录
  • 把github下载的文件拷贝到files目录
  • 修改bb文件,主要修改SRC_URI和S的值
    1. SRC_URI =
    2. "file://STM32CubeMP1"
    3. S = "${WORKDIR}/STM32CubeMP1"
    4. ---------------------------------------------------以下为原始的bb文件示例
    5. SUMMARY = "STM32MP1 Firmware examples for CM4"
    6. LICENSE = "Apache-2.0 & MIT & BSD-3-Clause"
    7. LIC_FILES_CHKSUM = "file://License.md;md5=532c0d9fc2820ec1304ab8e0f227acc7"

    8. SRC_URI = "git://github.com/STMicroelectronics/STM32CubeMP1.git;protocol=https;branch=master"
    9. SRCREV  = "b9a31179d5bf80b3958c3653153bfd4c3a7fc5d5"

    10. PV = "1.6.0"

    11. S = "${WORKDIR}/git"
    复制代码

  • 对于以上m4projects-stm32mp1的报错,最后执行bitbake m4projects-stm32mp1 -c compile

然后再次执行bitbake st-example-image-qtwayland进行构建。

可能还会报这个错,这是提示bb文件里LIC_FILES_CHKSUM的checksum不对,修改为提示给出的新的checksum即可。

然后再次执行构建,如果还报其它的bb文件do_fech失败的问题,也是类似的解决方法。或是确保ubuntu能正常访问github。

最终构建成功,没有报错:

  1. xxpcb@xxpcb-ubuntu20:~/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1$ bitbake st-example-image-qtwayland

  2. NOTE: Started PRServer with DBfile: /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/cache/prserv.sqlite3, Address: 127.0.0.1:41447, PID: 1373350
  3. Loading cache: 100% |###############################################################################################################################################################| Time: 0:00:01
  4. Loaded 4879 entries from dependency cache.
  5. NOTE: Resolving any missing task queue dependencies

  6. Build Configuration:
  7. BB_VERSION           = "2.4.0"
  8. BUILD_SYS            = "x86_64-linux"
  9. NATIVELSBSTRING      = "universal"
  10. TARGET_SYS           = "arm-ostl-linux-gnueabi"
  11. MACHINE              = "stm32mp1"
  12. DISTRO               = "openstlinux-weston"
  13. DISTRO_VERSION       = "4.2.1-snapshot-20231223"
  14. TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
  15. TARGET_FPU           = "hard"
  16. DISTRO_CODENAME      = "mickledore"
  17. ACCEPT_EULA_stm32mp1 = "1"
  18. GCCVERSION           = "12.%"
  19. PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
  20. meta-python         
  21. meta-oe              
  22. meta-gnome           
  23. meta-initramfs      
  24. meta-multimedia      
  25. meta-networking      
  26. meta-webserver      
  27. meta-filesystems     
  28. meta-perl            = "HEAD:c032fd0b1a9d444711103c2703dfa8e2964a3865"
  29. meta-st-stm32mp      = "HEAD:931b3f5be2c00f55d114c8f9122082a9d229b776"
  30. meta-qt5             = "HEAD:cf6ffcbad5275a3428f6046468a0c9d572e813d1"
  31. meta-st-openstlinux  = "HEAD:8c780facff81d3c3878c5fdcd18bdd24fc36478d"
  32. meta                 = "HEAD:20cd64812d286c920bd766145ab1cd968e72667e"

  33. Initialising tasks: 100% |##########################################################################################################################################################| Time: 0:00:08
  34. Sstate summary: Wanted 553 Local 337 Mirrors 0 Missed 216 Current 2631 (60% match, 93% complete)
  35. Removing 4 stale sstate objects for arch stm32mp1: 100% |###########################################################################################################################| Time: 0:00:00
  36. NOTE: Executing Tasks
  37. WARNING: st-example-image-qtwayland-1.0-r0 do_st_write_license_create_summary: IMG LIC SUM: File does not exist with open file /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/deploy/licenses/st-image-resize-initrd-openstlinux-weston-stm32mp1-20231223033959/package.manifest
  38. NOTE: Tasks Summary: Attempted 7818 tasks of which 7309 didn't need to be rerun and all succeeded.
  39. NOTE: Writing buildhistory
  40. NOTE: Writing buildhistory took: 5 seconds

  41. Summary: There was 1 WARNING message.
  42. xxpcb@xxpcb-ubuntu20:~/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1$
复制代码


构建成功后,可以看到构建的文件,用于固件烧录:

1.4 SDK构建

执行第三句

  1. bitbake st-example-image-qtwayland -c populate_sdk
复制代码

SDK的构建可以放到后续再执行。另外SDK的构建过程也可能会报错,例如:

  1. xpcb@xxpcb-ubuntu20:~/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1$ bitbake st-example-image-qtwayland -c populate_sdk

  2. NOTE: Started PRServer with DBfile: /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/cache/prserv.sqlite3, Address: 127.0.0.1:46147, PID: 2961833
  3. Loading cache: 100% |###############################################################################################################################################################| Time: 0:00:02
  4. Loaded 4879 entries from dependency cache.
  5. NOTE: Resolving any missing task queue dependencies

  6. Build Configuration:
  7. BB_VERSION           = "2.4.0"
  8. BUILD_SYS            = "x86_64-linux"
  9. NATIVELSBSTRING      = "universal"
  10. TARGET_SYS           = "arm-ostl-linux-gnueabi"
  11. MACHINE              = "stm32mp1"
  12. DISTRO               = "openstlinux-weston"
  13. DISTRO_VERSION       = "4.2.1-snapshot-20231224"
  14. TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
  15. TARGET_FPU           = "hard"
  16. DISTRO_CODENAME      = "mickledore"
  17. ACCEPT_EULA_stm32mp1 = "1"
  18. GCCVERSION           = "12.%"
  19. PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
  20. meta-python         
  21. meta-oe              
  22. meta-gnome           
  23. meta-initramfs      
  24. meta-multimedia      
  25. meta-networking      
  26. meta-webserver      
  27. meta-filesystems     
  28. meta-perl            = "HEAD:c032fd0b1a9d444711103c2703dfa8e2964a3865"
  29. meta-st-stm32mp      = "HEAD:931b3f5be2c00f55d114c8f9122082a9d229b776"
  30. meta-qt5             = "HEAD:cf6ffcbad5275a3428f6046468a0c9d572e813d1"
  31. meta-st-openstlinux  = "HEAD:8c780facff81d3c3878c5fdcd18bdd24fc36478d"
  32. meta                 = "HEAD:20cd64812d286c920bd766145ab1cd968e72667e"

  33. Initialising tasks: 100% |##########################################################################################################################################################| Time: 0:00:09
  34. Sstate summary: Wanted 363 Local 353 Mirrors 0 Missed 10 Current 2412 (97% match, 99% complete)
  35. Removing 4 stale sstate objects for arch stm32mp1: 100% |###########################################################################################################################| Time: 0:00:00
  36. NOTE: Executing Tasks
  37. WARNING: nativesdk-cmsis-svd-0.4+gitAUTOINC+f487b5ca7c-r0 do_fetch: Failed to fetch URL git://github.com/posborne/cmsis-svd.git;protocol=https;branch=master, attempting MIRRORS if available
  38. ERROR: nativesdk-cmsis-svd-0.4+gitAUTOINC+f487b5ca7c-r0 do_fetch: Fetcher failure: Fetch commandexport PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus,guid=376020f3fcf9357f25d0b0e6658590d9"; export SSH_AGENT_PID="2123"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/openembedded-core/scripts/nativesdk-intercept:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/sysroots-uninative/x86_64-linux/usr/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-nativesdk-ostl_sdk-linux/nativesdk-cmsis-svd/0.4+gitAUTOINC+f487b5ca7c-r0/recipe-sysroot-native/usr/bin/chrpath-native:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/openembedded-core/scripts:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-nativesdk-ostl_sdk-linux/nativesdk-cmsis-svd/0.4+gitAUTOINC+f487b5ca7c-r0/recipe-sysroot-native/usr/bin/x86_64-ostl_sdk-linux:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-nativesdk-ostl_sdk-linux/nativesdk-cmsis-svd/0.4+gitAUTOINC+f487b5ca7c-r0/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-ostl_sdk-linux/usr/bin/crossscripts:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-nativesdk-ostl_sdk-linux/nativesdk-cmsis-svd/0.4+gitAUTOINC+f487b5ca7c-r0/recipe-sysroot-native/usr/sbin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-nativesdk-ostl_sdk-linux/nativesdk-cmsis-svd/0.4+gitAUTOINC+f487b5ca7c-r0/recipe-sysroot-native/usr/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-nativesdk-ostl_sdk-linux/nativesdk-cmsis-svd/0.4+gitAUTOINC+f487b5ca7c-r0/recipe-sysroot-native/sbin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-nativesdk-ostl_sdk-linux/nativesdk-cmsis-svd/0.4+gitAUTOINC+f487b5ca7c-r0/recipe-sysroot-native/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/openembedded-core/bitbake/bin:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/hosttools"; export HOME="/home/xxpcb"; LANG=C git -c gc.autoDetach=false -c core.pager=cat clone --bare --mirror https://github.com/posborne/cmsis-svd.git /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/downloads/git2/github.com.posborne.cmsis-svd.git --progress failed with exit code 128, no output
  39. ERROR: nativesdk-cmsis-svd-0.4+gitAUTOINC+f487b5ca7c-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://github.com/posborne/cmsis-svd.git;protocol=https;branch=master')
  40. ERROR: Logfile of failure stored in: /home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1/tmp-glibc/work/x86_64-nativesdk-ostl_sdk-linux/nativesdk-cmsis-svd/0.4+gitAUTOINC+f487b5ca7c-r0/temp/log.do_fetch.2962053
  41. ERROR: Task (virtual:nativesdk:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/meta-st/meta-st-stm32mp/recipes-devtools/cmsis-svd/cmsis-svd_git.bb:do_fetch) failed with exit code '1'
  42. NOTE: Tasks Summary: Attempted 7862 tasks of which 7856 didn't need to be rerun and 1 failed.
  43. NOTE: Writing buildhistory
  44. NOTE: Writing buildhistory took: 5 seconds

  45. Summary: 1 task failed:
  46.   virtual:nativesdk:/home/xxpcb/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/layers/meta-st/meta-st-stm32mp/recipes-devtools/cmsis-svd/cmsis-svd_git.bb:do_fetch
  47. Summary: There was 1 WARNING message.
  48. Summary: There were 2 ERROR messages, returning a non-zero exit code.
  49. xxpcb@xxpcb-ubuntu20:~/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1$
复制代码

本篇烧录带Qt环境的系统可以先不需要构建SDK。

2 烧录2.1 烧录到SD卡

生成的文件中,找到FlashLayout_sdcard_stm32mp157d-dk1-optee.tsv即为烧录脚本:

  1. #Opt        Id        Name        Type        IP        Offset        Binary

  2. -        0x01        fsbl-boot        Binary        none        0x0        arm-trusted-firmware/tf-a-stm32mp157d-dk1-usb.stm32
  3. -        0x03        fip-boot        FIP        none        0x0        fip/fip-stm32mp157d-dk1-optee.bin
  4. P        0x04        fsbl1        Binary        mmc0        0x00004400        arm-trusted-firmware/tf-a-stm32mp157d-dk1-sdcard.stm32
  5. P        0x05        fsbl2        Binary        mmc0        0x00044400        arm-trusted-firmware/tf-a-stm32mp157d-dk1-sdcard.stm32
  6. P        0x06        metadata1        FWU_MDATA        mmc0        0x00084400        arm-trusted-firmware/metadata.bin
  7. P        0x07        metadata2        FWU_MDATA        mmc0        0x000C4400        arm-trusted-firmware/metadata.bin
  8. P        0x08        fip-a        FIP        mmc0        0x00104400        fip/fip-stm32mp157d-dk1-optee.bin
  9. PED        0x09        fip-b        FIP        mmc0        0x00504400        none
  10. PED        0x0A        u-boot-env        ENV        mmc0        0x00904400        none
  11. P        0x10        bootfs        System        mmc0        0x00984400        st-image-bootfs-openstlinux-weston-stm32mp1.ext4
  12. P        0x11        vendorfs        FileSystem        mmc0        0x04984400        st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
  13. P        0x12        rootfs        FileSystem        mmc0        0x05984400        st-example-image-qtwayland-openstlinux-weston-stm32mp1.ext4
  14. P        0x13        userfs        FileSystem        mmc0        0x105984400        st-image-userfs-openstlinux-weston-stm32mp1.ext4
复制代码

该文件位于如下位置:

烧录方式与上一篇介绍的烧录方式一样,这里再记录下烧录过程:

  1. export
  2. PATH=/home/xxpcb/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin:
  3. $PATH

  4. STM32_Programmer_CLI --h
  5. STM32_Programmer_CLI -l usb

  6. STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-example-image-qtwayland/optee/FlashLayout_sdcard_stm32mp157d-dk1-optee.tsv
复制代码

2.2 查看板子中Qt相关信息

可以使用find指令搜索Qt相关的文件:

可以看到搜索出许多Qt相关的文件,说明此系统是支持Qt的。

3 总结

本篇介绍了STM32MP57-DK1开发板如何搭建Qt运行环境的过程,通过构建Distribution包,并解决中间构建的各种问题,最终构建出了带有Qt功能的系统镜像,并烧录后测试。


+10
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|深圳市光明谷科技有限公司|光明谷商城|Sunshine Silicon Corpporation ( 粤ICP备14060730号|Sitemap

GMT+8, 2024-11-24 22:50 , Processed in 0.192789 second(s), 42 queries .

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表