blob: 87fff53a588d1695291050710cd5bea2052fe091 [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7#
8# Creates a root filesystem out of IPKs
9#
10# This rootfs can be mounted via root-nfs or it can be put into an cramfs/jffs etc.
11# See image.bbclass for a usage of this.
12#
13
14EXTRAOPKGCONFIG ?= ""
15ROOTFS_PKGMANAGE = "opkg ${EXTRAOPKGCONFIG}"
16
17do_rootfs[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
18do_populate_sdk[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
19do_rootfs[recrdeptask] += "do_package_write_ipk do_package_qa"
20do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS"
21
22do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
23do_populate_sdk[lockfiles] += "${WORKDIR}/sdk-ipk.lock"
24do_populate_sdk_ext[lockfiles] += "${WORKDIR}/sdk-ipk.lock"
25
26OPKG_PREPROCESS_COMMANDS = ""
27
28OPKG_POSTPROCESS_COMMANDS = ""
29
30OPKGLIBDIR ??= "${localstatedir}/lib"
31
Patrick Williams56b44a92024-01-19 08:49:29 -060032MULTILIBRE_ALLOW_REP += "${OPKGLIBDIR}/opkg /usr/lib/opkg"
Patrick Williams92b42cb2022-09-03 06:53:57 -050033
34python () {
35
36 if d.getVar('BUILD_IMAGES_FROM_FEEDS'):
37 flags = d.getVarFlag('do_rootfs', 'recrdeptask')
38 flags = flags.replace("do_package_write_ipk", "")
39 flags = flags.replace("do_deploy", "")
40 flags = flags.replace("do_populate_sysroot", "")
41 d.setVarFlag('do_rootfs', 'recrdeptask', flags)
42 d.setVar('OPKG_PREPROCESS_COMMANDS', "")
43 d.setVar('OPKG_POSTPROCESS_COMMANDS', '')
44}