diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2016-04-01 00:32:55 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-04-03 15:51:08 +0100 |
commit | 1f46fe7d501644c83f81dc4cc3310073c804f797 (patch) | |
tree | 49fdfcdf56444c6fea151f0f986cc7e286ace8ae /meta/classes/syslinux.bbclass | |
parent | 664afc12d1aad97c85db6688790c48abfc528c53 (diff) | |
download | openembedded-core-1f46fe7d501644c83f81dc4cc3310073c804f797.tar.gz |
grub-efi.bbclass: use GRUB_ROOT rather than APPEND for root device
Use APPEND for grub's root device may cause confusion, for example, when
building efi + pcbios, there maybe be two root=/dev/ram0, one of them
would be carried to the installed target, and the target would fail to
boot. Use GRUB_ROOT to fix the problem, and remove SYSLINUX_ROOT from
APPEND will fix the problem.
[YOCTO #9354]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/syslinux.bbclass')
-rw-r--r-- | meta/classes/syslinux.bbclass | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass index 7d324c31de..defad73a11 100644 --- a/meta/classes/syslinux.bbclass +++ b/meta/classes/syslinux.bbclass @@ -33,7 +33,7 @@ AUTO_SYSLINUXMENU ?= "1" SYSLINUX_ROOT ?= "${ROOT}" SYSLINUX_CFG_VM ?= "${S}/syslinux_vm.cfg" SYSLINUX_CFG_LIVE ?= "${S}/syslinux_live.cfg" -APPEND_prepend = " ${SYSLINUX_ROOT} " +APPEND ?= "" # Need UUID utility code. inherit fs-uuid @@ -164,6 +164,10 @@ python build_syslinux_cfg () { btypes = [ [ "Graphics console ", syslinux_default_console ], [ "Serial console ", syslinux_serial_tty ] ] + root= d.getVar('SYSLINUX_ROOT', True) + if not root: + raise bb.build.FuncFailed('SYSLINUX_ROOT not defined') + for btype in btypes: cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label)) @@ -174,17 +178,15 @@ python build_syslinux_cfg () { append = localdata.getVar('APPEND', True) initrd = localdata.getVar('INITRD', True) - if append: - cfgfile.write('APPEND ') + append = root + " " + append + cfgfile.write('APPEND ') - if initrd: - cfgfile.write('initrd=/initrd ') + if initrd: + cfgfile.write('initrd=/initrd ') - cfgfile.write('LABEL=%s '% (label)) - append = replace_rootfs_uuid(d, append) - cfgfile.write('%s %s\n' % (append, btype[1])) - else: - cfgfile.write('APPEND %s\n' % btype[1]) + cfgfile.write('LABEL=%s '% (label)) + append = replace_rootfs_uuid(d, append) + cfgfile.write('%s %s\n' % (append, btype[1])) cfgfile.close() } |