构建图像的所有包

时间:2019-02-28 16:53:15

标签: yocto bitbake

是否可以针对特定映像构建所有软件包?我知道我可以单独构建软件包,但理想情况下,希望通过一个命令一次构建所有软件包。

或者,有一种方法可以防止针对特定图像执行do_rootfs任务。

干杯,多纳尔

1 个答案:

答案 0 :(得分:1)

首先制作一个包含packagegroup的图像(或在此处列出您的依赖项)。

$ cat sources/meta-custom/recipes-custom/images/only-packages-image.bb
SUMMARY = "All dependencies no image"
LICENSE = "CLOSED"
version = "@@DISTRO_VERSION@@"

BB_SCHEDULER = "speed"

# option 1 - packagegroup, package list can be reused in real image
CORE_IMAGE_BASE_INSTALL += "\
    packagegroup_all-depends \
"
# option 2 - list deps here, package list can not be reused in real image
CORE_IMAGE_BASE_INSTALL += "\
    lshw \
    systemd \
    cronie \
    glibc \
    sqlite \
    bash \
    python3-dev \
    python3-2to3 \
    python3-misc \
    python3-pyvenv \
    python3-modules \
    python3-pip \
    wget \
    apt \
    pciutils \
    file \
    tree \
    \
    wpa-supplicant \
    dhcpcd \
    networkmanager \
    curl-dev \
    curl \
    hostapd \
    iw \
"

# remove the rootfs step
do_rootfs() {
}

如果您选择重复使用软件包列表,则第二次创建packagegroup

$ cat sources/meta-custom/recipes-custom/packagegroups/packagegroup-alldeps.bb
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup

RDEPENDS_${PN} = " \
    lshw \
    systemd \
    cronie \
    glibc \
    sqlite \
    bash \
    python3-dev \
    python3-2to3 \
    python3-misc \
    python3-pyvenv \
    python3-modules \
    python3-pip \
    wget \
    apt \
    pciutils \
    file \
    tree \
    \
    wpa-supplicant \
    dhcpcd \
    networkmanager \
    curl-dev \
    curl \
    hostapd \
    iw \
"

最终构建新的图像占位符

$ bitbake only-packages-image