summaryrefslogtreecommitdiffstats
path: root/common/startup.c
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2015-12-08 10:39:32 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-12-10 08:49:52 +0100
commit160d2ed0ba18b5d849ecc98dfde25e350928e7b8 (patch)
treeb2fe1c487732571f7f2cd241e12ad19c910c9340 /common/startup.c
parent6c42710ae03bd642f68220dea4dac60b6cbd6d23 (diff)
downloadbarebox-160d2ed0ba18b5d849ecc98dfde25e350928e7b8.tar.gz
fs: Add pstore filesystem
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> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/startup.c')
-rw-r--r--common/startup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/startup.c b/common/startup.c
index 4a303b2..093a23b 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);