summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/rootfs_ipk.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes-recipe/rootfs_ipk.bbclass')
-rw-r--r--meta/classes-recipe/rootfs_ipk.bbclass44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/classes-recipe/rootfs_ipk.bbclass b/meta/classes-recipe/rootfs_ipk.bbclass
new file mode 100644
index 0000000000..a48ad07dfc
--- /dev/null
+++ b/meta/classes-recipe/rootfs_ipk.bbclass
@@ -0,0 +1,44 @@
1#
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
32MULTILIBRE_ALLOW_REP = "${OPKGLIBDIR}/opkg|/usr/lib/opkg"
33
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}