summaryrefslogtreecommitdiff
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 3ab432e06c..560cc6d894 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -539,3 +539,16 @@ do_bundle_initramfs () {
:
}
addtask bundle_initramfs after do_image_complete
+
+# Some of the vars for vm and live image are conflicted, this function
+# is used for fixing the problem.
+def set_live_vm_vars(d, suffix):
+ vars = ['SYSLINUX_CFG', 'ROOT', 'LABELS', 'INITRD']
+ for var in vars:
+ var_with_suffix = var + '_' + suffix
+ if d.getVar(var, True):
+ bb.warn('Found potential conflicted var %s, please use %s rather than %s' % \
+ (var, var_with_suffix, var))
+ elif d.getVar(var_with_suffix, True):
+ d.setVar(var, d.getVar(var_with_suffix, True))
+