summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorStefan Eichenberger <stefan.eichenberger@toradex.com>2020-03-13 12:09:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-13 23:00:26 +0000
commitcf2ea6cc27c3bc7474bce6089d222de50150ec34 (patch)
tree7f6e3622c59aac0d57a56d07317b02ed2f8d03bc /meta
parentb353a8069ba1b7691aa198115e047211c93f09c4 (diff)
downloadpoky-cf2ea6cc27c3bc7474bce6089d222de50150ec34.tar.gz
initramfs-framework: fix boothang when console=null
If console=null systemd-udevd throws an assertion which prevents the system from booting. This patch redirects stdin, stdout and stderr to /dev/null in case that the console can't be opened so that udevd still boots. A systemd issue was reported here. However, they will not fix this specific use-case: https://github.com/systemd/systemd/issues/13332 (From OE-Core rev: dd6ee0b06cd8df6204cf600050516d15172302ea) Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/udev3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev b/meta/recipes-core/initrdscripts/initramfs-framework/udev
index 87551ff4a9..4898b89246 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/udev
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev
@@ -41,6 +41,9 @@ udev_run() {
41 mkdir -p /run 41 mkdir -p /run
42 mkdir -p /var/run 42 mkdir -p /var/run
43 43
44 # Workaround if console=null, systemd-udevd needs valid stdin, stdout and stderr to work
45 sh -c "exec 4< /dev/console" || { exec 0> /dev/null; exec 1> /dev/null; exec 2> /dev/null; }
46
44 $_UDEV_DAEMON --daemon 47 $_UDEV_DAEMON --daemon
45 udevadm trigger --action=add 48 udevadm trigger --action=add
46 udevadm settle 49 udevadm settle