Repository navigation
apm821xx: drop redundant ttyS0 askfirst inittab override - #26071
Merged
openwrt-bot merged 1 commit intoOct 21, 2026
Merged
Conversation
The target-specific /etc/inittab overlay adds "ttyS0::askfirst:/usr/libexec/login.sh" on top of the stock "::askconsole" entry. On these boards /dev/console is ttyS0, and since the kernel command line carries no console= parameter, procd's dedup guard in askfirst() (which only skips the entry when the resolved console name matches the askfirst id) does not trigger: "console" never equals "ttyS0". Two /sbin/askfirst instances therefore watch the same port. While both are idle they consume typed characters without echoing them, and once both have spawned a shell the input is split between the two readers, garbling or dropping about half of the typed characters and making the serial console unusable. U-Boot and the vendor firmware are unaffected. No other target combines ::askconsole with an askfirst entry on the same serial port; they either use ::askconsole alone or list specific ttys without it. With the offending line removed the overlay would be byte-identical to package/base-files/files/etc/inittab, so delete the whole file instead of keeping a redundant copy that shadows the stock inittab and would mask future upstream changes to it. The stock three-line inittab applies and exactly one console reader remains. Verified on a WNDR4700: with only this change (and the unmodified 8250 driver) a 30-character test with 1.5 s spacing arrives 30/30 with per-character echo and a single login shell. Signed-off-by: Shuangfeng He <[email protected]> Link: openwrt#26071 Signed-off-by: Christian Marangi <[email protected]>
Ansuel
force-pushed
the
apm821xx-drop-inittab-override
branch
from
October 21, 2026 16:46
624cc08 to
d118dcd
Compare
Vladdrako
pushed a commit
to Vladdrako/openwrt
that referenced
this pull request
Oct 22, 2026
The target-specific /etc/inittab overlay adds "ttyS0::askfirst:/usr/libexec/login.sh" on top of the stock "::askconsole" entry. On these boards /dev/console is ttyS0, and since the kernel command line carries no console= parameter, procd's dedup guard in askfirst() (which only skips the entry when the resolved console name matches the askfirst id) does not trigger: "console" never equals "ttyS0". Two /sbin/askfirst instances therefore watch the same port. While both are idle they consume typed characters without echoing them, and once both have spawned a shell the input is split between the two readers, garbling or dropping about half of the typed characters and making the serial console unusable. U-Boot and the vendor firmware are unaffected. No other target combines ::askconsole with an askfirst entry on the same serial port; they either use ::askconsole alone or list specific ttys without it. With the offending line removed the overlay would be byte-identical to package/base-files/files/etc/inittab, so delete the whole file instead of keeping a redundant copy that shadows the stock inittab and would mask future upstream changes to it. The stock three-line inittab applies and exactly one console reader remains. Verified on a WNDR4700: with only this change (and the unmodified 8250 driver) a 30-character test with 1.5 s spacing arrives 30/30 with per-character echo and a single login shell. Signed-off-by: Shuangfeng He <[email protected]> Link: openwrt#26071 Signed-off-by: Christian Marangi <[email protected]>
BlizzardWyvern
pushed a commit
to BlizzardWyvern/openwrt
that referenced
this pull request
Nov 8, 2026
The target-specific /etc/inittab overlay adds "ttyS0::askfirst:/usr/libexec/login.sh" on top of the stock "::askconsole" entry. On these boards /dev/console is ttyS0, and since the kernel command line carries no console= parameter, procd's dedup guard in askfirst() (which only skips the entry when the resolved console name matches the askfirst id) does not trigger: "console" never equals "ttyS0". Two /sbin/askfirst instances therefore watch the same port. While both are idle they consume typed characters without echoing them, and once both have spawned a shell the input is split between the two readers, garbling or dropping about half of the typed characters and making the serial console unusable. U-Boot and the vendor firmware are unaffected. No other target combines ::askconsole with an askfirst entry on the same serial port; they either use ::askconsole alone or list specific ttys without it. With the offending line removed the overlay would be byte-identical to package/base-files/files/etc/inittab, so delete the whole file instead of keeping a redundant copy that shadows the stock inittab and would mask future upstream changes to it. The stock three-line inittab applies and exactly one console reader remains. Verified on a WNDR4700: with only this change (and the unmodified 8250 driver) a 30-character test with 1.5 s spacing arrives 30/30 with per-character echo and a single login shell. Signed-off-by: Shuangfeng He <[email protected]> Link: openwrt#26071 Signed-off-by: Christian Marangi <[email protected]>
yveming
pushed a commit
to yveming/openwrt-pon
that referenced
this pull request
Nov 11, 2026
The target-specific /etc/inittab overlay adds "ttyS0::askfirst:/usr/libexec/login.sh" on top of the stock "::askconsole" entry. On these boards /dev/console is ttyS0, and since the kernel command line carries no console= parameter, procd's dedup guard in askfirst() (which only skips the entry when the resolved console name matches the askfirst id) does not trigger: "console" never equals "ttyS0". Two /sbin/askfirst instances therefore watch the same port. While both are idle they consume typed characters without echoing them, and once both have spawned a shell the input is split between the two readers, garbling or dropping about half of the typed characters and making the serial console unusable. U-Boot and the vendor firmware are unaffected. No other target combines ::askconsole with an askfirst entry on the same serial port; they either use ::askconsole alone or list specific ttys without it. With the offending line removed the overlay would be byte-identical to package/base-files/files/etc/inittab, so delete the whole file instead of keeping a redundant copy that shadows the stock inittab and would mask future upstream changes to it. The stock three-line inittab applies and exactly one console reader remains. Verified on a WNDR4700: with only this change (and the unmodified 8250 driver) a 30-character test with 1.5 s spacing arrives 30/30 with per-character echo and a single login shell. Signed-off-by: Shuangfeng He <[email protected]> Link: openwrt/openwrt#26071 Signed-off-by: Christian Marangi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The apm821xx target overrides
/etc/inittabonly to add attyS0::askfirstentry on top of the stock::askconsoleentry. Onthese boards
/dev/consoleis ttyS0 and the kernel command line carriesno
console=parameter, so procd's dedup guard inaskfirst()neverfires ("console" never equals "ttyS0") and two
/sbin/askfirstinstances end up watching the same serial port.
While both are idle they consume typed characters without echoing them,
and once both have spawned a shell the input is split between the two
readers, garbling or dropping roughly half of the typed characters and
making the serial console unusable. U-Boot and the vendor firmware are
unaffected.
No other target combines
::askconsolewith an askfirst entry on thesame serial port; they either use
::askconsolealone or list specificttys without it.
Since the overlay minus the offending line would be byte-identical to
package/base-files/files/etc/inittab, the whole overlay file isdeleted instead of keeping a redundant copy that shadows the stock
inittab and would mask future upstream changes to it. The stock
three-line inittab applies and exactly one console reader remains.
Testing: verified on a WNDR4700 — with only this change (and the
unmodified 8250 driver) a 30-character test with 1.5 s spacing arrives
30/30 with per-character echo and a single login shell.
Signed-off-by: Shuangfeng He [email protected]