* SERIAL_CONSOLE versus SERIAL_CONSOLES?
@ 2016-10-17 11:57 Robert P. J. Day
2016-10-17 13:50 ` Phil Blundell
0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2016-10-17 11:57 UTC (permalink / raw)
To: OE Core mailing list
i am well aware that if one wants to define a single serial console,
then using the SERIAL_CONSOLE variable will work just fine, as in:
SERIAL_CONSOLE ?= "115200 ttyS0"
and if you want to define multiple possible consoles, use:
SERIAL_CONSOLES = "115200;ttyAMA0 115200;ttyAMA1"
however, i just noticed in the default bitbake.conf:
SERIAL_CONSOLE ??= ""
SERIAL_CONSOLES ??= "${@d.getVar('SERIAL_CONSOLE', True).replace(' ', ';')}"
where SERIAL_CONSOLES is defined in terms of SERIAL_CONSOLE, which
suggests to me that, really, it's SERIAL_CONSOLES that will be used
for further configuration, is that right?
for instance, i see in
meta/recipes-core/systemd/systemd-serialgetty.bb, the test:
do_install() {
if [ ! -z "${SERIAL_CONSOLES}" ] ; then
default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'
wherein, once upon a time, i would have thought, "hey, i'm not
assigning anything to SERIAL_CONSOLES so that doesn't apply to me."
when, of course, it *does* apply now that i read things properly.
so is it a fair statement that, pedantically, i might as well just
define everything in terms of SERIAL_CONSOLES and think that way?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SERIAL_CONSOLE versus SERIAL_CONSOLES?
2016-10-17 11:57 SERIAL_CONSOLE versus SERIAL_CONSOLES? Robert P. J. Day
@ 2016-10-17 13:50 ` Phil Blundell
2016-10-17 14:02 ` Robert P. J. Day
0 siblings, 1 reply; 3+ messages in thread
From: Phil Blundell @ 2016-10-17 13:50 UTC (permalink / raw)
To: Robert P. J. Day, OE Core mailing list
On Mon, 2016-10-17 at 07:57 -0400, Robert P. J. Day wrote:
>
so is it a fair statement that, pedantically, i might as well just
> define everything in terms of SERIAL_CONSOLES and think that way?
>
Yes. SERIAL_CONSOLE predates SERIAL_CONSOLES and remains supported in
the configuration for backwards compatibility. New configurations and
recipes should probably use SERIAL_CONSOLES and ignore SERIAL_CONSOLE
entirely.
p.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SERIAL_CONSOLE versus SERIAL_CONSOLES?
2016-10-17 13:50 ` Phil Blundell
@ 2016-10-17 14:02 ` Robert P. J. Day
0 siblings, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2016-10-17 14:02 UTC (permalink / raw)
To: Phil Blundell; +Cc: OE Core mailing list
[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]
On Mon, 17 Oct 2016, Phil Blundell wrote:
> On Mon, 2016-10-17 at 07:57 -0400, Robert P. J. Day wrote:
> >
> so is it a fair statement that, pedantically, i might as well just
> > define everything in terms of SERIAL_CONSOLES and think that way?
> >
>
> Yes. SERIAL_CONSOLE predates SERIAL_CONSOLES and remains supported
> in the configuration for backwards compatibility. New
> configurations and recipes should probably use SERIAL_CONSOLES and
> ignore SERIAL_CONSOLE entirely.
i'm good with that, thanks, and one more question related to setting
baud rate for the console port, if i may. what is the precedence order
for the baud rate that is actually used, given that there are a number
of places this can be specified?
i'm building a systemd-based system, and i'm looking at the
do_install() code in systemd-serialgetty.bb, and as i see it, if one
is using u-boot and a device tree, the baud rate can be specified in a
number of places.
1) apparently, a number of boards defined in u-boot can set the baud
rate in their ft_board_setup() routine.
2) u-boot can pass the baud rate on the kernel command line
3) the device tree blob for the target board might have the baud rate
hard-coded in the DTB
4) using SERIAL_CONSOLES
am i missing anything? if i follow the code, i'm sure i can puzzle
it out eventually.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-17 14:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-17 11:57 SERIAL_CONSOLE versus SERIAL_CONSOLES? Robert P. J. Day
2016-10-17 13:50 ` Phil Blundell
2016-10-17 14:02 ` Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox