utils: Add option to run root shell on console
Some checks reported errors
Aimee OS/aimee-os/pipeline/head Something is wrong with the build of this commit

Until I develop a captive portal-based mechanism for initially
configuring the WiFi on Raspberry Pi machines, the easiest way to do
initial provisioning is using the CLI via the serial console.  Since the
root account has no password, and I don't want to have to specify one in
downstream projects' configurations, I've added a configuration option
to enable automatically launching a root shell connected to the serial
console instead of a login prompt.  The security risks here are pretty
minimal, because someone would need phyiscal access to the device in
order to use this shell, in which case they could use any number of
other methods to get control of the system.
This commit is contained in:
2025-11-15 13:05:37 -06:00
parent b2a0aab680
commit 91b584dfd2
4 changed files with 65 additions and 1 deletions

View File

@@ -8,3 +8,25 @@ config BR2_PACKAGE_AIMEE_OS_UTILS
select BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT
select BR2_PACKAGE_WGET
select BR2_TARGET_GRUB2_INSTALL_TOOLS
if BR2_PACKAGE_AIMEE_OS_UTILS
config AIMEE_OS_ROOT_SHELL
bool "Spawn a root shell on the serial console by default"
help
With this option enabled, the system will boot up normally, with
a root shell connected to the default serial console. This is
useful for initial provisioning and troubleshooting.
if AIMEE_OS_ROOT_SHELL
config AIMEE_OS_ROOT_SHELL_CONSOLE
string "Console name"
default ttyAMA0
help
Name of the console device where the root shell will be spawned.
Do not include the /dev prefix
endif
endif