blob: d5c38fef743ebb4b1440e7496761323f0b36904d [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#
2# Creates a root filesystem out of IPKs
3#
4# This rootfs can be mounted via root-nfs or it can be put into an cramfs/jffs etc.
5# See image.bbclass for a usage of this.
6#
7
8EXTRAOPKGCONFIG ?= ""
9ROOTFS_PKGMANAGE = "opkg ${EXTRAOPKGCONFIG}"
10ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
11
12do_rootfs[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
13do_populate_sdk[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
14do_rootfs[recrdeptask] += "do_package_write_ipk"
15do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016
17do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
18do_populate_sdk[lockfiles] += "${WORKDIR}/ipk.lock"
19
20OPKG_PREPROCESS_COMMANDS = ""
21
22OPKG_POSTPROCESS_COMMANDS = ""
23
24OPKGLIBDIR = "${localstatedir}/lib"
25
26MULTILIBRE_ALLOW_REP = "${OPKGLIBDIR}/opkg|/usr/lib/opkg"
27
28python () {
29
30 if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050031 flags = d.getVarFlag('do_rootfs', 'recrdeptask', True)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032 flags = flags.replace("do_package_write_ipk", "")
33 flags = flags.replace("do_deploy", "")
34 flags = flags.replace("do_populate_sysroot", "")
35 d.setVarFlag('do_rootfs', 'recrdeptask', flags)
36 d.setVar('OPKG_PREPROCESS_COMMANDS', "")
37 d.setVar('OPKG_POSTPROCESS_COMMANDS', '')
38}