Re: [PATCH/RFC] oops and panic message logging to MTD

Richard Purdie
2007-05-29T12:36:32Z

On Tue, 2007-05-29 at 13:32 +0100, Richard Purdie wrote:
> Kernel oops and panic messages are invaluable when debugging crashes.
> These messages often don't make it to flash based logging methods (say a
> syslog on jffs2) due to the overheads involved in writing to flash.
>
> This patch allows you to turn an MTD partition into a circular log
> buffer where kernel oops and panic messages are written to. The messages
> are obtained by registering a console driver and checking
> oops_in_progress. Erases are performed in advance to maximise the
> chances of a saving messages.
>
> To activate it, add console=ttyMTDx to the kernel commandline (where x
> is the mtd device number to use).
>
> Signed-off-by: Richard Purdie <rpurdie@openedhand.com>

I meant to add, http://folks.o-hand.com/richard/oopslog.c is an example
of extracting this information in userspace. It will work with an
mtdblock device or a dump of the mtd partition.

Cheers,

Richard