[16.0-stable] pillar: Implement console disabling during runtime - #6265
Open
rene wants to merge 3 commits into
Open
[16.0-stable] pillar: Implement console disabling during runtime#6265rene wants to merge 3 commits into
rene wants to merge 3 commits into
Conversation
rungetty.sh runs on an infinite loop so it can re-spawn a console shell when exited from getty. However, this makes impossible to disable a console during runtime if device property debug.enable.console is set to false. This script changes to rungetty.sh to trap signal USR1 and kill the current getty process, which will allow stop the console from pillar during runtime. Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br> (cherry picked from commit 81424ce)
Pillar starts on a fresh boot with USB, VGA and console enabled. This isn't an issue if no serial consoles are present in the cmdline because for video terminals, the TUI + VGA + usb inputs can be disabled during runtime. So as soon as pillar gets the global configuration from the controller, it can disabled all of them. However, if any serial console is present at the cmdline, like console=ttyAMA0, pillar will start getty on that console through the rungetty.sh script, which spawns a getty process on every console from /proc/cmdline. The script use to run a infinte loop, so even if pillar killed the getty process, it would be restarted again. The behavior of rungetty.sh was changed so it really stops getty if it receives a USR1 signal. This commit implements the stopGetty() to send the signal and really stop the console, allowing disabling serial consoles during runtime if "debug.enable.console" is set to false. Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br> (cherry picked from commit 07f9fc5)
Update to the latest version of dom0-ztools in the following packages: - pkg/pillar - pkg/vtpm Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
rene
requested review from
eriknordmark,
milan-zededa,
rouming and
shjala
as code owners
August 3, 2026 14:08
github-actions
Bot
requested review from
OhmSpectator,
christoph-zededa,
jsfakian and
uncleDecart
August 3, 2026 14:08
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 16.0-stable #6265 +/- ##
===============================================
+ Coverage 19.52% 23.55% +4.02%
===============================================
Files 19 19
Lines 3021 2509 -512
===============================================
+ Hits 590 591 +1
+ Misses 2310 1787 -523
- Partials 121 131 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
milan-zededa
approved these changes
Aug 3, 2026
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.
Description
Backport of #6220
How to test and validate this PR
I tested with QEMU, but it can be tested on any device with a working UART console and the
console=<serial device>is present in the kernel command line.make live run-liveormake live run-live-gui, although VGA is not required. The focus is the serial console.debug.enable.consoletofalse(if it's not false by default)debug.enable.consoletotrueDifferent combinations can also be tried:
debug.enable.consoletofalse, reboot the device to ensure serial console is never enableddebug.enable.consoletotrue, reboot the device to ensure serial console is enabledChangelog notes
Fix: allow disabling serial consoles at runtime when debug.enable.console is set to false and skip default console enablement on onboarded devices.
Checklist
check them.