summaryrefslogtreecommitdiffstats
path: root/common/startup.c
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2014-12-08 14:42:39 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-12-09 09:59:10 +0100
commit75889a2900fbbd10ce2212661ed6c4d6a697d483 (patch)
tree39f39adbc7fdfb7ca16b4f387c176ec8f5be549b /common/startup.c
parent46b5a6d6527f74683176410ab8e72236a158ef64 (diff)
downloadbarebox-75889a2900fbbd10ce2212661ed6c4d6a697d483.tar.gz
efi: mount efivarfs by default if enabled
Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/startup.c')
-rw-r--r--common/startup.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/startup.c b/common/startup.c
index 2b92efc..e59b06d 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -51,6 +51,12 @@ static int mount_root(void)
mount("none", "ramfs", "/", NULL);
mkdir("/dev", 0);
mount("none", "devfs", "/dev", NULL);
+
+ if (IS_ENABLED(CONFIG_FS_EFIVARFS)) {
+ mkdir("/efivars", 0);
+ mount("none", "efivarfs", "/efivars", NULL);
+ }
+
return 0;
}
fs_initcall(mount_root);