Bug 13921

Summary: SERIAL_CONSOLES SERIAL_CONSOLES_CHECK
Product: [Runtime] System Startup Reporter: Robert Berger <pokylinux>
Component: system-startupAssignee: Trevor Gamblin <tvgamblin>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: kevin.tian, mark.morton, randy.macleod
Version: 3.1   
Target Milestone: 3.4 M1   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Robert Berger 2020-05-26 03:59:49 UTC
It looks like either the docu is missing something, or I misunderstand something

I use SERIAL_CONSOLES and SERIAL_CONSOLES_CHECK both for SysVinit and systemd. 

For systemd according to [2] SERIAL_CONSOLES_CHECK is not needed. 
The behavior I see is that with systemd on every boot SERIAL_CONSOLES are searched and one is picked from the list. If that's the case it should be documented a bit better.

For SysVinit indeed only the first time around SERIAL_CONSOLES_CHECK is used to find some serial console which is written into /etc/inittab.

This makes it unsuitable for read-only images and the build breaks if you have SERIAL_CONSOLES_CHECK plus EXTRA_IMAGE_FEATURES += "read-only-rootfs" . (which should be documented as well).

Is there a workaround for read-only images e.g. make the one file writeable.

[1] https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-SERIAL_CONSOLES

[2] https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-SERIAL_CONSOLES_CHECK
Comment 1 Trevor Gamblin 2020-06-01 07:00:31 UTC
Patch is in on master now: https://git.openembedded.org/openembedded-core/commit/?id=982b7f98b8423236cc986346379b1bde3694f131

Closing this as resolved.
Comment 2 Trevor Gamblin 2020-06-01 07:01:08 UTC
Closed wrong defect by mistake.
Comment 3 Trevor Gamblin 2020-07-14 12:49:12 UTC
After doing some reading, I don't think that there's a way to achieve this, short of using the https://github.com/cmhe/meta-readonly-rootfs-overlay layer or the methods described there (i.e. sym-links for files that need to change). I'll talk to Mark and see about getting documentation added for the incompatibility of read-only rootfs with SERIAL_CONSOLES_CHECK for SysVinit.
Comment 4 Trevor Gamblin 2021-05-25 16:29:27 UTC
Added to the docs. See: http://docs.yoctoproject.org/ref-manual/variables.html?highlight=serial_consoles_check
Comment 5 Robert Berger 2024-01-11 18:45:01 UTC
Just for completeness and since it was removed:

https://docs.yoctoproject.org/4.0.15/ref-manual/variables.html?highlight=serial_consoles_check#term-SERIAL_CONSOLES_CHECK