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
Patch is in on master now: https://git.openembedded.org/openembedded-core/commit/?id=982b7f98b8423236cc986346379b1bde3694f131 Closing this as resolved.
Closed wrong defect by mistake.
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.
Added to the docs. See: http://docs.yoctoproject.org/ref-manual/variables.html?highlight=serial_consoles_check
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