From: Marco <marco.stornelli@gmail.com>
To: Martin Meuli <Martin.Meuli@gmx.ch>
Cc: linux-embedded@vger.kernel.org
Subject: Re: Saving the kernel log accross boots
Date: Thu, 25 Jun 2009 19:02:43 +0200 [thread overview]
Message-ID: <4A43ADB3.20808@gmail.com> (raw)
In-Reply-To: <op.uv238aaxq25ece@thur.netmodule.intranet>
Martin Meuli wrote:
> Hi All
>
> In case of a crash we would like to save the kernel log and retrieve it
> in the next boot.
> There are already several suggestions on how to do it on this and other
> lists.
> (Kernel crashing and log buffers: Robin Getz)
> Unfortunately we don't have extra SRAM to use for it. We need to do it
> in the 'normal' RAM.
>
> ARCH=ARM
>
> What we did:
> - modify kernel/printk.c: use
> __attribute__((__section__(".bss.kringbuf"... to put the log related
> stuf into a separate section
> - modify the linker script to link .bss.kringbuf at the start of the
> .bss section
> - modify arch/arm/kernel/head-common.S to exclude the new section from
> being nulled (if it was a watchdog restart)
> - modify kernel/printk.c to use cach_flush after prink
> - make sure the bootloader does not overwrite that memory
>
> This seems to work.
> After a crash we get the messages from the new boot and the last crash.
> It seems that the decompress code is using memory at the end of the
> kernel and destroys the log. So we have to use the bootloader to
> decompress the image into RAM.
>
> Before digging any deeper I would like to know if someone as a better
> (more general) idea.
>
> Regards, Martin
I submitted for a review a new filesystem for 2.6.30 called pramfs that
it can be useful for your case. You could use a little piece of ram to
store the log.
Marco
prev parent reply other threads:[~2009-06-25 17:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-25 14:40 Saving the kernel log accross boots Martin Meuli
2009-06-25 15:23 ` Bill Gatliff
2009-06-25 15:29 ` Wolfram Sang
2009-06-26 8:21 ` Martin Meuli
2009-06-25 17:02 ` Marco [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A43ADB3.20808@gmail.com \
--to=marco.stornelli@gmail.com \
--cc=Martin.Meuli@gmx.ch \
--cc=linux-embedded@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.