Skip to contentSkip to conversation

use single variable to set baud rate

PATCH Superseded Chong Lu 2 participants 5 messages Dec 8, 2014 – Dec 9, 2014

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Chong Lu

author
#0 lore raw

cover use single variable to set baud rate

The following changes since commit b813bdebb36501500e86fea5f7e15b4b15ea0902:

qemu/libc-package: Fix qemu option handling (2014-12-05 18:01:08 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib chonglu/baudrate
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=chonglu/baudrate

Chong Lu (2):
syslinux.bbclass: use single variable to set baud rate grub-efi.bbclass: use single variable to set baud rate

 meta/classes/grub-efi.bbclass | 5 +++--
 meta/classes/syslinux.bbclass | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/2 syslinux.bbclass: use single variable to set baud rate

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

[YOCTO #6331]

---
 meta/classes/syslinux.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/syslinux.bbclass +2 -2
index d6498d9..b5eea07 100644
@@ -27,8 +27,8 @@ SYSLINUXDIR = "/"
 # The kernel has an internal default console, which you can override with
 # a console=...some_tty...
 SYSLINUX_DEFAULT_CONSOLE ?= ""
-SYSLINUX_SERIAL ?= "0 115200"
-SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
+SYSLINUX_SERIAL ?= "${@filter(str.isdigit, d.getVar('SERIAL_CONSOLE', True).split()[1])} ${@d.getVar('SERIAL_CONSOLE', True).split()[0]}"
+SYSLINUX_SERIAL_TTY ?= "console=${@d.getVar('SERIAL_CONSOLE', True).split()[1]},${@d.getVar('SERIAL_CONSOLE', True).split()[0]}"
 ISO_BOOTIMG = "isolinux/isolinux.bin"
 ISO_BOOTCAT = "isolinux/boot.cat"
 MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table"
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH 2/2 grub-efi.bbclass: use single variable to set baud rate

In reply to Chong Lu

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

[YOCTO #6331]

---
 meta/classes/grub-efi.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/classes/grub-efi.bbclass +3 -2
index 47bd35e..37c21f9 100644
@@ -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"
+GRUB_SERIAL ?= "console=${@d.getVar('SERIAL_CONSOLE', True).split()[1]},${@d.getVar('SERIAL_CONSOLE', True).split()[0]}"
 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=${@filter(str.isdigit, d.getVar('SERIAL_CONSOLE', True).split()[1])} \
+--speed=${@d.getVar('SERIAL_CONSOLE', True).split()[0]} --word=8 --parity=no --stop=1"
 
 EFIDIR = "/EFI/BOOT"
 
Signature · 1 line
1.9.1
#3 lore raw
In reply to Chong Lu
Quoted 4 lines · Chong Lu

Chong Lu (2):
syslinux.bbclass: use single variable to set baud rate grub-efi.bbclass: use single variable to set baud rate

ERROR: ExpansionError during parsing /home/ross/Yocto/poky/meta/recipes-core/images/ core-image-minimal-mtdutils.bb: Failure expanding variable GRUB_OPTS:
ExpansionError: Failure expanding variable GRUB_OPTS, expression was serial --unit=${@filter(str.isdigit, d.getVar('SERIAL_CONSOLE', True).split()[1])} --speed=${@d.getVar('SERIAL_CONSOLE', True).split()[0]} --word=8 --parity=no --stop=1 which triggered exception IndexError: list index out of range

SERIAL_CONSOLE doesn't have to be set.

Ross

author
#4 lore raw
Quoted 7 lines · Ross

On 8 December 2014 at 05:47, Chong Lu <[email protected] <mailto:[email protected]>> wrote:

Chong Lu (2):
syslinux.bbclass: use single variable to set baud rate grub-efi.bbclass: use single variable to set baud rate

Quoted 6 lines

ERROR: ExpansionError during parsing /home/ross/Yocto/poky/meta/recipes-core/images/core-image-minimal-mtdutils.bb <http://core-image-minimal-mtdutils.bb>: Failure expanding variable GRUB_OPTS: ExpansionError: Failure expanding variable GRUB_OPTS, expression was serial --unit=${@filter(str.isdigit, d.getVar('SERIAL_CONSOLE', True).split()[1])} --speed=${@d.getVar('SERIAL_CONSOLE', True).split()[0]} --word=8
--parity=no --stop=1 which triggered exception IndexError: list index
out of range

SERIAL_CONSOLE doesn't have to be set.

Hi Ross,

Thanks for your reply. V2 incoming.

Best Regards
Chong

Quoted 2 lines

Ross