mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 14:43:27 -04:00
dev-libs/xdna-driver: override driver via /etc/depmod.d
Previous method with /etc/modprobe.d was unreliable: with 7.0 kernel amdxdna depends on amd-pmf module. With "insmod" in modprobe.d the driver was sometimes loaded before amd-pmf, failing with "Unknown symbol amd_pmf_get_npu_data". But depmod.d is both reliable and clean way to override in-tree driver with out-of-tree one (i. e. respects "depends" section that one can see in `modinfo amdxdna`). Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
This commit is contained in:
@@ -161,14 +161,10 @@ src_install() {
|
|||||||
popd &>/dev/null || die
|
popd &>/dev/null || die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
insinto /usr/lib/modules-load.d
|
# Prefer out-of-tree driver over kernel/drivers/accel/amdxdna/amdxdna.ko
|
||||||
|
insinto /etc/depmod.d
|
||||||
newins - amdxdna.conf <<-EOF
|
newins - amdxdna.conf <<-EOF
|
||||||
amdxdna
|
override amdxdna * extra
|
||||||
EOF
|
|
||||||
|
|
||||||
insinto /etc/modprobe.d
|
|
||||||
newins - amdxdna.conf <<-EOF
|
|
||||||
install amdxdna /sbin/insmod /lib/modules/\$(uname -r)/extra/amdxdna.ko* \$CMDLINE_OPTS
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
linux-mod-r1_src_install
|
linux-mod-r1_src_install
|
||||||
@@ -158,14 +158,10 @@ src_install() {
|
|||||||
popd &>/dev/null || die
|
popd &>/dev/null || die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
insinto /usr/lib/modules-load.d
|
# Prefer out-of-tree driver over kernel/drivers/accel/amdxdna/amdxdna.ko
|
||||||
|
insinto /etc/depmod.d
|
||||||
newins - amdxdna.conf <<-EOF
|
newins - amdxdna.conf <<-EOF
|
||||||
amdxdna
|
override amdxdna * extra
|
||||||
EOF
|
|
||||||
|
|
||||||
insinto /etc/modprobe.d
|
|
||||||
newins - amdxdna.conf <<-EOF
|
|
||||||
install amdxdna /sbin/insmod /lib/modules/\$(uname -r)/extra/amdxdna.ko* \$CMDLINE_OPTS
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
linux-mod-r1_src_install
|
linux-mod-r1_src_install
|
||||||
|
|||||||
Reference in New Issue
Block a user