linuxboot / linuxboot/heads

Improve whiptail dual console board configurations (would be useful for qemu)

Open
#1,332 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
1.6k
Forks
211
Avg merge
4d 21h
Merged PRs (30d)
6

Description

Not really sure why the following gives to qemu a non-complete interactive shell on host's console, launching qemu:

```
user@heads-tests:~/heads$ git diff
diff --git a/Makefile b/Makefile
index 3dfab86594..579b4cf25f 100644
--- a/Makefile
+++ b/Makefile
@@ -472,6 +472,7 @@ bin_modules-$(CONFIG_NKSTORECLI) += nkstorecli
bin_modules-$(CONFIG_OPENSSL) += openssl
bin_modules-$(CONFIG_TPM2_TOOLS) += tpm2-tools
bin_modules-$(CONFIG_BASH) += bash
+bin_modules-$(CONFIG_USE_AGETTY) += util-linux

$(foreach m, $(bin_modules-y), \
$(call map,initrd_bin_add,$(call bins,$m)) \
diff --git a/boards/qemu-coreboot-whiptail-tpm1/qemu-coreboot-whiptail-tpm1.config b/boards/qemu-coreboot-whiptail-tpm1/qemu-coreboot-whiptail-tpm1.config
index 37ae90a5d1..852280cd45 100644
--- a/boards/qemu-coreboot-whiptail-tpm1/qemu-coreboot-whiptail-tpm1.config
+++ b/boards/qemu-coreboot-whiptail-tpm1/qemu-coreboot-whiptail-tpm1.config
@@ -41,6 +41,10 @@ CONFIG_MSRTOOLS=y
CONFIG_NEWT=y
CONFIG_SLANG=y

+#To output whiptail to both qemu and local console
+export CONFIG_USE_AGETTY=y
+export CONFIG_BOOT_EXTRA_TTYS="ttyS0"
+
endif

export CONFIG_LINUX_USB_COMPANION_CONTROLLER=y
@@ -55,7 +59,7 @@ export CONFIG_BOOTSCRIPT=/bin/gui-init
#export CONFIG_BOOTSCRIPT=/bin/generic-init
export CONFIG_BOOT_REQ_HASH=n
export CONFIG_BOOT_REQ_ROLLBACK=n
-export CONFIG_BOOT_RECOVERY_SERIAL="/dev/ttyS0"
+#export CONFIG_BOOT_RECOVERY_SERIAL="/dev/ttyS0"
export CONFIG_BOOT_KERNEL_ADD="console=ttyS0 console=tty systemd.zram=0"
export CONFIG_BOOT_KERNEL_REMOVE="quiet rhgb splash"
```

On talos II server board having same config, but used over ssh, correcting pseudo-terminal through ssh call:
`ssh -t root@talos "obmcutil poweron && obmc-console-client"`

Works perfectly and permits us to have a dual whiptail output on both VGA and bmc terminal, accessed through ssh.
Note that the problem to get this working was to pass `ssh -t` above.

Not sure how to have the same on qemu call so that the `--serial stdio` can offer the same functionality.

qemu whiptail board could be really useful in that configuration, since whiptail output would contain trails of console output in addition to TRACE and DEBUG output under /tmp/debug.log

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Makefile and boards/qemu-coreboot-whiptail-tpm1/qemu-coreboot-whiptail-tpm1.config, then compare the qemu invocation using --serial stdio with the working ssh -t command. Trace CONFIG_USE_AGETTY, CONFIG_BOOT_EXTRA_TTYS, and the console kernel arguments to determine how dual whiptail output should work. Done means the qemu board provides interactive output on both VGA and the serial terminal.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
embedded-iot, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.