Skip to content

main/postmarketos-mkinitfs: Switch to mdev daemon from uevent helper

alikates requested to merge alikates/pmaports:mdev-daemon into master

Instead of using the uevent helper binary, mdev daemon listens for kernel events using the netlink interface.
Then the requirement of enabling UEVENT_HELPER for pmOS kernels can be dropped, as it's use is discouraged.

From CONFIG_UEVENT_HELPER kernel config help:

This should not be used today, because usual systems create many events at bootup or device discovery in a very short time frame. One forked process per event can create so many processes that it creates a high system load, or on smaller systems it is known to create out-of-memory situations during bootup.

Support for running mdev as a daemon was added in 2019 with commit https://github.com/mirror/busybox/commit/498cec202adbf69a7a72af5e204260682d614183.

From that same commit:

Adds the -d option to run mdev in daemon mode handling hotplug events from the kernel like udev. If the system generates many hotplug events this mode of operation will consume less resources than registering mdev as hotplug helper or using the uevent applet.

Blocked by this MR: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/37512 (merged)

Edited by alikates

Merge request reports