Skip to content
Snippets Groups Projects
Unverified Commit 300b63ba authored by Caleb Connolly's avatar Caleb Connolly :recycle:
Browse files

postmarketos-initramfs: debug-shell 2.0


This incorprates the debug-shell functionality directly into the
initramfs, so it's no longer necessary to build and boot a custom
initramfs in order to debug your device.

Additionally, the behaviour of the debug-shell is entirely reworked,
removing the telnet feature. Instead it creates an ACM serial gadget
which can be accessed via any normal terminal emulator (picocom,
minicom, etc; or PuTTY on windows). Rather than just invoking sh, the
debug-shell now creates a respawning getty on both the new virtual
console and the active console (this will either be the UART console
or tty0/1).

If fbkeyboard is available (it can be added by install
postmarketos-mkinitfs-hook-console-shell) then it will be launched on
tty0. A getty will also be launched on tty0 in this case even if it
otherwise wouldn't be (if the active console was the serial port for
example).

It is necessary to spawn these shells via getty since the logging rework
means we can no longer assume that stdin/out/err reference a TTY.

In addition to the above, it is now possible to trigger a log dump by
holding volume up during boot (if iskey is available). This can be
useful for helping users debug their devices if the issue doesn't result
in a failure that can be detected in the initramfs.

With these changes, the console-shell and debug-shell hook packages are
reduced to only adding the additional tools/features. console-shell is
still required for fbkeyboard, and debug-shell for the setup_usb_storage
tool.

Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
parent 8d569443
No related branches found
No related tags found
No related merge requests found
Pipeline #205874 failed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment