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.mzph.cn/news/577535.shtml

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

相关文章

[C/C++]数据结构 希尔排序

🥦前言: 希尔排序也称 “缩小增量排序”,它也是一种插入类排序的方法,在学习希尔排序之前我们首先了解一下直接插入排序. 一: 🚩直接插入排序 1.1 🌟排序思路 直接插入排序的基本原理是将一条记录插入到已排好的有序表中&#x…

【经典LeetCode算法题目专栏分类】【第11期】递归问题:字母大小写全排列、括号生成

《博主简介》 小伙伴们好,我是阿旭。专注于人工智能AI、python、计算机视觉相关分享研究。 ✌更多学习资源,可关注公-仲-hao:【阿旭算法与机器学习】,共同学习交流~ 👍感谢小伙伴们点赞、关注! 《------往期经典推荐--…

【C++】STL 容器 - list 双向链表容器 ① ( 容器特点 | 容器操作时间复杂度 | 构造函数 )

文章目录 一、 list 双向链表容器简介1、容器特点2、容器操作时间复杂度3、遍历访问5、头文件 二、 list 双向链表容器 构造函数1、默认无参构造函数2、创建包含 n 个相同元素的 list 双向链表3、使用初始化列表构造 list 双向链表4、使用另外一个 list 容器 构造 list 双向链表…

新概念第二册(1)

【New words and expressions】生词和短语(12) private adj. 私人的 conversation n. 谈话 theatre n. 剧场,戏院 seat n. 座位 play …

关于MULTI#STORM活动利用远程访问木马瞄准印度和美国的动态情报

一、基本内容 于2023年6月22日,一款代号为MULTI#STORM的新网络钓鱼活动将目标瞄准了印度和美国,利用JavaScript文件在受感染的系统上传播远程访问木马。 二、相关发声情况 Securonix的研究人员Den luzvyk、Tim Peck和Oleg Kolesnikov发表声明称&#x…

session 的原理

目录 1,session 的原理如何删除 session1,设置过期时间2,客户端主动通知 2,和 cookie 的区别安全性举例:验证码 3,举例 1,session 的原理 建议先看这篇文章:浏览器 cookie 的原理&a…

虚继承解决菱形继承的原理

菱形继承的问题,是由多重继承的父类祖先是同一个父类导致的。如下面的情况: 菱形继承,会导致同名成员的二义性问题和数据冗余问题,用下面的代码来测试: class A { public:int _a; }; // class B : public A class B :…

ES8生产实践——Kibana对接Azure AD实现单点登录

基本概念介绍 什么是单点登录 单点登录(Single Sign-On,SSO)是一种身份验证和访问控制机制,允许用户使用一组凭据(通常是用户名和密码)仅需登录一次,即可访问多个应用程序或系统,而…

SpringIOC之AbstractResourceBasedMessageSource

博主介绍:✌全网粉丝5W,全栈开发工程师,从事多年软件开发,在大厂呆过。持有软件中级、六级等证书。可提供微服务项目搭建与毕业项目实战,博主也曾写过优秀论文,查重率极低,在这方面有丰富的经验…

C++11特性:线程同步之条件变量

条件变量是C11提供的另外一种用于等待的同步机制,它能阻塞一个或多个线程,直到收到另外一个线程发出的通知或者超时时,才会唤醒当前阻塞的线程。条件变量需要和互斥量配合起来使用,C11提供了两种条件变量: 1. conditi…

算法学习系列(十一):KMP算法

目录 引言一、算法概念二、题目描述三、思路讲解三、代码实现四、测试 引言 这个KMP算法就是怎么说呢,就是不管算法竞赛还是找工作笔试面试,都是非常爱问爱考的,其实也是因为这个算法比较难懂,其实就是很难,所以非常个…

智能优化算法应用:基于指数分布算法3D无线传感器网络(WSN)覆盖优化 - 附代码

智能优化算法应用:基于指数分布算法3D无线传感器网络(WSN)覆盖优化 - 附代码 文章目录 智能优化算法应用:基于指数分布算法3D无线传感器网络(WSN)覆盖优化 - 附代码1.无线传感网络节点模型2.覆盖数学模型及分析3.指数分布算法4.实验参数设定5.算法结果6.…

React 路由跳转

1. push 与 replace 模式 默认情况下,开启的是 push 模式,也就是说,每次点击跳转,都会向栈中压入一个新的地址,在点击返回时,可以返回到上一个打开的地址, 就像上图一样,我们每次返…

Windows下安装Oracle19C

官网下载oracle19c 以及客户端 官网地址:Software Download | Oracle 这个是要登录账号的,没有的可以注册,登录上 这个时候在点开这个官网:Database Software Downloads | Oracle 往下面滑 点了之后有个界面注意事项勾上,点下载,你就会下载: 安装oracle19c 解压安…

入门级:用devEco Studio创建一个鸿蒙APP

文章概叙 本文主要讲的是如何在鸿蒙的开发工具devEco Studio新建一个项目,全文很水,只适合新手!! 开始贴图 假设当前你已经下载好了devEco Studio,但是还没正式开始安装,此时你点击安装包,你会发下如下页面,只需要点…

【Linux系统编程】【Google面试题改编】线程之间的同步与协调 Linux文件操作

编写程序,有四个线程1、2、3、4 线程1的功能就是输1,线程2的功能就是输出2,以此类推……现在有四个文件ABCD初始都为空 现要让四个文件呈如下格式: A: 1 22 333 4444 1 22 333 4444… B: 22 333 4444 1 22 333 4444 1… C: 333 4444 1 22 333 4444 1 2…

搭建react+ant design pro+umi 项目框架

一、 写本文的原因 我搭建reactantdumi这个框架的原始资料主要是来源于(ReactUmi4从零快速搭建中后台系统保姆级记录教程(一、项目创建及初始化)) 而我写这篇文章的本意就是用来记录我用搭建时候的步骤汇总。 二、 npm和node版…

Nginx快速入门:实现企业安全防护|nginx部署https,ssl证书(七)

0. 引言 之前我们讲到nginx的一大核心作用就是实现企业安全防护,而实现安全防护的原理就是通过部署https证书,以此实现参数加密访问,从而加强企业网站的安全能力。 nginx作为各类服务的统一入口,只需要在入口处部署一个证书&…

解决Maven找不到依赖的问题

如果经过Reload Maven项目,清除Idea缓存,甚至重启Idea等方法都解决不了Dependency xxx not found的问题,不妨试试手动安装。 1. 进入maven仓库,搜索自己需要的对应版本的依赖。 2. 点击下图红框jar图标下载对应的jar包&#xff0c…

【K8S基础】-k8s的核心概念控制器和调度器

Kubernetes是一个开源的容器编排平台,旨在简化和自动化容器化应用程序的部署、扩展和管理。它提供了一个强大的基础设施来管理容器化应用程序的生命周期,并确保它们在整个集群中高效运行。 Kubernetes的核心概念包括集群、节点、Pod、控制器、调度器等。…