From: Markus Pargmann <mpa@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 9/9] fs: Add pstore filesystem
Date: Fri, 04 Dec 2015 14:10:48 +0100 [thread overview]
Message-ID: <2170900.IVDfPRBNAK@adelgunde> (raw)
In-Reply-To: <20151202213713.5023ecefad709dc2d3e260a7@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3819 bytes --]
Hi,
On Wednesday 02 December 2015 21:37:13 Antony Pavlov wrote:
> On Wed, 2 Dec 2015 14:48:51 +0100
> Markus Pargmann <mpa@pengutronix.de> wrote:
>
> > pstore is a persistent storage filesystem used for RAMOOPS. It is used
> > to store console logs, panics, ftrace and other information in case of a
> > crash/panic/oops/reboot.
> >
> > pstore is implemented for barebox as a read-only filesystem at the
> > moment. It may be extended later on. The idea is to provide a way to
> > extract essential data from the last running kernel.
> >
> > Most of the code is copied from the kernel. However this is only a
> > lightweight implementation without real write support yet.
> >
> > Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> > ---
> > common/startup.c | 5 +
> > fs/Kconfig | 2 +
> > fs/Makefile | 1 +
> > fs/pstore/Kconfig | 88 ++++++++
> > fs/pstore/Makefile | 10 +
> > fs/pstore/fs.c | 280 +++++++++++++++++++++++++
> > fs/pstore/internal.h | 19 ++
> > fs/pstore/platform.c | 138 ++++++++++++
> > fs/pstore/ram.c | 507 +++++++++++++++++++++++++++++++++++++++++++++
> > fs/pstore/ram_core.c | 426 +++++++++++++++++++++++++++++++++++++
> > include/linux/pstore.h | 90 ++++++++
> > include/linux/pstore_ram.h | 87 ++++++++
> > 12 files changed, 1653 insertions(+)
> > create mode 100644 fs/pstore/Kconfig
> > create mode 100644 fs/pstore/Makefile
> > create mode 100644 fs/pstore/fs.c
> > create mode 100644 fs/pstore/internal.h
> > create mode 100644 fs/pstore/platform.c
> > create mode 100644 fs/pstore/ram.c
> > create mode 100644 fs/pstore/ram_core.c
> > create mode 100644 include/linux/pstore.h
> > create mode 100644 include/linux/pstore_ram.h
> >
> > diff --git a/common/startup.c b/common/startup.c
> > index 4a303b297aaf..093a23ba08c9 100644
> > --- a/common/startup.c
> > +++ b/common/startup.c
> > @@ -60,6 +60,11 @@ static int mount_root(void)
> > mount("none", "efivarfs", "/efivars", NULL);
> > }
> >
> > + if (IS_ENABLED(CONFIG_FS_PSTORE)) {
> > + mkdir("/pstore", 0);
> > + mount("none", "pstore", "/pstore", NULL);
> > + }
> > +
> > return 0;
> > }
> > fs_initcall(mount_root);
> > diff --git a/fs/Kconfig b/fs/Kconfig
> > index 9217bc81ea1e..5413a9295ccc 100644
> > --- a/fs/Kconfig
> > +++ b/fs/Kconfig
> > @@ -89,4 +89,6 @@ config FS_SMHFS
> > located on a debugging host connected to the target running
> > Barebox
> >
> > +source fs/pstore/Kconfig
> > +
> > endmenu
> > diff --git a/fs/Makefile b/fs/Makefile
> > index 46932057c1b7..590c068e6045 100644
> > --- a/fs/Makefile
> > +++ b/fs/Makefile
> > @@ -14,3 +14,4 @@ obj-$(CONFIG_FS_UIMAGEFS) += uimagefs.o
> > obj-$(CONFIG_FS_EFI) += efi.o
> > obj-$(CONFIG_FS_EFIVARFS) += efivarfs.o
> > obj-$(CONFIG_FS_SMHFS) += smhfs.o
> > +obj-y += pstore/
>
> Can we use
>
> obj-$(CONFIG_FS_PSTORE) += pstore/
>
> ?
Yes, changed it so that this Makefile uses the config symbol and
pstore/Makefile is unconditional then.
Best Regards,
Markus
>
> > diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig
> > new file mode 100644
> > index 000000000000..2455b5629cb1
> > --- /dev/null
> > +++ b/fs/pstore/Kconfig
> > @@ -0,0 +1,88 @@
> > +menuconfig FS_PSTORE
> > + bool
> > + prompt "pstore fs support"
>
> --
> Best regards,
> Antony Pavlov
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2015-12-04 13:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 13:48 [PATCH 0/9] RAMOOPS read support for Barebox Markus Pargmann
2015-12-02 13:48 ` [PATCH 1/9] arm: boards: karo-tx6x remove definition of DIV_ROUND_UP Markus Pargmann
2015-12-02 13:48 ` [PATCH 2/9] log2: Add missing __rounddown_pow_of_two() Markus Pargmann
2015-12-02 13:48 ` [PATCH 3/9] printk: Add missing include/declaration Markus Pargmann
2015-12-02 13:48 ` [PATCH 4/9] vsprintf: Add scnprintf from kernel Markus Pargmann
2015-12-02 13:48 ` [PATCH 5/9] lib: Import reed solomon code " Markus Pargmann
2015-12-04 7:12 ` Sascha Hauer
2015-12-04 13:22 ` Markus Pargmann
2015-12-02 13:48 ` [PATCH 6/9] arm: Clarify memory layout calculation Markus Pargmann
2015-12-04 7:09 ` Sascha Hauer
2015-12-02 13:48 ` [PATCH 7/9] arm: start: Add visible sdram region for barebox board data Markus Pargmann
2015-12-02 13:48 ` [PATCH 8/9] arm: Add RAMOOPS memory area Markus Pargmann
2015-12-04 7:07 ` Sascha Hauer
2015-12-04 13:30 ` Markus Pargmann
2015-12-07 9:15 ` Sascha Hauer
2015-12-02 13:48 ` [PATCH 9/9] fs: Add pstore filesystem Markus Pargmann
2015-12-02 18:37 ` Antony Pavlov
2015-12-04 13:10 ` Markus Pargmann [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=2170900.IVDfPRBNAK@adelgunde \
--to=mpa@pengutronix.de \
--cc=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox