summaryrefslogtreecommitdiffstats
path: root/meta/classes/grub-efi.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-03-22 02:48:20 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-25 10:29:16 +0000
commit1b1de893049ac7dabb7f028b1a322082f1b3605c (patch)
treed5f0a25aca2f01907ee32392c3ff2b1378901989 /meta/classes/grub-efi.bbclass
parent4ebaeb281bc70a9962ab9f4c49c0a2587fe3487a (diff)
downloadpoky-1b1de893049ac7dabb7f028b1a322082f1b3605c.tar.gz
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 (From OE-Core rev: e38039e43f22d55a443064efa91752e2943fda79) 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/grub-efi.bbclass')
-rw-r--r--meta/classes/grub-efi.bbclass9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 331581d78d..3d8ff11ee8 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"
19do_bootdirectdisk[depends] += "${MLPREFIX}grub-efi:do_deploy" 19do_bootdirectdisk[depends] += "${MLPREFIX}grub-efi:do_deploy"
20 20
21GRUB_SERIAL ?= "console=ttyS0,115200" 21GRUB_SERIAL ?= "console=ttyS0,115200"
22GRUBCFG = "${S}/grub.cfg" 22GRUB_CFG_VM = "${S}/grub_vm.cfg"
23GRUB_CFG_LIVE = "${S}/grub_live.cfg"
23GRUB_TIMEOUT ?= "10" 24GRUB_TIMEOUT ?= "10"
24#FIXME: build this from the machine config 25#FIXME: build this from the machine config
25GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" 26GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
@@ -43,7 +44,7 @@ efi_populate() {
43 fi 44 fi
44 install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR} 45 install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
45 46
46 install -m 0644 ${GRUBCFG} ${DEST}${EFIDIR}/grub.cfg 47 install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
47} 48}
48 49
49efi_iso_populate() { 50efi_iso_populate() {
@@ -83,9 +84,9 @@ python build_efi_cfg() {
83 bb.debug(1, "No labels, nothing to do") 84 bb.debug(1, "No labels, nothing to do")
84 return 85 return
85 86
86 cfile = d.getVar('GRUBCFG', True) 87 cfile = d.getVar('GRUB_CFG', True)
87 if not cfile: 88 if not cfile:
88 raise bb.build.FuncFailed('Unable to read GRUBCFG') 89 raise bb.build.FuncFailed('Unable to read GRUB_CFG')
89 90
90 try: 91 try:
91 cfgfile = file(cfile, 'w') 92 cfgfile = file(cfile, 'w')