From e38db6e4de8ab2139aa21590ede48c155fd5147a Mon Sep 17 00:00:00 2001 From: alikates Date: Wed, 10 Aug 2022 14:56:23 +0200 Subject: [PATCH] main/postmarketos-mkinitfs: don't use uevent helper (MR 3351) 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 [1]. 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. [1] https://git.busybox.net/busybox/commit/?id=498cec202adbf69a7a72af5e204260682d614183 [ci:skip-build]: already built successfully in CI --- main/postmarketos-mkinitfs/APKBUILD | 4 ++-- main/postmarketos-mkinitfs/init_functions.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main/postmarketos-mkinitfs/APKBUILD b/main/postmarketos-mkinitfs/APKBUILD index dd761aff0..e91c76a40 100644 --- a/main/postmarketos-mkinitfs/APKBUILD +++ b/main/postmarketos-mkinitfs/APKBUILD @@ -2,7 +2,7 @@ # Co-Maintainer: Clayton Craft pkgname=postmarketos-mkinitfs pkgver=1.5.1 -pkgrel=0 +pkgrel=1 pkgdesc="Tool to generate initramfs images for postmarketOS" url="https://postmarketos.org" depends=" @@ -68,5 +68,5 @@ sha512sums=" d28802b17d7912a58d23c02fbdddfdb6f74489e712d61a59472f7f000a4429786f69ba2fca59d321c55c277ff79edb6f47c939a9e973b31f694aeca0167354ff postmarketos-mkinitfs-1.5.1.tar.gz 20f110337113e8de8999cf2a064a93fea36821d5c216bfa4ba46ec1f83825638262b92fd7be29eee0a85a54a108b7315a96cbe30da8ae4419f54c2ed53bb08c7 00-default.modules ccdceaa710d97d6f57d8d66bfcbec448486d08083341712303f62123039f729229b88528308e411a308a2b90b81b60de89fe91143a6facbb11cbc9b4055eeaec init.sh -2abdea96aa66fcc709092ab97bfe5a99ecd7a6c959e344e0619a1c93ce28de21530379c498012a4d8e938013e7b490d3a00d5782b6d75c0987220ac3e7d66c92 init_functions.sh +260f7be8a199d5a3b64975441f7a3c62908b2e36b406341d858f90efd5d713e5559df1ecf465d7d61f5ebd009f61c34ba28e5db81f184ec8d857ceebffc985d9 init_functions.sh " diff --git a/main/postmarketos-mkinitfs/init_functions.sh b/main/postmarketos-mkinitfs/init_functions.sh index 854cc5ec0..b3e5952db 100644 --- a/main/postmarketos-mkinitfs/init_functions.sh +++ b/main/postmarketos-mkinitfs/init_functions.sh @@ -60,8 +60,8 @@ setup_firmware_path() { } setup_mdev() { - echo /sbin/mdev >/proc/sys/kernel/hotplug - mdev -s + # Start mdev daemon + mdev -d # If udevd and udevadm are present in the initfs, coldplug all devices so that # they can be used via libinput (e.g. by unl0kr). This is the same series of steps