[Skiboot] [PATCH] Set boot consoles to be used by the bootloader

Samuel Mendoza-Jonas sam at mendozajonas.com
Thu Mar 31 10:50:36 AEDT 2016


On Thu, Mar 31, 2016 at 10:35:39AM +1100, Stewart Smith wrote:
> Sam Mendoza-Jonas <sam at mendozajonas.com> writes:
> > If nothing is specified on the kernel command line the boot console will
> > only be displayed on hvc0 by default.
> > Specify both tty0 and hvc0 so that the boot console can also be seen on
> > the VGA device if it is available.
> >
> > Signed-off-by: Sam Mendoza-Jonas <sam at mendozajonas.com>
> > ---
> > Technically this could also be done by patching it to be the default
> > in the kernel (ie. a patch in op-build) but this seems to be a cleaner
> > way of setting it for any bootloader we may have.
> > Tested on a Habanero and Tuleta machine, although I don't have a monitor
> > attached to any Tuletas at the moment.
> 
> So... I've been thinking about this for a bit, and my mind returned to
> it sometime this morning in a haze of cold+flu meds - and I've started
> to think that this may not be the best way to achieve this...
> 
> While this probably works on existing configurations okay, my concern is
> if people start doing crazy things like adding in serial ports or hvc
> consoles and the like....
> 
> Should we instead have some kind of notation in the device tree that
> then Linux can listen to? I've been digging into the /chosen/stdout
> property, but that only gets us one console, which isn't exactly what we
> want....
> 
> so it kind of seems like we want a new binding, maybe
> /chosen/console-path that's a list of devices that firmware hints that a
> console should be run on? That way we could avoid something that ends up
> being like "console=all" on a command line, and possibly starting
> consoles in the wrong place...
> 
> thoughts?

Actually over coffee this morning Mikey pointed out the CONFIG_CMDLINE
kernel option, which appears to work just as well. That means we can
target specific platforms in op-build rather than an always-on config.
I'm going to send an op-build PR at some point this morning, and we
should drop this patch :)

The /chosen/console-path sounds like an interesting idea too, maybe
something to think about once we start seeing crazy new platforms
popping up.

Cheers,
Sam

> 
> -- 
> Stewart Smith
> OPAL Architect, IBM.
> 



More information about the Skiboot mailing list