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系统进行测试。

cd ~/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package#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 #使用国内镜像源
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'#repo sync
python3 ~/bin/repo sync

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

1.2 构建系统初始化

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

  • QT image and SDK with EGLFS

    # Initialize the OpenEmbedded build environment for the openstlinux-eglfs distro:
    $ DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
    # Build the image and the SDK:
    $ bitbake st-example-image-qt
    $ bitbake st-example-image-qt -c populate_sdk
    
  • QT image and SDK with weston/wayland

    # Initialize the OpenEmbedded build environment for the openstlinux-weston distro:
    $ DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
    # Build the image and the SDK:
    $ bitbake st-example-image-qtwayland
    $ bitbake st-example-image-qtwayland -c populate_sdk
    

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

DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
bitbake st-example-image-qtwayland
bitbake st-example-image-qtwayland -c populate_sdk

1.2.1 参数的含义

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

DISTRO有3种可选:

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

MACHINE有4种可选:

MachineDescription
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种可选:

ImageDescription
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退出

sudo apt-get update
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构建系统

执行第二句

bitbake st-example-image-qtwayland

可能会报以下错误:

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

1.3.1 URL问题解决

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

#检查连接使用谷歌
#check connectivity using google
CONNECTIVITY_CHECK_URIS = "https://www.google.com/"#跳过检查连接
#skip connectivity checks
CONNECTIVITY_CHECK_URIS = ""#检查连接使用百度
#skip connectivity checks
CONNECTIVITY_CHECK_URIS = "www.baidu.com"

再次构建

xxpcb@xxpcb-ubuntu20:~/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1$ bitbake st-example-image-qtwayland
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
Loading cache: 100% |##############################################################################################################################################################| Time: 0:00:03
Loaded 4879 entries from dependency cache.
NOTE: Resolving any missing task queue dependenciesBuild Configuration:
BB_VERSION           = "2.4.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-ostl-linux-gnueabi"
MACHINE              = "stm32mp1"
DISTRO               = "openstlinux-weston"
DISTRO_VERSION       = "4.2.1-snapshot-20231222"
TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU           = "hard"
DISTRO_CODENAME      = "mickledore"
ACCEPT_EULA_stm32mp1 = "1"
GCCVERSION           = "12.%"
PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
meta-python          
meta-oe              
meta-gnome           
meta-initramfs       
meta-multimedia      
meta-networking      
meta-webserver       
meta-filesystems     
meta-perl            = "HEAD:c032fd0b1a9d444711103c2703dfa8e2964a3865"
meta-st-stm32mp      = "HEAD:931b3f5be2c00f55d114c8f9122082a9d229b776"
meta-qt5             = "HEAD:cf6ffcbad5275a3428f6046468a0c9d572e813d1"
meta-st-openstlinux  = "HEAD:8c780facff81d3c3878c5fdcd18bdd24fc36478d"
meta                 = "HEAD:20cd64812d286c920bd766145ab1cd968e72667e"Initialising tasks: 100% |#########################################################################################################################################################| Time: 0:00:07
Sstate summary: Wanted 1929 Local 252 Mirrors 0 Missed 1677 Current 1255 (13% match, 47% complete)
NOTE: Executing Tasks
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
ERROR: m4projects-stm32mp1-1.6.0-r0 do_fetch: Fetcher failure: Fetch command export 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
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')
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
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
ERROR: gcc-arm-none-eabi-native-11-r0 do_fetch: Fetcher failure: Fetch command export 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
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')
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
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'
NOTE: Tasks Summary: Attempted 4026 tasks of which 4016 didn't need to be rerun and 2 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 9 secondsSummary: 2 tasks failed:/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/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
Summary: There were 2 WARNING messages.
Summary: There were 4 ERROR messages, returning a non-zero exit code.
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的值
SRC_URI = "file://STM32CubeMP1"
S = "${WORKDIR}/STM32CubeMP1"
---------------------------------------------------以下为原始的bb文件示例
SUMMARY = "STM32MP1 Firmware examples for CM4"
LICENSE = "Apache-2.0 & MIT & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://License.md;md5=532c0d9fc2820ec1304ab8e0f227acc7"SRC_URI = "git://github.com/STMicroelectronics/STM32CubeMP1.git;protocol=https;branch=master"
SRCREV  = "b9a31179d5bf80b3958c3653153bfd4c3a7fc5d5"PV = "1.6.0"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。

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

xxpcb@xxpcb-ubuntu20:~/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1$ bitbake st-example-image-qtwayland
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
Loading cache: 100% |###############################################################################################################################################################| Time: 0:00:01
Loaded 4879 entries from dependency cache.
NOTE: Resolving any missing task queue dependenciesBuild Configuration:
BB_VERSION           = "2.4.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-ostl-linux-gnueabi"
MACHINE              = "stm32mp1"
DISTRO               = "openstlinux-weston"
DISTRO_VERSION       = "4.2.1-snapshot-20231223"
TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU           = "hard"
DISTRO_CODENAME      = "mickledore"
ACCEPT_EULA_stm32mp1 = "1"
GCCVERSION           = "12.%"
PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
meta-python          
meta-oe              
meta-gnome           
meta-initramfs       
meta-multimedia      
meta-networking      
meta-webserver       
meta-filesystems     
meta-perl            = "HEAD:c032fd0b1a9d444711103c2703dfa8e2964a3865"
meta-st-stm32mp      = "HEAD:931b3f5be2c00f55d114c8f9122082a9d229b776"
meta-qt5             = "HEAD:cf6ffcbad5275a3428f6046468a0c9d572e813d1"
meta-st-openstlinux  = "HEAD:8c780facff81d3c3878c5fdcd18bdd24fc36478d"
meta                 = "HEAD:20cd64812d286c920bd766145ab1cd968e72667e"Initialising tasks: 100% |##########################################################################################################################################################| Time: 0:00:08
Sstate summary: Wanted 553 Local 337 Mirrors 0 Missed 216 Current 2631 (60% match, 93% complete)
Removing 4 stale sstate objects for arch stm32mp1: 100% |###########################################################################################################################| Time: 0:00:00
NOTE: Executing Tasks
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
NOTE: Tasks Summary: Attempted 7818 tasks of which 7309 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 5 secondsSummary: There was 1 WARNING message.
xxpcb@xxpcb-ubuntu20:~/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1$ 

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

1.4 SDK构建

执行第三句

bitbake st-example-image-qtwayland -c populate_sdk

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

xxpcb@xxpcb-ubuntu20:~/myTest/STM32MP157/STM32MPU-Ecosystem-v5.0.0/Distribution-Package/build-openstlinuxweston-stm32mp1$ bitbake st-example-image-qtwayland -c populate_sdk
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
Loading cache: 100% |###############################################################################################################################################################| Time: 0:00:02
Loaded 4879 entries from dependency cache.
NOTE: Resolving any missing task queue dependenciesBuild Configuration:
BB_VERSION           = "2.4.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-ostl-linux-gnueabi"
MACHINE              = "stm32mp1"
DISTRO               = "openstlinux-weston"
DISTRO_VERSION       = "4.2.1-snapshot-20231224"
TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU           = "hard"
DISTRO_CODENAME      = "mickledore"
ACCEPT_EULA_stm32mp1 = "1"
GCCVERSION           = "12.%"
PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
meta-python          
meta-oe              
meta-gnome           
meta-initramfs       
meta-multimedia      
meta-networking      
meta-webserver       
meta-filesystems     
meta-perl            = "HEAD:c032fd0b1a9d444711103c2703dfa8e2964a3865"
meta-st-stm32mp      = "HEAD:931b3f5be2c00f55d114c8f9122082a9d229b776"
meta-qt5             = "HEAD:cf6ffcbad5275a3428f6046468a0c9d572e813d1"
meta-st-openstlinux  = "HEAD:8c780facff81d3c3878c5fdcd18bdd24fc36478d"
meta                 = "HEAD:20cd64812d286c920bd766145ab1cd968e72667e"Initialising tasks: 100% |##########################################################################################################################################################| Time: 0:00:09
Sstate summary: Wanted 363 Local 353 Mirrors 0 Missed 10 Current 2412 (97% match, 99% complete)
Removing 4 stale sstate objects for arch stm32mp1: 100% |###########################################################################################################################| Time: 0:00:00
NOTE: Executing Tasks
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
ERROR: nativesdk-cmsis-svd-0.4+gitAUTOINC+f487b5ca7c-r0 do_fetch: Fetcher failure: Fetch command export 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
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')
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
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'
NOTE: Tasks Summary: Attempted 7862 tasks of which 7856 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 5 secondsSummary: 1 task failed: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
Summary: There was 1 WARNING message.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
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即为烧录脚本:

#Opt	Id	Name	Type	IP	Offset	Binary
-	0x01	fsbl-boot	Binary	none	0x0	arm-trusted-firmware/tf-a-stm32mp157d-dk1-usb.stm32
-	0x03	fip-boot	FIP	none	0x0	fip/fip-stm32mp157d-dk1-optee.bin
P	0x04	fsbl1	Binary	mmc0	0x00004400	arm-trusted-firmware/tf-a-stm32mp157d-dk1-sdcard.stm32
P	0x05	fsbl2	Binary	mmc0	0x00044400	arm-trusted-firmware/tf-a-stm32mp157d-dk1-sdcard.stm32
P	0x06	metadata1	FWU_MDATA	mmc0	0x00084400	arm-trusted-firmware/metadata.bin
P	0x07	metadata2	FWU_MDATA	mmc0	0x000C4400	arm-trusted-firmware/metadata.bin
P	0x08	fip-a	FIP	mmc0	0x00104400	fip/fip-stm32mp157d-dk1-optee.bin
PED	0x09	fip-b	FIP	mmc0	0x00504400	none
PED	0x0A	u-boot-env	ENV	mmc0	0x00904400	none
P	0x10	bootfs	System	mmc0	0x00984400	st-image-bootfs-openstlinux-weston-stm32mp1.ext4
P	0x11	vendorfs	FileSystem	mmc0	0x04984400	st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
P	0x12	rootfs	FileSystem	mmc0	0x05984400	st-example-image-qtwayland-openstlinux-weston-stm32mp1.ext4
P	0x13	userfs	FileSystem	mmc0	0x105984400	st-image-userfs-openstlinux-weston-stm32mp1.ext4

该文件位于如下位置:

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

export PATH=/home/xxpcb/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin:$PATHSTM32_Programmer_CLI --h
STM32_Programmer_CLI -l usbSTM32_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功能的系统镜像,并烧录后测试。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/224521.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

mySQL事务与存储引擎

目录 mySQL事务 1.事务的概念 2.事务的ACID特点 3.多客户端同时访问一个表时,出现的一致性问题 4.事务的隔离级别 5.事务的隔离级别作用范围 查询全局事务隔离级别 设置全局事务隔离级别 ​编辑查询会话事务隔离级别 设置会话事务隔离级别 6.事务控制语句…

python 解决手机拍的书籍图片发灰的问题

老师给发的作业经常是手机拍的,而不是扫描,背景发灰,如果二次打印就没有看了,象这样: 如果使用photoshop 处理,有些地方还是扣不干净,不如python 做的好,处理后如下: 具体…

java数据结构与算法刷题-----LeetCode167:两数之和 II - 输入有序数组

java数据结构与算法刷题目录(剑指Offer、LeetCode、ACM)-----主目录-----持续更新(进不去说明我没写完):https://blog.csdn.net/grd_java/article/details/123063846 思路 题目要求我们找到两个数相加的和,等于target指定的值。而…

每日一题——LeetCode914

方法一 个人解法: 因为分组后每组里的数字要是相同的,所以先把有几种数字,每种数字有几张都统计出来用group数组保存,并同时记录最少的张数min。按照要求每组至少要有2张牌,所以可以直接排除最少张数为1的。如果整副…

Python深度学习029:pytorch中常用的模块或方法

PyTorch是一个广泛使用的深度学习库,提供了许多用于构建和训练神经网络的模块和方法。下面是一些PyTorch中常用的模块和方法的简要介绍: PyTorch常用模块和方法 torch 用途:PyTorch的基础模块,提供了多种数学运算功能。常用方法: torch.tensor():创建张量torch.randn():…

Grafana高可用-LDAP

一. grafana高可用 1. 迁移之前的 grafana sqlitedump.sh #!/bin/bash DB$1 TABLES$(sqlite3 $DB .tables | sed -r s/(\S)\s(\S)/\1\n\2/g | grep -v migration_log) for t in $TABLES; doecho "TRUNCATE TABLE $t;" done for t in $TABLES; doecho -e ".mode…

Spring Boot学习随笔- 第一个Thymeleaf应用(基础语法th:,request、session作用域取值)

学习视频:【编程不良人】2021年SpringBoot最新最全教程 第十五章、Thymeleaf Thymeleaf是一种现代化的服务器端Java模板引擎,专门用于Web和独立环境。Thymeleaf在有网络和无网络的环境下皆可运行,即可以让美工在浏览器查看页面的静态效果&am…

less 查看文本时,提示may be a binary file.See it anyway?

解决办法 首先使用echo $LESSCHARSET查看less的编码 看情况设置less的编码格式(我的服务器上使用utf-8查看中文) 还要特别注意一下,Linux中存在的文本文件的编码一定要是utf - 8;(这一步很关键) 例如:要保证windows上传到Linux的…

【机器学习】模式识别

1 概述 模式识别,简单来讲,就是分类问题。 模式识别应用:医学影像分析、人脸识别、车牌识别、遥感图像 2 模式分类器 分类器的分类:线性分类器、非线性分类器、最近邻分类器 2.1 分类器的训练(学习)过…

【DevOps 工具链】软件版本号命名规范 - 3种规则(读这一篇就够了)

文章目录 1、简述2、常见软件的版本号命名规则3、版本号命名规范整理3.1、XYZ/MMP3.1.1、规则3.1.2、确定3.1.3、举例3.1.4、详细规则 3.2、XYZD/MMPD3.3、VRC3.3.1、规则3.3.2、对"Vxxx"的说明3.3.3、对"Rxxx"的说明3.3.4、对"LLL"的说明3.3.5、…

MyBatis:Generator

MyBatis Generator附批量操作分页查询存储过程 Generator 介绍网址:Introduction to MyBatis Generator Generator ,一个用于 MyBatis 的代码生成工具,可以根据数据库表结构自动生成对应的实体类、DAO 接口和 SQL 映射文件,提高…

使用Visual Studio调试VisionPro脚本

使用Visual Studio调试VisionPro脚本 方法一 : 修改项目文件 csproj步骤: 方法二 : Visual Studio附加功能步骤: 方法一 : 修改项目文件 csproj 步骤: 开启VisionPro脚本调试功能 创建一个VisionPro程序…

【MySQL学习笔记009】事务

一、事务简介 事务是一组操作的集合,它是一个不可分割的工作单位,事务会把所有的操作作为一个整体一起向系统提交或撤销操作请求,即这些操作要么同时成功,要么同时失败。 二、事务操作 1、操作1 查看/设置事务提交方式 select a…

竞赛保研 基于YOLO实现的口罩佩戴检测 - python opemcv 深度学习

文章目录 0 前言1 课题介绍2 算法原理2.1 算法简介2.2 网络架构 3 关键代码4 数据集4.1 安装4.2 打开4.3 选择yolo标注格式4.4 打标签4.5 保存 5 训练6 实现效果6.1 pyqt实现简单GUI6.3 视频识别效果6.4 摄像头实时识别 7 最后 0 前言 🔥 优质竞赛项目系列&#xf…

07 Vue3框架简介

文章目录 一、Vue3简介1. 简介2. 相关网站3. 前端技术对比4. JS前端框架5. Vue核心内容6. 使用方式 二、基础概念1. 创建一个应用2. 变量双向绑定(v-model)3. 条件控制(v-if)4. 数组遍历(v-for)5. 绑定事件…

MATLAB信号处理与应用 读书笔记 一

完成了基本操作,今天组数也正常,需要对应解决fsctrl文件中的信号处理相关 重点关注4傅里叶变换,6FIR滤波器,10信号处理中的应用字符的链接[aa,bb]; N18;N216; n0:N-1;k10:N1-1;k20:N2-1; w2*pi*(0:2047)/2048; Xw(1-…

JavaWeb后门(webshell)基础

0x00 基础 JSP JSP全称为JavaServer Pages&#xff0c;是一种用于开发支持动态内容的Web页面的技术。它有助于开发人员通过使用特殊的JSP标记在HTML页面中插入Java代码&#xff0c;其中大多数以<&#xff05;开头&#xff0c;以&#xff05;>结尾。Java是一种通用的计算…

《C++避坑神器·二十五》简单搞懂json文件的读写之遍历json文件读写

json.hpp库放在文章末尾 1、遍历json文件读写 &#xff08;1&#xff09;插入新键值对到json之情形1 原来json文件如下所示&#xff1a; {"Connection": {"IpAddress": "192.168.20.1","Rock": 0,"Solt": 1}, "Data…

QT trimmed和simplified

trimmed&#xff1a;去除了字符串开头前和结尾后的空白&#xff1b; simplified&#xff1a;去除了字符串开头前和结尾后的空白&#xff0c;以及中间内部的空白字符也去掉&#xff08;\t,\n,\v,\f,\r和 &#xff09; 代码&#xff1a; QString str " 1 2 3 4 5 …

【MySQL】脏读、不可重复读、幻读介绍及代码解释

&#x1f34e;个人博客&#xff1a;个人主页 &#x1f3c6;个人专栏&#xff1a; 数 据 库 ⛳️ 功不唐捐&#xff0c;玉汝于成 目录 前言 正文 结语 我的其他博客 前言 数据库事务隔离级别是关系数据库管理系统中一个重要的概念&#xff0c;它涉及到多个事务并发执行…