summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-01-09 17:38:26 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-01-09 17:38:26 +0100
commitcc843dadfd757e1b6e081afd90caec784f740542 (patch)
treeae3ae700efd83375ec332657a5badff5a35f9826 /common
parentf5b8ea7cadeef27817675102bc1ad101d6def9b5 (diff)
parent75889a2900fbbd10ce2212661ed6c4d6a697d483 (diff)
downloadbarebox-cc843dadfd757e1b6e081afd90caec784f740542.tar.gz
barebox-cc843dadfd757e1b6e081afd90caec784f740542.tar.xz
Merge branch 'for-next/efi'
Diffstat (limited to 'common')
-rw-r--r--common/efi-devicepath.c15
-rw-r--r--common/startup.c6
2 files changed, 21 insertions, 0 deletions
diff --git a/common/efi-devicepath.c b/common/efi-devicepath.c
index 2b1d916768..a53c6d2e8b 100644
--- a/common/efi-devicepath.c
+++ b/common/efi-devicepath.c
@@ -1368,3 +1368,18 @@ char *device_path_to_str(struct efi_device_path *dev_path)
return str.str;
}
+
+u8 device_path_to_type(struct efi_device_path *dev_path)
+{
+ struct efi_device_path *dev_path_next;
+
+ dev_path = unpack_device_path(dev_path);
+ dev_path_next = next_device_path_node(dev_path);
+
+ while (!is_device_path_end(dev_path_next)) {
+ dev_path = dev_path_next;
+ dev_path_next = next_device_path_node(dev_path);
+ }
+
+ return device_path_type(dev_path);
+}
diff --git a/common/startup.c b/common/startup.c
index 2b92efcb95..e59b06d533 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);