Page tree
Skip to end of metadata
Go to start of metadata

i2SOM已经提供好整个Yocto软件包,可以直接使用。同时还提供了一份download软件包,以节省开发者用于再次下载软件包所花费的时间。

MACHINE参数支持两种设备:

MACHINE参数适用设备
panguPanGu开发板

构建前,需要把i2SOM-ST-Yocto.tar.gz和i2SOM-Yocto-predl-pkgs.tar.xz文件下载后放在"$HOME/PanGu"目录下。

请注意,这里创建的PanGu目录是位于"$HOME"下,而不是/home目录。Yocto构建是在普通用户下,请不要使用root用户来构建。

编译前准备

分别解压Yocto代码,downloads,sstate-cache目录。

  • downloads是Yocto在编译期间默认下载需要的软件包的目录。为了节省时间,PanGu提供了提前下载好的软件包,可以节省下载时间。
  • sstate-cache是Yocto在编译时使用的软件包校验信息目录。为了节省时间,PanGu提供了的sstate-cache目录,可以节省下载时间。
$ cd $HOME/PanGu
$ tar xvf i2SOM-ST-Yocto.tar.gz
$ tar xvf i2som-pangu-predownload.tar.xz
$ tar xvf i2som-pangu-sstate-cache.tar.xz
$ cd i2SOM-ST-Yocto
$ DISTRO=openstlinux-weston MACHINE=pangu source layers/meta-i2som-styocto/scripts/envsetup.sh

上面的最后一步是初始化Yocto的构建目录,执行后会自动创建i2c6ulxbn目录,并加载相应的环境变量至当前shell环境。

如果退出当前shell环境后,可以使用以下命令重新进入已创建好的构建目录

$ DISTRO=openstlinux-weston MACHINE=pangu source layers/meta-i2som-styocto/scripts/envsetup.sh


i2SOM Yocto的提供了以下系统镜像:

DISTRO镜像名称系统名称描述应用场景

openstlinux-eglfs

openstlinux-weston

core-image-base命令行版系统(CommandLine System)不包含任何图形库适合无显示的产品,通讯网关、工业控制器、数据采集器等
openstlinux-eglfsi2som-image-qtQt5图形产品版系统(GUI System)包含基于Qt5图形库适合需要人机交互、图表显示的产品,智能家居控制、工业辅助操作仪表
openstlinux-westoni2som-image-weston基于Wayland的weston镜像weston包含基于Wayland图形库适合需要人机交互、图表显示的产品,智能家居控制、工业辅助操作仪表



构建命令行产品版系统(CommandLine System)

下面开始为PanGu开发板构建命令行版系统。

$ bitbake i2som-image-weston

构建花费的时间,取决计算机的CPU,内存和硬盘。CPU决定并行的任务数量。Yocto在编译时会产生大量文件,因此SSD会比HDD的速度快很多。

构建完成后,会在当前目录下的"tmp-glibc/deploy/images/pangu/"目录下看到构建出的镜像文件。

$ ls -lh tmp-glibc/deploy/images/pangu/
total 859M
-rw-r--r-- 1 build build  93M Jul 10 14:56 core-image-base-openstlinux-weston-pangu-20190710065454.rootfs.ext4
-rw-r--r-- 1 build build  21K Jul 10 14:56 core-image-base-openstlinux-weston-pangu-20190710065454.rootfs.manifest
-rw-r--r-- 1 build build  18M Jul 10 14:56 core-image-base-openstlinux-weston-pangu-20190710065454.rootfs.tar.xz
-rw-r--r-- 1 build build 309K Jul 10 14:56 core-image-base-openstlinux-weston-pangu-20190710065454.testdata.json
lrwxrwxrwx 1 build build   67 Jul 10 14:56 core-image-base-openstlinux-weston-pangu.ext4 -> core-image-base-openstlinux-weston-pangu-20190710065454.rootfs.ext4
lrwxrwxrwx 1 build build   71 Jul 10 14:56 core-image-base-openstlinux-weston-pangu.manifest -> core-image-base-openstlinux-weston-pangu-20190710065454.rootfs.manifest
lrwxrwxrwx 1 build build   69 Jul 10 14:56 core-image-base-openstlinux-weston-pangu.tar.xz -> core-image-base-openstlinux-weston-pangu-20190710065454.rootfs.tar.xz
lrwxrwxrwx 1 build build   69 Jul 10 14:56 core-image-base-openstlinux-weston-pangu.testdata.json -> core-image-base-openstlinux-weston-pangu-20190710065454.testdata.json
drwxr-xr-x 2 build build 4.0K Jul 10 14:56 flashlayout_core-image-base
drwxr-xr-x 2 build build 4.0K Jul  7 23:35 flashlayout_i2som-image-weston
-rw-r--r-- 1 build build 475M Jul  7 23:35 i2som-image-weston-openstlinux-weston-pangu-20190707151603.rootfs.ext4
-rw-r--r-- 1 build build  60K Jul  7 23:34 i2som-image-weston-openstlinux-weston-pangu-20190707151603.rootfs.manifest
-rw-r--r-- 1 build build  96M Jul  7 23:35 i2som-image-weston-openstlinux-weston-pangu-20190707151603.rootfs.tar.xz
-rw-r--r-- 1 build build 320K Jul  7 23:34 i2som-image-weston-openstlinux-weston-pangu-20190707151603.testdata.json
lrwxrwxrwx 1 build build   70 Jul  7 23:35 i2som-image-weston-openstlinux-weston-pangu.ext4 -> i2som-image-weston-openstlinux-weston-pangu-20190707151603.rootfs.ext4
lrwxrwxrwx 1 build build   74 Jul  7 23:34 i2som-image-weston-openstlinux-weston-pangu.manifest -> i2som-image-weston-openstlinux-weston-pangu-20190707151603.rootfs.manifest
lrwxrwxrwx 1 build build   72 Jul  7 23:35 i2som-image-weston-openstlinux-weston-pangu.tar.xz -> i2som-image-weston-openstlinux-weston-pangu-20190707151603.rootfs.tar.xz
lrwxrwxrwx 1 build build   72 Jul  7 23:34 i2som-image-weston-openstlinux-weston-pangu.testdata.json -> i2som-image-weston-openstlinux-weston-pangu-20190707151603.testdata.json
lrwxrwxrwx 2 build build   59 Jul  7 23:05 Image -> Image--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin
-rw-r--r-- 2 build build  15M Jul  7 23:05 Image--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin
lrwxrwxrwx 2 build build   59 Jul  7 23:05 Image-pangu.bin -> Image--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin
drwxr-xr-x 2 build build 4.0K Jun 30 02:25 scripts
-rw-r--r-- 2 build build  64M Jul  7 23:07 st-image-bootfs-openstlinux-weston-pangu-20190707145953.bootfs.ext4
-rw-r--r-- 2 build build 5.9M Jul  7 23:07 st-image-bootfs-openstlinux-weston-pangu-20190707145953.bootfs.tar.xz
-rw-r--r-- 2 build build  147 Jul  7 23:07 st-image-bootfs-openstlinux-weston-pangu-20190707145953.rootfs.manifest
-rw-r--r-- 2 build build 308K Jul  7 23:07 st-image-bootfs-openstlinux-weston-pangu-20190707145953.testdata.json
lrwxrwxrwx 2 build build   67 Jul  7 23:07 st-image-bootfs-openstlinux-weston-pangu.ext4 -> st-image-bootfs-openstlinux-weston-pangu-20190707145953.bootfs.ext4
lrwxrwxrwx 2 build build   71 Jul  7 23:07 st-image-bootfs-openstlinux-weston-pangu.manifest -> st-image-bootfs-openstlinux-weston-pangu-20190707145953.rootfs.manifest
lrwxrwxrwx 2 build build   69 Jul  7 23:07 st-image-bootfs-openstlinux-weston-pangu.tar.xz -> st-image-bootfs-openstlinux-weston-pangu-20190707145953.bootfs.tar.xz
lrwxrwxrwx 2 build build   69 Jul  7 23:07 st-image-bootfs-openstlinux-weston-pangu.testdata.json -> st-image-bootfs-openstlinux-weston-pangu-20190707145953.testdata.json
-rw-r--r-- 2 build build  12K Jul  7 23:31 st-image-userfs-openstlinux-weston-pangu-20190707151603.rootfs.manifest
-rw-r--r-- 2 build build 309K Jul  7 23:31 st-image-userfs-openstlinux-weston-pangu-20190707151603.testdata.json
-rw-r--r-- 2 build build  94M Jul  7 23:31 st-image-userfs-openstlinux-weston-pangu-20190707151603.userfs.ext4
-rw-r--r-- 2 build build  60M Jul  7 23:31 st-image-userfs-openstlinux-weston-pangu-20190707151603.userfs.tar.xz
lrwxrwxrwx 2 build build   67 Jul  7 23:31 st-image-userfs-openstlinux-weston-pangu.ext4 -> st-image-userfs-openstlinux-weston-pangu-20190707151603.userfs.ext4
lrwxrwxrwx 2 build build   71 Jul  7 23:31 st-image-userfs-openstlinux-weston-pangu.manifest -> st-image-userfs-openstlinux-weston-pangu-20190707151603.rootfs.manifest
lrwxrwxrwx 2 build build   69 Jul  7 23:31 st-image-userfs-openstlinux-weston-pangu.tar.xz -> st-image-userfs-openstlinux-weston-pangu-20190707151603.userfs.tar.xz
lrwxrwxrwx 2 build build   69 Jul  7 23:31 st-image-userfs-openstlinux-weston-pangu.testdata.json -> st-image-userfs-openstlinux-weston-pangu-20190707151603.testdata.json
-rw-r--r-- 2 build build  259 Jul  7 23:07 st-image-vendorfs-openstlinux-weston-pangu-20190707145953.rootfs.manifest
-rw-r--r-- 2 build build 309K Jul  7 23:07 st-image-vendorfs-openstlinux-weston-pangu-20190707145953.testdata.json
-rw-r--r-- 2 build build  16M Jul  7 23:07 st-image-vendorfs-openstlinux-weston-pangu-20190707145953.vendorfs.ext4
-rw-r--r-- 2 build build 2.2M Jul  7 23:07 st-image-vendorfs-openstlinux-weston-pangu-20190707145953.vendorfs.tar.xz
lrwxrwxrwx 2 build build   71 Jul  7 23:07 st-image-vendorfs-openstlinux-weston-pangu.ext4 -> st-image-vendorfs-openstlinux-weston-pangu-20190707145953.vendorfs.ext4
lrwxrwxrwx 2 build build   73 Jul  7 23:07 st-image-vendorfs-openstlinux-weston-pangu.manifest -> st-image-vendorfs-openstlinux-weston-pangu-20190707145953.rootfs.manifest
lrwxrwxrwx 2 build build   73 Jul  7 23:07 st-image-vendorfs-openstlinux-weston-pangu.tar.xz -> st-image-vendorfs-openstlinux-weston-pangu-20190707145953.vendorfs.tar.xz
lrwxrwxrwx 2 build build   71 Jul  7 23:07 st-image-vendorfs-openstlinux-weston-pangu.testdata.json -> st-image-vendorfs-openstlinux-weston-pangu-20190707145953.testdata.json
-rw-r--r-- 2 build build  68K Jul  7 23:05 stm32mp157a-panguboard--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.dtb
lrwxrwxrwx 2 build build   76 Jul  7 23:05 stm32mp157a-panguboard.dtb -> stm32mp157a-panguboard--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.dtb
-rw-r--r-- 2 build build  68K Jul  7 23:05 stm32mp157a-panguboard-lcd--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.dtb
lrwxrwxrwx 2 build build   80 Jul  7 23:05 stm32mp157a-panguboard-lcd.dtb -> stm32mp157a-panguboard-lcd--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.dtb
lrwxrwxrwx 2 build build   80 Jul  7 23:05 stm32mp157a-panguboard-lcd-pangu.dtb -> stm32mp157a-panguboard-lcd--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.dtb
-rw-r--r-- 2 build build  69K Jul  7 23:05 stm32mp157a-panguboard-mipi--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.dtb
lrwxrwxrwx 2 build build   81 Jul  7 23:05 stm32mp157a-panguboard-mipi.dtb -> stm32mp157a-panguboard-mipi--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.dtb
lrwxrwxrwx 2 build build   81 Jul  7 23:05 stm32mp157a-panguboard-mipi-pangu.dtb -> stm32mp157a-panguboard-mipi--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.dtb
lrwxrwxrwx 2 build build   76 Jul  7 23:05 stm32mp157a-panguboard-pangu.dtb -> stm32mp157a-panguboard--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.dtb
-rw-r--r-- 1 build build 240K Jul  4 13:54 tf-a-stm32mp157a-panguboard-trusted.stm32
-rw-r--r-- 1 build build 118K Jul  6 12:27 u-boot-spl.stm32-stm32mp157a-panguboard-basic
-rw-r--r-- 1 build build 734K Jul  6 12:27 u-boot-stm32mp157a-panguboard-basic.img
-rw-r--r-- 1 build build 730K Jul  6 12:27 u-boot-stm32mp157a-panguboard-trusted.stm32
lrwxrwxrwx 2 build build   60 Jul  7 23:05 uImage -> uImage--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin
-rw-r--r-- 2 build build 5.8M Jul  7 23:05 uImage--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin
lrwxrwxrwx 2 build build   60 Jul  7 23:05 uImage-pangu.bin -> uImage--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin
lrwxrwxrwx 2 build build   61 Jul  7 23:05 vmlinux -> vmlinux--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin
-rw-r--r-- 2 build build 181M Jul  7 23:05 vmlinux--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin
lrwxrwxrwx 2 build build   61 Jul  7 23:05 vmlinux-pangu.bin -> vmlinux--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin
lrwxrwxrwx 2 build build   60 Jul  7 23:05 zImage -> zImage--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin
-rw-r--r-- 2 build build 5.8M Jul  7 23:05 zImage--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin
lrwxrwxrwx 2 build build   60 Jul  7 23:05 zImage-pangu.bin -> zImage--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin

上面列出的构建后的文件中,有部分是链接文件,可以先忽略。下面表格是构建出的文件描述:

文件后缀文件说明
*.ext4目标镜像的ext4文件系统格式的文件
*.manifest目标镜像内包含的软件包列表文件
*.tar.xz目标镜像的tar.xz格式的文件
u-boot-spl.stm32-stm32mp157a-panguboard-basic

U-Boot的 SPL程序

uImage-pangu.bin -> uImage--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.bin
Linux kernel uImage文件
stm32mp157a-panguboard--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.dtb
PanGu开发板的DeviceTree设备描述文件,支持HDMI接口
stm32mp157a-panguboard-lcd--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.dtbPanGu开发板的DeviceTree设备描述文件,支持RGB LCD接口
stm32mp157a-panguboard-mipi--4.19+github+0+ff1fafeb00-r0-pangu-20190707145953.dtbPanGu开发板的DeviceTree设备描述文件,支持MIPI DSI接口
flashlayout_i2som-image-weston
flashlayout_i2som-image-weston目录是用于STM32CubeProgrammer使用 USB烧写的配置文件



  • No labels