Yocto 几个常用镜像差异 (以FSL官源为例)

简述版:

core-image-minimal – 最小镜像,不能再这个基础上精简,这个镜像仅仅能启动而很多功能还无法使用,因为缺乏应用层软件,

core-image-base – 在core-image-minimal基础上添加一些硬件支持的包,这个镜像能使用所有SOC上的功能.

core-image-sato – 在core-image-base基础上添加一个叫sato的GUI演示.

fsl-image-machine-test – 在core-image-base基础上添加测试和跑分工具.

fsl-image-validation-imx – 在core-image-base基础上添加GUI.

fsl-image-qt5-validation-imx – 在core-image-base基础上添加QT5.

细致来看就看他们的配方.

首先是core-image-minimal,他不包含任何软件,如果包含包管理,则可以引入包管理工具.

SUMMARY = "A small image just capable of allowing a device to boot."

IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}"

IMAGE_LINGUAS = " "

LICENSE = "MIT"

inherit core-image

IMAGE_ROOTFS_SIZE ?= "8192"
IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "", d)}"

而core-image-base默认之添加了splash这个特征.

SUMMARY = "A console-only image that fully supports the target device \
hardware."

IMAGE_FEATURES += "splash"

LICENSE = "MIT"

inherit core-image

在core-image-sato就添加了x11-sato和依赖的包.

DESCRIPTION = "Image with Sato, a mobile environment and visual style for \
mobile devices. The image supports X11 with a Sato theme, Pimlico \
applications, and contains terminal, editor, and file manager."
HOMEPAGE = "https://www.yoctoproject.org/"

IMAGE_FEATURES += "splash package-management x11-base x11-sato ssh-server-dropbear hwcodecs"

LICENSE = "MIT"

inherit core-image

TOOLCHAIN_HOST_TASK_append = " nativesdk-intltool nativesdk-glib-2.0"
TOOLCHAIN_HOST_TASK_remove_task-populate-sdk-ext = " nativesdk-intltool nativesdk-glib-2.0"

QB_MEM = '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
QB_MEM_qemumips = "-m 256"

在fsl-image-machine-test就是添加两个packagegroup,在系统中有很多packagegroup,他代表一类包的合集.

DESCRIPTION = "A console-only image that includes gstreamer packages, \
Freescale's multimedia packages (VPU and GPU) when available, and \
test and benchmark applications."

IMAGE_FEATURES += " \
    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \
       bb.utils.contains('DISTRO_FEATURES',     'x11', 'x11-base', \
                                                       '', d), d)} \
    debug-tweaks \
    tools-testapps \
    tools-profile \
"

LICENSE = "MIT"

inherit core-image

CORE_IMAGE_EXTRA_INSTALL += " \
    packagegroup-fsl-gstreamer1.0 \
    packagegroup-fsl-gstreamer1.0-full \
    packagegroup-fsl-tools-gpu \
    packagegroup-fsl-tools-gpu-external \
    packagegroup-fsl-tools-testapps \
    packagegroup-fsl-tools-benchmark \
    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', \
                         'weston weston-init', '', d)} \
    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', \
                         'weston-xwayland xterm', '', d)} \
"

比如packagegroup-fsl-tools-testapps的配方可以看到:

# Copyright (C) 2012-2014, 2016 Freescale Semiconductor
# Copyright (C) 2015, 2016 O.S. Systems Software LTDA.
# Released under the MIT license (see COPYING.MIT for the terms)

DESCRIPTION = "Packagegroup used by FSL Community to provide a set of packages and utilities \
for hardware test."
SUMMARY = "FSL Community packagegroup - tools/testapps"

PACKAGE_ARCH = "${MACHINE_ARCH}"

inherit packagegroup

SOC_TOOLS_TEST = ""
SOC_TOOLS_TEST_imx = "imx-test"
SOC_TOOLS_TEST_imxgpu  = "imx-test imx-gpu-viv-demos"
SOC_TOOLS_TEST_qoriq = "ceetm optee-test-qoriq"

RDEPENDS_${PN} = " \
    alsa-utils \
    alsa-tools \
    dosfstools \
    evtest \
    e2fsprogs-mke2fs \
    fsl-rc-local \
    fbset \
    i2c-tools \
    iproute2 \
    memtester \
    python3-core \
    python3-json \
    python3-datetime \
    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'v4l-utils', '', d)} \
    ethtool \
    mtd-utils \
    mtd-utils-ubifs \
    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+3-demo', '', d)} \
    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', \
                         'weston-examples clutter-1.0-examples', '', d)} \
    ${SOC_TOOLS_TEST} \
"

# FIXME: i.MX6SL cannot use mesa for Graphics and it lacks GL support,
#        so for now we skip it.
RDEPENDS_IMX_TO_REMOVE = ""
RDEPENDS_IMX_TO_REMOVE_imxgpu2d = "clutter-1.0-examples"
RDEPENDS_IMX_TO_REMOVE_imxgpu3d = ""

RDEPENDS_${PN}_remove = "${RDEPENDS_IMX_TO_REMOVE}"

可见,Yocto的一切包含关系各自全部都是厨师按着配方干活,可以说非常的舒服.

发表评论

您的电子邮箱地址不会被公开。