summaryrefslogtreecommitdiffstats
path: root/external/poky/meta/recipes-core/initrdscripts/initramfs-framework
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/meta/recipes-core/initrdscripts/initramfs-framework')
-rwxr-xr-xexternal/poky/meta/recipes-core/initrdscripts/initramfs-framework/init5
-rw-r--r--external/poky/meta/recipes-core/initrdscripts/initramfs-framework/lvm13
-rw-r--r--external/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs14
-rw-r--r--external/poky/meta/recipes-core/initrdscripts/initramfs-framework/udev3
4 files changed, 33 insertions, 2 deletions
diff --git a/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/init b/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/init
index 3c7e0942..c71ce0ce 100755
--- a/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/init
+++ b/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/init
@@ -72,6 +72,7 @@ ROOTFS_DIR="/rootfs" # where to do the switch root
MODULE_PRE_HOOKS="" # functions to call before running each module
MODULE_POST_HOOKS="" # functions to call after running each module
MODULES_DIR=/init.d # place to look for modules
+EFI_DIR=/sys/firmware/efi # place to store device firmware information
# make mount stop complaining about missing /etc/fstab
touch /etc/fstab
@@ -81,6 +82,10 @@ mkdir -p /proc /sys /run/lock /var/lock
mount -t proc proc /proc
mount -t sysfs sysfs /sys
+if [ -d $EFI_DIR ];then
+ mount -t efivarfs none /sys/firmware/efi/efivars
+fi
+
# populate bootparam environment
for p in `cat /proc/cmdline`; do
opt=`echo $p | cut -d'=' -f1`
diff --git a/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/lvm b/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/lvm
new file mode 100644
index 00000000..7deeccb9
--- /dev/null
+++ b/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/lvm
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+lvm_enabled() {
+ if ! lvscan |grep -i -w "inactive" &>/dev/null;then
+ return 1
+ fi
+ return 0
+}
+
+lvm_run() {
+ lvm pvscan --cache --activate ay
+ udevadm trigger --action=add
+}
diff --git a/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
index 76fa84d3..748c9391 100644
--- a/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -27,8 +27,18 @@ rootfs_run() {
fi
if [ "`echo ${bootparam_root} | cut -c1-9`" = "PARTUUID=" ]; then
- root_uuid=`echo $bootparam_root | cut -c10-`
- bootparam_root="/dev/disk/by-partuuid/$root_uuid"
+ root_partuuid=`echo $bootparam_root | cut -c10-`
+ bootparam_root="/dev/disk/by-partuuid/$root_partuuid"
+ fi
+
+ if [ "`echo ${bootparam_root} | cut -c1-10`" = "PARTLABEL=" ]; then
+ root_partlabel=`echo $bootparam_root | cut -c11-`
+ bootparam_root="/dev/disk/by-partlabel/$root_partlabel"
+ fi
+
+ if [ "`echo ${bootparam_root} | cut -c1-10`" = "PARTLABEL=" ]; then
+ root_partlabel=`echo $bootparam_root | cut -c11-`
+ bootparam_root="/dev/disk/by-partlabel/$root_partlabel"
fi
if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
diff --git a/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/udev b/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/udev
index 87551ff4..4898b892 100644
--- a/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/udev
+++ b/external/poky/meta/recipes-core/initrdscripts/initramfs-framework/udev
@@ -41,6 +41,9 @@ udev_run() {
mkdir -p /run
mkdir -p /var/run
+ # Workaround if console=null, systemd-udevd needs valid stdin, stdout and stderr to work
+ sh -c "exec 4< /dev/console" || { exec 0> /dev/null; exec 1> /dev/null; exec 2> /dev/null; }
+
$_UDEV_DAEMON --daemon
udevadm trigger --action=add
udevadm settle