[oe-commits] [openembedded-core] 15/38: grub-efi.bbclass: make it can build vm and live together

git at git.openembedded.org git at git.openembedded.org
Wed Mar 23 21:50:59 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit de6163846b5506fbc20722b0e627ac612e6521d5
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Tue Mar 22 02:48:20 2016 -0700

    grub-efi.bbclass: make it can build vm and live together
    
    * Make it can build vm and live (e.g., iso + vmdk) together as we did
      for syslinux.
    * GRUBCFG -> GRUB_CFG as other GRUB_FOO vars
    
    Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/grub-efi.bbclass | 9 +++++----
 meta/classes/image.bbclass    | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 331581d..3d8ff11 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -19,7 +19,8 @@ do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
 do_bootdirectdisk[depends] += "${MLPREFIX}grub-efi:do_deploy"
 
 GRUB_SERIAL ?= "console=ttyS0,115200"
-GRUBCFG = "${S}/grub.cfg"
+GRUB_CFG_VM = "${S}/grub_vm.cfg"
+GRUB_CFG_LIVE = "${S}/grub_live.cfg"
 GRUB_TIMEOUT ?= "10"
 #FIXME: build this from the machine config
 GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
@@ -43,7 +44,7 @@ efi_populate() {
 	fi
 	install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
 
-	install -m 0644 ${GRUBCFG} ${DEST}${EFIDIR}/grub.cfg
+	install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
 }
 
 efi_iso_populate() {
@@ -83,9 +84,9 @@ python build_efi_cfg() {
         bb.debug(1, "No labels, nothing to do")
         return
 
-    cfile = d.getVar('GRUBCFG', True)
+    cfile = d.getVar('GRUB_CFG', True)
     if not cfile:
-        raise bb.build.FuncFailed('Unable to read GRUBCFG')
+        raise bb.build.FuncFailed('Unable to read GRUB_CFG')
 
     try:
          cfgfile = file(cfile, 'w')
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 560cc6d..0249f77 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -543,7 +543,7 @@ 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']
+    vars = ['GRUB_CFG', 'SYSLINUX_CFG', 'ROOT', 'LABELS', 'INITRD']
     for var in vars:
         var_with_suffix = var + '_' + suffix
         if d.getVar(var, True):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list