All of lore.kernel.org
 help / color / mirror / Atom feed
* systemd-getty-generator present but undesired
       [not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.0d2bd5fa-15cc-4b27-b94e-83614f9e5b38.391a6b1c-c9c3-4223-bc80-85775254cd6c@emailsignatures365.codetwo.com>
@ 2020-07-28 13:33   ` Mike Looijmans
  2020-07-30  5:12     ` [OE-core] " Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Looijmans @ 2020-07-28 13:33 UTC (permalink / raw)
  To: openembedded-core

I had a hard time getting a serial attached bluetooth device to work, untilI 
discovered that systemd is running a "getty" on that port (which happens tobe 
"ttyS0").

The cause is that "systemd-getty-generator" detects that the port comes online 
(runtime, it's inside an FGPA) and then dynamically adds a service for it and 
starts a getty on it.

So when I went to solve that, I found that OE already attempted to solve that. 
There's a "systemd-getty-generator" PACKAGECONFIG that suggests that it should 
not be installed by default, but it gets installed anyway, even though this 
config is not set.

Is this something that needs fixing in OE?

Any better pointers at preventing systemd starting a getty on ttyS0?

Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: mike.looijmans@topicproducts.com
W: www.topicproducts.com

Please consider the environment before printing this e-mail

Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: mike.looijmans@topicproducts.com
W: www.topicproducts.com

Please consider the environment before printing this e-mail

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core] systemd-getty-generator present but undesired
  2020-07-28 13:33   ` systemd-getty-generator present but undesired Mike Looijmans
@ 2020-07-30  5:12     ` Khem Raj
  2020-08-11 12:06       ` Mike Looijmans
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2020-07-30  5:12 UTC (permalink / raw)
  To: Mike Looijmans, openembedded-core



On 7/28/20 6:33 AM, Mike Looijmans wrote:
> I had a hard time getting a serial attached bluetooth device to work, 
> untilI discovered that systemd is running a "getty" on that port (which 
> happens tobe "ttyS0").
> 
> The cause is that "systemd-getty-generator" detects that the port comes 
> online (runtime, it's inside an FGPA) and then dynamically adds a 
> service for it and starts a getty on it.
> 
> So when I went to solve that, I found that OE already attempted to solve 
> that. There's a "systemd-getty-generator" PACKAGECONFIG that suggests 
> that it should not be installed by default, but it gets installed 
> anyway, even though this config is not set.
> 
> Is this something that needs fixing in OE?
> 
> Any better pointers at preventing systemd starting a getty on ttyS0?
> 

you need to add serial-getty-generator to systemd PACKAGECONFIG to 
ignore the oe provided serial getty recipe.

I think it also has to do with SERIAL_CONSOLES setting for machine, 
perhaps it contains ttyS0 in your case.

> Met vriendelijke groet / kind regards,
> 
> Mike Looijmans
> System Expert
> 
> 
> TOPIC Embedded Products B.V.
> Materiaalweg 4, 5681 RJ Best
> The Netherlands
> 
> T: +31 (0) 499 33 69 69
> E: mike.looijmans@topicproducts.com
> W: www.topicproducts.com
> 
> Please consider the environment before printing this e-mail
> 
> Met vriendelijke groet / kind regards,
> 
> Mike Looijmans
> System Expert
> 
> 
> TOPIC Embedded Products B.V.
> Materiaalweg 4, 5681 RJ Best
> The Netherlands
> 
> T: +31 (0) 499 33 69 69
> E: mike.looijmans@topicproducts.com
> W: www.topicproducts.com
> 
> Please consider the environment before printing this e-mail
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core] systemd-getty-generator present but undesired
  2020-07-30  5:12     ` [OE-core] " Khem Raj
@ 2020-08-11 12:06       ` Mike Looijmans
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Looijmans @ 2020-08-11 12:06 UTC (permalink / raw)
  To: Khem Raj, openembedded-core


Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: mike.looijmans@topicproducts.com
W: www.topicproducts.com

Please consider the environment before printing this e-mail
On 30-07-2020 07:12, Khem Raj wrote:
>
>
> On 7/28/20 6:33 AM, Mike Looijmans wrote:
>> I had a hard time getting a serial attached bluetooth device to work, 
>> untilI discovered that systemd is running a "getty" on that port 
>> (which happens tobe "ttyS0").
>>
>> The cause is that "systemd-getty-generator" detects that the port 
>> comes online (runtime, it's inside an FGPA) and then dynamically adds 
>> a service for it and starts a getty on it.
>>
>> So when I went to solve that, I found that OE already attempted to 
>> solve that. There's a "systemd-getty-generator" PACKAGECONFIG that 
>> suggests that it should not be installed by default, but it gets 
>> installed anyway, even though this config is not set.
>>
>> Is this something that needs fixing in OE?
>>
>> Any better pointers at preventing systemd starting a getty on ttyS0?
>>
>
> you need to add serial-getty-generator to systemd PACKAGECONFIG to 
> ignore the oe provided serial getty recipe.
>
> I think it also has to do with SERIAL_CONSOLES setting for machine, 
> perhaps it contains ttyS0 in your case.
>
Yes, SERIAL_CONSOLES is the problem.

It interacts with SERIAL_CONSOLE in strange ways, and the only way to 
solve it was to set them both and never calculate them:

SERIAL_CONSOLE = "115200 ttyPS0"
SERIAL_CONSOLES = "115200;ttyPS0"


One would be tempted to code something like:

SERIAL_CONSOLES = "${@d.getVar('SERIAL_CONSOLE').replace(' ', ';')}"

(In fact this is what bitbake.conf does, only very weakly.)

This does not work, and results in "ttyS0" still ending up in 
SERIAL_CONSOLES. Probably an interesting mix of calculating one from the 
other.


oe-core/meta/recipes-core/systemd/systemd-serialgetty.bb contains a line:

SERIAL_CONSOLES ?= "115200;ttyS0"

This is also broken I think, it overrides the more correct default that 
bitbake.conf already assigned. Removing this line didn't solve the issue 
either.


>> Met vriendelijke groet / kind regards,
>>
>> Mike Looijmans
>> System Expert
>>
>>
>> TOPIC Embedded Products B.V.
>> Materiaalweg 4, 5681 RJ Best
>> The Netherlands
>>
>> T: +31 (0) 499 33 69 69
>> E: mike.looijmans@topicproducts.com
>> W: www.topicproducts.com
>>
>> Please consider the environment before printing this e-mail
>>
>> Met vriendelijke groet / kind regards,
>>
>> Mike Looijmans
>> System Expert
>>
>>
>> TOPIC Embedded Products B.V.
>> Materiaalweg 4, 5681 RJ Best
>> The Netherlands
>>
>> T: +31 (0) 499 33 69 69
>> E: mike.looijmans@topicproducts.com
>> W: www.topicproducts.com
>>
>> Please consider the environment before printing this e-mail
>>
>> 
>>

-- 
Mike Looijmans


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-11 12:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.7dd10c12-9e0b-46a0-8ddb-524a671021a4@emailsignatures365.codetwo.com>
     [not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.0d2bd5fa-15cc-4b27-b94e-83614f9e5b38.391a6b1c-c9c3-4223-bc80-85775254cd6c@emailsignatures365.codetwo.com>
2020-07-28 13:33   ` systemd-getty-generator present but undesired Mike Looijmans
2020-07-30  5:12     ` [OE-core] " Khem Raj
2020-08-11 12:06       ` Mike Looijmans

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.