summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-03-22 02:48:19 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-25 10:29:16 +0000
commit4ebaeb281bc70a9962ab9f4c49c0a2587fe3487a (patch)
tree9505154827b8f99b1f8279310f8719f145740012 /meta/classes/image.bbclass
parentaf1f77a1eb9d1dc3de17c9b0a2b74d76ada40544 (diff)
downloadpoky-4ebaeb281bc70a9962ab9f4c49c0a2587fe3487a.tar.gz
bootimg.bbclass: fix settings for grub-efi.bbclass
Fixed: - Found potential conflicted var LABELS ... Set LABELS to "boot install" would build out broken images when build vm + live together, use set_live_vm_vars() to fix the problem. - Use ROOT and LABEL in boot-directdisk.bbclass and image-foo.bbclass, they are not only used by syslinux.bbclass, but also grub-efi.bbclass, add "SYSLINUX_" prefix would mislead users. (From OE-Core rev: d7d1e0193c94abb1cd2daf1c298c8c1788f3616d) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 () {
539 : 539 :
540} 540}
541addtask bundle_initramfs after do_image_complete 541addtask bundle_initramfs after do_image_complete
542
543# Some of the vars for vm and live image are conflicted, this function
544# is used for fixing the problem.
545def set_live_vm_vars(d, suffix):
546 vars = ['SYSLINUX_CFG', 'ROOT', 'LABELS', 'INITRD']
547 for var in vars:
548 var_with_suffix = var + '_' + suffix
549 if d.getVar(var, True):
550 bb.warn('Found potential conflicted var %s, please use %s rather than %s' % \
551 (var, var_with_suffix, var))
552 elif d.getVar(var_with_suffix, True):
553 d.setVar(var, d.getVar(var_with_suffix, True))
554