summaryrefslogtreecommitdiffstats
path: root/meta/classes/grub-efi.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/grub-efi.bbclass')
-rw-r--r--meta/classes/grub-efi.bbclass10
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 3d8ff11ee8..4ce3d2844a 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -14,6 +14,7 @@
14# ${APPEND} - an override list of append strings for each label 14# ${APPEND} - an override list of append strings for each label
15# ${GRUB_OPTS} - additional options to add to the config, ';' delimited # (optional) 15# ${GRUB_OPTS} - additional options to add to the config, ';' delimited # (optional)
16# ${GRUB_TIMEOUT} - timeout before executing the deault label (optional) 16# ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
17# ${GRUB_ROOT} - grub's root device.
17 18
18do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy" 19do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
19do_bootdirectdisk[depends] += "${MLPREFIX}grub-efi:do_deploy" 20do_bootdirectdisk[depends] += "${MLPREFIX}grub-efi:do_deploy"
@@ -26,7 +27,8 @@ GRUB_TIMEOUT ?= "10"
26GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" 27GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
27 28
28EFIDIR = "/EFI/BOOT" 29EFIDIR = "/EFI/BOOT"
29APPEND_prepend = " ${ROOT} " 30GRUB_ROOT ?= "${ROOT}"
31APPEND ?= ""
30 32
31# Need UUID utility code. 33# Need UUID utility code.
32inherit fs-uuid 34inherit fs-uuid
@@ -108,6 +110,10 @@ python build_efi_cfg() {
108 else: 110 else:
109 cfgfile.write('timeout=50\n') 111 cfgfile.write('timeout=50\n')
110 112
113 root = d.getVar('GRUB_ROOT', True)
114 if not root:
115 raise bb.build.FuncFailed('GRUB_ROOT not defined')
116
111 if gfxserial == "1": 117 if gfxserial == "1":
112 btypes = [ [ " graphics console", "" ], 118 btypes = [ [ " graphics console", "" ],
113 [ " serial console", d.getVar('GRUB_SERIAL', True) or "" ] ] 119 [ " serial console", d.getVar('GRUB_SERIAL', True) or "" ] ]
@@ -131,6 +137,8 @@ python build_efi_cfg() {
131 lb = "install-efi" 137 lb = "install-efi"
132 cfgfile.write('linux /vmlinuz LABEL=%s' % (lb)) 138 cfgfile.write('linux /vmlinuz LABEL=%s' % (lb))
133 139
140 cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
141
134 append = localdata.getVar('APPEND', True) 142 append = localdata.getVar('APPEND', True)
135 initrd = localdata.getVar('INITRD', True) 143 initrd = localdata.getVar('INITRD', True)
136 144