Re: Support for netconsole as default tty/console?

2014-04-02 Thread Takashi Iwai
At Tue, 1 Apr 2014 10:34:27 +0200,
Struan Bartlett wrote:
> 
> On 31 March 2014 14:34, Andreas Schwab  wrote:
> > One Thousand Gnomes  writes:
> >
> >> It's however implemented and present. The rest is between you and the
> >> relevant Kconfig maintainer. I'm sure you count as an expert ;-)
> >
> > Indeed.
> >
> > http://lists.opensuse.org/opensuse-kernel/2014-03/msg00071.html
> 
> I have just completed an implementation of a tty driver for
> netconsole, which I was about to submit as a patch. When the kernel
> command line is set accordingly (console=netcon0), it has the desired
> effect of taking over output to /dev/console when it is loaded. Would
> you say this work is wasted, or that it's worth submitting the patch
> anyway?
> 
> There are differences to the ttyprintk approach. ttyprintk is
> currently kernel-only, and not available as a module.

Actually, this can be easily fixed.  I'm going to submit a patch (and
another fix patch for the driver's error path).

Note that they don't mean to object against your patching netconsole.
I find also it more convenient to use directly netconsole.


thanks,

Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Support for netconsole as default tty/console?

2014-04-01 Thread Struan Bartlett
On 31 March 2014 14:34, Andreas Schwab  wrote:
> One Thousand Gnomes  writes:
>
>> It's however implemented and present. The rest is between you and the
>> relevant Kconfig maintainer. I'm sure you count as an expert ;-)
>
> Indeed.
>
> http://lists.opensuse.org/opensuse-kernel/2014-03/msg00071.html

I have just completed an implementation of a tty driver for
netconsole, which I was about to submit as a patch. When the kernel
command line is set accordingly (console=netcon0), it has the desired
effect of taking over output to /dev/console when it is loaded. Would
you say this work is wasted, or that it's worth submitting the patch
anyway?

There are differences to the ttyprintk approach. ttyprintk is
currently kernel-only, and not available as a module. ttyprintk adds
special formatting to the output, which netconsole does not. (If
netconsole were to provide special formatting, it might make sense for
it to be syslog-compatible). In defence of netconsole providing a tty
driver, many other output device modules already provide their own tty
(i.e. do not rely on ttyprintk). Also, unlike ttyprintk, netconsole is
already widely used and well documented on the web. Adding a tty
driver to netconsole would be a natural extension of functionality for
those already using it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Support for netconsole as default tty/console?

2014-03-31 Thread Arkadiusz Miskiewicz
On Monday 31 of March 2014, One Thousand Gnomes wrote:
> On Sat, 29 Mar 2014 15:54:24 +0100
> 
> Andreas Schwab  wrote:
> > Struan Bartlett  writes:
> > > Adding console=netconsole to the command line does not appear to have
> > > the desired effect. I am not sure if this is because netconsole,
> > > unlike the serial console, does not provide a tty. Can anyone advise
> > > if this understanding is correct? If so, is there an independent
> > > solution to this problem?
> > 
> > It should not be hard to add a tty driver to netconsole, there are many
> > examples to borrow from.
> 
> Samo Pogacnik added a generic solution a few years ago. The ttyprintk
> driver provides you with a tty/console whose 'hardware' is printk and
> thus whatever system log device you are using.

Is there a way to get two devices working as console? For example I would like 
to have console on tty0 and on netconsole at the same time. Right now only 
one, last console gets all userspace messages.

> Alan

-- 
Arkadiusz Miƛkiewicz, arekm / maven.pl
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Support for netconsole as default tty/console?

2014-03-31 Thread Andreas Schwab
One Thousand Gnomes  writes:

> It's however implemented and present. The rest is between you and the
> relevant Kconfig maintainer. I'm sure you count as an expert ;-)

Indeed.

http://lists.opensuse.org/opensuse-kernel/2014-03/msg00071.html

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Support for netconsole as default tty/console?

2014-03-31 Thread One Thousand Gnomes
On Mon, 31 Mar 2014 12:26:35 +0200
Andreas Schwab  wrote:

> One Thousand Gnomes  writes:
> 
> > Samo Pogacnik added a generic solution a few years ago. The ttyprintk
> > driver provides you with a tty/console whose 'hardware' is printk and
> > thus whatever system log device you are using.
> 
> Unfortunately it's an EXPERT setting, thus typically not avaiable.

It's however implemented and present. The rest is between you and the
relevant Kconfig maintainer. I'm sure you count as an expert ;-)

(and perhaps moving it into drivers/tty would also be sensible).

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Support for netconsole as default tty/console?

2014-03-31 Thread Andreas Schwab
One Thousand Gnomes  writes:

> Samo Pogacnik added a generic solution a few years ago. The ttyprintk
> driver provides you with a tty/console whose 'hardware' is printk and
> thus whatever system log device you are using.

Unfortunately it's an EXPERT setting, thus typically not avaiable.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Support for netconsole as default tty/console?

2014-03-31 Thread One Thousand Gnomes
On Sat, 29 Mar 2014 15:54:24 +0100
Andreas Schwab  wrote:

> Struan Bartlett  writes:
> 
> > Adding console=netconsole to the command line does not appear to have
> > the desired effect. I am not sure if this is because netconsole,
> > unlike the serial console, does not provide a tty. Can anyone advise
> > if this understanding is correct? If so, is there an independent
> > solution to this problem?
> 
> It should not be hard to add a tty driver to netconsole, there are many
> examples to borrow from.

Samo Pogacnik added a generic solution a few years ago. The ttyprintk
driver provides you with a tty/console whose 'hardware' is printk and
thus whatever system log device you are using.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Support for netconsole as default tty/console?

2014-03-30 Thread Andreas Schwab
Struan Bartlett  writes:

> Thank you. I've begun investigating the sources in drivers/tty. Am I
> correct in thinking that this only needs a tty driver, and not also a
> serial driver?

See arch/m68k/emu/nfcon.c for a somewhat minimal example (only output).

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Support for netconsole as default tty/console?

2014-03-30 Thread Struan Bartlett
On 29 March 2014 15:54, Andreas Schwab  wrote:
> Struan Bartlett  writes:
>
>> Adding console=netconsole to the command line does not appear to have
>> the desired effect. I am not sure if this is because netconsole,
>> unlike the serial console, does not provide a tty. Can anyone advise
>> if this understanding is correct? If so, is there an independent
>> solution to this problem?
>
> It should not be hard to add a tty driver to netconsole, there are many
> examples to borrow from.

Thank you. I've begun investigating the sources in drivers/tty. Am I
correct in thinking that this only needs a tty driver, and not also a
serial driver?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Support for netconsole as default tty/console?

2014-03-29 Thread Andreas Schwab
Struan Bartlett  writes:

> Adding console=netconsole to the command line does not appear to have
> the desired effect. I am not sure if this is because netconsole,
> unlike the serial console, does not provide a tty. Can anyone advise
> if this understanding is correct? If so, is there an independent
> solution to this problem?

It should not be hard to add a tty driver to netconsole, there are many
examples to borrow from.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/