Message ID | 20250313052729.1809525-1-Qi.Chen@windriver.com |
---|---|
State | New |
Headers | show |
Series | systemd: check SERIAL_CONSOLES for serial-getty-generator PACKAGECONFIG | expand |
On 13 Mar 2025, at 05:27, Chen Qi via lists.openembedded.org <Qi.Chen=windriver.com@lists.openembedded.org> wrote: > So a better default behavior is that if SERIAL_CONSOLES is empty, then > we put serial-getty-generator in PACKAGECONFIG which let systemd to > generate corresponding service instances. Whilst this seems like a good idea, it would also make the systemd recipe machine-specific. Considering systemd provides libsystemd and libudev, this is not a good idea. Ross
Hi Ross, Let me provide some background of the problem I was trying to solve here. Some BSP layers don't set SERIAL_CONSOLES, and they have worked for a long time with previous systemd. Now systemd-getty-generator is deleted by default, and they don't get any serial console. How about using the following solution: Do not delete anything when serial-getty-generator is in PACKAGECONFIG. I suspect deleting systemd-getty-generator will have potential negative impact on getty@.service. I'm not sure though. Regards, Qi -----Original Message----- From: Ross Burton <Ross.Burton@arm.com> Sent: Tuesday, March 18, 2025 1:47 AM To: Chen, Qi <Qi.Chen@windriver.com> Cc: openembedded-core@lists.openembedded.org Subject: Re: [OE-core][PATCH] systemd: check SERIAL_CONSOLES for serial-getty-generator PACKAGECONFIG On 13 Mar 2025, at 05:27, Chen Qi via lists.openembedded.org <Qi.Chen=windriver.com@lists.openembedded.org> wrote: > So a better default behavior is that if SERIAL_CONSOLES is empty, then > we put serial-getty-generator in PACKAGECONFIG which let systemd to > generate corresponding service instances. Whilst this seems like a good idea, it would also make the systemd recipe machine-specific. Considering systemd provides libsystemd and libudev, this is not a good idea. Ross
On 3/18/25 11:08, Chen Qi via lists.openembedded.org wrote: > Hi Ross, > > Let me provide some background of the problem I was trying to solve here. > Some BSP layers don't set SERIAL_CONSOLES, and they have worked for a long time with previous systemd. Now systemd-getty-generator is deleted by default, and they don't get any serial console. > > How about using the following solution: > Do not delete anything when serial-getty-generator is in PACKAGECONFIG. > > I suspect deleting systemd-getty-generator will have potential negative impact ongetty@.service. I'm not sure though. OK. I just checked. According to https://www.freedesktop.org/software/systemd/man/latest/systemd-getty-generator.html, this affects |serial-getty@.service|, |console-getty.service and ||container-getty@.service. | Anyway, I'll send out V2 using the above solution. Please help review when convenient. Regards, Qi > > Regards, > Qi > > -----Original Message----- > From: Ross Burton<Ross.Burton@arm.com> > Sent: Tuesday, March 18, 2025 1:47 AM > To: Chen, Qi<Qi.Chen@windriver.com> > Cc:openembedded-core@lists.openembedded.org > Subject: Re: [OE-core][PATCH] systemd: check SERIAL_CONSOLES for serial-getty-generator PACKAGECONFIG > > On 13 Mar 2025, at 05:27, Chen Qi via lists.openembedded.org<Qi.Chen=windriver.com@lists.openembedded.org> wrote: >> So a better default behavior is that if SERIAL_CONSOLES is empty, then >> we put serial-getty-generator in PACKAGECONFIG which let systemd to >> generate corresponding service instances. > Whilst this seems like a good idea, it would also make the systemd recipe machine-specific. Considering systemd provides libsystemd and libudev, this is not a good idea. > > Ross > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#213133):https://lists.openembedded.org/g/openembedded-core/message/213133 > Mute This Topic:https://lists.openembedded.org/mt/111674751/3618072 > Group Owner:openembedded-core+owner@lists.openembedded.org > Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [Qi.Chen@windriver.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta/recipes-core/systemd/systemd_257.3.bb b/meta/recipes-core/systemd/systemd_257.3.bb index 64fb8fe69a..f1f6055637 100644 --- a/meta/recipes-core/systemd/systemd_257.3.bb +++ b/meta/recipes-core/systemd/systemd_257.3.bb @@ -92,6 +92,7 @@ PACKAGECONFIG ??= " \ quotacheck \ randomseed \ resolved \ + ${@'' if d.getVar('SERIAL_CONSOLES') else 'serial-getty-generator'} \ set-time-epoch \ sysusers \ timedated \