1、初始化环境变量


Host
phytec@ubuntu:~/BSP/BSP-Yocto-NXP-i.MX8MP-PD22.1.0$ source sources/poky/oe-init-build-env 

██████╗ ██╗  ██╗██╗   ██╗████████╗███████╗ ██████╗
██╔══██╗██║  ██║╚██╗ ██╔╝╚══██╔══╝██╔════╝██╔════╝
██████╔╝███████║ ╚████╔╝    ██║   █████╗  ██║     
██╔═══╝ ██╔══██║  ╚██╔╝     ██║   ██╔══╝  ██║     
██║     ██║  ██║   ██║      ██║   ███████╗╚██████╗
╚═╝     ╚═╝  ╚═╝   ╚═╝      ╚═╝   ╚══════╝ ╚═════╝


Welcome to the PHYTEC BSP-Yocto buildsystem.

Before building for the first time, you should take a look in the main
configuration file 'conf/local.conf'. There you can tweak the build system
settings and license configuration. For example you may have to accept the
Freescale/NXP GPU and VPU licence for an i.MX6 board.

Tested build target for this build configuration is:

   $ bitbake phytec-headless-image


2、确认BSP是否有qtcharts相关支持


Host
phytec@ubuntu:~/BSP/BSP-Yocto-NXP-i.MX8MP-PD22.1.0/build$ bitbake -s | grep chart
bootchart                                           1:1.17-r1                                                    
bootchart2                                         :0.14.9-r0                                                    
bootchart2-native                                  :0.14.9-r0                                                    
python3-pyqtchart                                  :5.15.1-r0                                                    
qtcharts                            :5.15.2+gitAUTOINC+130463160b-r0                                                    
systemd-bootchart  

3、在build/conf/local.conf中添加qtcharts和python3-pyqtchart支持


local.conf
IMAGE_INSTALL_append += "qtcharts python3-pyqtchart"

4、编译phytec-qt5demo-image


Host
phytec@ubuntu:~/BSP/BSP-Yocto-NXP-i.MX8MP-PD22.1.0/build$ bitbake phytec-qt5demo-image


报错解决

qtcharts_git.bb
diff --git a/recipes-qt/qt5/qtcharts_git.bb b/recipes-qt/qt5/qtcharts_git.bb
index 1a5238f..edba631 100644
--- a/recipes-qt/qt5/qtcharts_git.bb
+++ b/recipes-qt/qt5/qtcharts_git.bb
@@ -6,9 +6,11 @@ LIC_FILES_CHKSUM = " \
     file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \
 "

+SRC_URI = "git://github.com/qt/qtcharts.git;protocol=https;branch=5.15"
+
 DEPENDS += "qtbase qtdeclarative qtmultimedia"

-SRCREV = "a67f812548b008e3eedcd2bb9313828a195fd23b"
+SRCREV = "130463160b4923069eb98da49edaf7d93180f4f8"

 # The same issue as in qtbase:
 # http://errors.yoctoproject.org/Errors/Details/152641/


编译结果在BSP-Yocto-NXP-i.MX8MP-PD22.1.0/build/deploy/images中。

5、生成SDK


Host
phytec@ubuntu:~/BSP/BSP-Yocto-NXP-i.MX8MP-PD22.1.0/build$ bitbake phytec-qt5demo-image -c populate_sdk


编译结果在BSP-Yocto-NXP-i.MX8MP-PD22.1.0/build/deploy/sdk中。

编译完后,注意需要重新安装SDK和更新文件系统。

  • No labels