xref: /OK3568_Linux_fs/yocto/poky/meta/classes/image-container.bbclass (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunROOTFS_BOOTSTRAP_INSTALL = ""
2*4882a593SmuzhiyunIMAGE_TYPES_MASKED += "container"
3*4882a593SmuzhiyunIMAGE_TYPEDEP:container = "tar.bz2"
4*4882a593Smuzhiyun
5*4882a593Smuzhiyunpython __anonymous() {
6*4882a593Smuzhiyun    if "container" in d.getVar("IMAGE_FSTYPES") and \
7*4882a593Smuzhiyun       d.getVar("IMAGE_CONTAINER_NO_DUMMY") != "1" and \
8*4882a593Smuzhiyun       "linux-dummy" not in d.getVar("PREFERRED_PROVIDER_virtual/kernel"):
9*4882a593Smuzhiyun        msg = '"container" is in IMAGE_FSTYPES, but ' \
10*4882a593Smuzhiyun              'PREFERRED_PROVIDER_virtual/kernel is not "linux-dummy". ' \
11*4882a593Smuzhiyun              'Unless a particular kernel is needed, using linux-dummy will ' \
12*4882a593Smuzhiyun              'prevent a kernel from being built, which can reduce ' \
13*4882a593Smuzhiyun              'build times. If you don\'t want to use "linux-dummy", set ' \
14*4882a593Smuzhiyun              '"IMAGE_CONTAINER_NO_DUMMY" to "1".'
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun        # Raising skip recipe was Paul's clever idea. It causes the error to
17*4882a593Smuzhiyun        # only be shown for the recipes actually requested to build, rather
18*4882a593Smuzhiyun        # than bb.fatal which would appear for all recipes inheriting the
19*4882a593Smuzhiyun        # class.
20*4882a593Smuzhiyun        raise bb.parse.SkipRecipe(msg)
21*4882a593Smuzhiyun}
22