[Freedombox-discuss] Prompt with HDMI

Jonas Smedegaard jonas at jones.dk
Sat Jul 31 13:41:43 BST 2021


Hi Paul,

Quoting Paul van der Vlis (2021-07-31 13:30:37)
> When I connect a monitor to a Freedombox Pioneer from Olimex using 
> HDMI, then I don't get output on that monitor.
> 
> Is it possible to get output and a prompt?
> If yes: What packages do I have to install to get this working?

Yes, it is possible, but I don't think any package exist which handles 
it automagically.  How to change it depends on what exactly you use - 
i.e. if you just turned on your system as it was delivered, or you 
reflashed the SD-card with different boot-loader (u-boot) or system:
Technically "FreedomBox Pioneer" is an OLinuXino LIME2 board in a 
branded case, and an SD-card containing a custom u-boot and 
FreedomBox-tailored Debian.

What follows is *not* tailored to the Olimex-shipped image for the 
FreedomBox Pioneer box.  If it looks scary then maybe wait for others to 
hepl provide you a simpler solution...


Essentially you want linux to emit console output either only to display 
(instead of serial port) or also to display (in addition to serial 
port), by having either of these in the bootargs:

  console=tty0

  console=tty0 console=ttyS0,115200n8

...or by changing default output (e.g. by hacking the device-tree file).

Bootargs can be changes multiple places.  Most reliable in my opinion is 
to use flash-kernel to register linux kernels with u-boot, and adapt the 
file /etc/default/flash-kernel.

Not exactly what you asked, but beware that u-boot can also be told to 
use display instead of serial port (e.g. to see causes for failures 
loading the linux kernel), and it can be configured to change default 
bootargs.

On my systems¹ I reconfigure to use HDMI as primary output and serial as 
secondary output where possible.

I edit the file /etc/flash-kernel/bootscript/bootscr.sunxi to include 
these three lines near the top of the file:

setenv console tty0
usb start
stdin=serial,usbkbd

That changes console during u-boot to _only_ use HDMI (not serial port), 
and to take input from both serial port and USB keyboard.

I also edit the file /etc/default/flash-kernel to this:

LINUX_KERNEL_CMDLINE=""
LINUX_KERNEL_CMDLINE_DEFAULTS="root=/dev/mmcblk0p2 ro loglevel=3 noresume console=ttyS0,115200"

That lowers verbosity (loglevel) slightly to skip some debug output but 
still emit the boot status messages, and re-enables serial port as 
secondary output (which works for some but not all messages, as I 
recall).

To effectuate both changes, it should be enough to run "flash-kernel" - 
as I recall.  If it doesn't then please say so, and I can try figure out 
which commands are needed to effectuate either edit.

My knowledge here is for generic Debian, not FreedomBox specifically, 
and not for the non-Debian custom u-boot - others might help with things 
more specific...


 - Jonas


¹ I use pure-Debian systems installed from my install images at 
https://box.redpill.dk/ - source for my console output tweaks are at 
https://salsa.debian.org/tinker-team/box/-/blob/master/nodes/core_lime2.yml

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/freedombox-discuss/attachments/20210731/c5f173d9/attachment.sig>


More information about the Freedombox-discuss mailing list