[oe-commits] [openembedded-core] 05/15: grub-efi: fixed default value of GRUB_ROOT

git at git.openembedded.org git at git.openembedded.org
Thu May 25 22:59:59 UTC 2017


This is an automated email from the git hooks/post-receive script.

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

commit 4f0aca3229811d2cfea19a27b255e8a9a5d6fcf9
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Thu May 11 14:06:05 2017 +0300

    grub-efi: fixed default value of GRUB_ROOT
    
    Currently GRUB_ROOT assigned a value of literal "${ROOT}" by default
    if ROOT variable is not set. This causes kernel commandline to
    look like this: "linux /vmlinuz LABEL=boot {ROOT}"
    
    Used weak assignments of ROOT and GRUB_ROOT variables to make
    sure GRUB_ROOT is "" by default.
    
    Allowed empty GRUB_ROOT to be able to use only APPEND variable
    for both EFI bootloaders (systemd-boot and grub-efi).
    
    Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/grub-efi.bbclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index bacbeb4..b55ac96 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -27,7 +27,8 @@ GRUB_TIMEOUT ?= "10"
 GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
 
 EFIDIR = "/EFI/BOOT"
-GRUB_ROOT ?= "${ROOT}"
+ROOT ??= ""
+GRUB_ROOT ??= "${ROOT}"
 APPEND ?= ""
 
 # Need UUID utility code.
@@ -121,8 +122,6 @@ python build_efi_cfg() {
         cfgfile.write('timeout=50\n')
 
     root = d.getVar('GRUB_ROOT')
-    if not root:
-        bb.fatal('GRUB_ROOT not defined')
 
     if gfxserial == "1":
         btypes = [ [ " graphics console", "" ],
@@ -146,7 +145,8 @@ python build_efi_cfg() {
                 lb = "install-efi"
             cfgfile.write('linux /vmlinuz LABEL=%s' % (lb))
 
-            cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
+            if root:
+                cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
 
             append = localdata.getVar('APPEND')
             initrd = localdata.getVar('INITRD')

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


More information about the Openembedded-commits mailing list