[PATCH] autodetect serial console on efika

Matt Sealey matt at genesi-usa.com
Thu Apr 12 04:47:54 EST 2007


Sylvain Munaut wrote:
> Olaf Hering wrote:
>> On Mon, Apr 09, Matt Sealey wrote:
>>
>>   
>>> It is entirely possible that a user may redirect the OF console output to
>>> the PSC6 controller or another internal or external serial device (PCI
>>> serial controller or so). In this case, the boot console will simply switch
>>> to the UART on the back, which may be some other custom device and not a
>>> valid console.
>>>     
>> How many serial drivers are enabled in the public Efika firmware?
>> With my change, both /failsafe and the /builtin/serial work.
>> Both have device_type == "serial"
>>   
> If I follow the logic of the patch correctly, as soon as there is no
> "console=" in the command line and that the linux,stdout-path has a
> device_type "serial", you add ttyPSC0 as console ?
> 
> The user could have plugged a console on the IRDA PSC and used a
> bootscript to change the OF tree appropriately.
> Or he could have put a PCI multi IO card and set the stdout to it ...
> 
> In all those cases, the ttyPSC0 is bogus ...
> 
> But in those "special cases", I guess it's not too much to ask the user
> to provide a "console=" in the command line.

I think in this case, output should not be redirected, it should fail out
(the current code doesn't, it only checks device type). It should also be
documented that the behaviour only caters for the /failsafe and /builtin/serial
devices and any other serial consoles will require a console= line.

This should be enough warning for users who have more 'crazy' serial port
setups. Definitely, it is possible these users have something attached to
the serial port on the back of the board and have moved the firmware console
for a good reason. You do not want Linux spamming the serial port if you did
not tell it to, and it is not certain that this is the port they want.

-- 
Matt Sealey <matt at genesi-usa.com>
Genesi, Manager, Developer Relations



More information about the Linuxppc-dev mailing list