[OE-core] [PATCH V3 3/3] grub-efi.bbclass: use single variable to set baud rate

Chong Lu Chong.Lu at windriver.com
Wed Dec 10 05:43:57 UTC 2014


Use SERIAL_CONSOLE to set baud rate in grub.cfg file.

[YOCTO #6331]

Signed-off-by: Chong Lu <Chong.Lu at windriver.com>
---
 meta/classes/grub-efi.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 47bd35e..18ae261 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -18,11 +18,12 @@
 do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
 do_bootdirectdisk[depends] += "${MLPREFIX}grub-efi:do_deploy"
 
-GRUB_SERIAL ?= "console=ttyS0,115200"
+inherit console
+GRUB_SERIAL ?= "console=${@console_tty(d)},${@console_baudrate(d)}"
 GRUBCFG = "${S}/grub.cfg"
 GRUB_TIMEOUT ?= "10"
 #FIXME: build this from the machine config
-GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
+GRUB_OPTS ?= "serial --unit=${@console_port(d)} --speed=${@console_baudrate(d)} --word=8 --parity=no --stop=1"
 
 EFIDIR = "/EFI/BOOT"
 
-- 
1.9.1




More information about the Openembedded-core mailing list