diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-07-23 22:25:44 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-07-24 00:56:47 +0200 |
commit | c792697d0ec5e54ee9fcf1536f04f2267dff699d (patch) | |
tree | 9ed359203e242165493b4ce9b7c85d16befd4fa7 /gkbuilds | |
parent | genkernel: bump to v4.1.0_beta1 (diff) | |
download | genkernel-c792697d0ec5e54ee9fcf1536f04f2267dff699d.tar.gz genkernel-c792697d0ec5e54ee9fcf1536f04f2267dff699d.tar.bz2 genkernel-c792697d0ec5e54ee9fcf1536f04f2267dff699d.zip |
Switch from MDEV to UDEV
We need to switch from using MDEV to UDEV to avoid boot problems
due to timeouts caused by some UDEV rules from real system when
real system is using systemd.
Bug: https://bugs.gentoo.org/706434
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gkbuilds')
-rw-r--r-- | gkbuilds/eudev.gkbuild | 40 | ||||
-rw-r--r-- | gkbuilds/hwids.gkbuild | 35 | ||||
-rw-r--r-- | gkbuilds/lvm.gkbuild | 8 |
3 files changed, 79 insertions, 4 deletions
diff --git a/gkbuilds/eudev.gkbuild b/gkbuilds/eudev.gkbuild new file mode 100644 index 0000000..54f2c0d --- /dev/null +++ b/gkbuilds/eudev.gkbuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +src_configure() { + local myconf=( + --enable-static + --enable-blkid + --disable-introspection + --disable-manpages + --disable-selinux + --disable-rule-generator + --disable-hwdb + ) + + # Cannot link against static kmod, https://lists.freedesktop.org/archives/systemd-devel/2013-June/011173.html + myconf+=( --disable-kmod ) + + gkconf "${myconf[@]}" +} + +src_install() { + default + + local files_to_strip=() + files_to_strip+=( /usr/bin/udevadm ) + files_to_strip+=( /usr/lib/udev/ata_id ) + files_to_strip+=( /usr/lib/udev/cdrom_id ) + files_to_strip+=( /usr/lib/udev/collect ) + files_to_strip+=( /usr/lib/udev/mtd_probe ) + files_to_strip+=( /usr/lib/udev/scsi_id ) + files_to_strip+=( /usr/lib/udev/v4l_id ) + files_to_strip+=( /usr/sbin/udevd ) + + local file_to_strip= + for file_to_strip in "${files_to_strip[@]}" + do + "${STRIP}" --strip-all "${D}"${file_to_strip} \ + || die "Failed to strip '${D}${file_to_strip}'!" + done +} diff --git a/gkbuilds/hwids.gkbuild b/gkbuilds/hwids.gkbuild new file mode 100644 index 0000000..60492c5 --- /dev/null +++ b/gkbuilds/hwids.gkbuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +S="${WORKDIR}/hwids-${P}" + +_emake() { + gkmake \ + V=1 \ + NET=yes \ + PCI=yes \ + UDEV=yes \ + USB=yes \ + "$@" +} + +src_prepare() { + default + + # we cannot run host's udevadm + sed -i -e '/udevadm hwdb/d' Makefile || die +} + +src_compile() { + _emake +} + +src_install() { + _emake \ + HWDBDIR="$(get_udevdir)/hwdb.d" \ + DESTDIR="${D}" \ + install + + rm -rf \ + "${D}"/usr/share +} diff --git a/gkbuilds/lvm.gkbuild b/gkbuilds/lvm.gkbuild index 3af06e6..1346cb0 100644 --- a/gkbuilds/lvm.gkbuild +++ b/gkbuilds/lvm.gkbuild @@ -1,8 +1,8 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 src_configure() { - + # devicemapper needs to find udev append-ldflags -Wl,-rpath-link,${BROOT}/usr/lib export ac_cv_header_security_pam_misc_h=no @@ -23,8 +23,8 @@ src_configure() { --with-thin=internal --with-cache=internal --disable-udev-systemd-background-jobs - --disable-udev_sync - --disable-udev_rules + --enable-udev_sync + --enable-udev_rules ) local texec |