target/x86: auto unload unused drivers

This commit is contained in:
Liangbin Lian 2024-02-29 14:07:21 +08:00
parent b2edd50d0c
commit 8e1b776665
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
#!/bin/sh
[ -f /etc/config/kmods ] || exit 0
uci -q batch <<-EOF >/dev/null
delete kmods.amdgpu
set kmods.amdgpu=auto_unload
set kmods.amdgpu.function=amdgpu
delete kmods.i915
set kmods.i915=auto_unload
set kmods.i915.function=i915
delete kmods.radeon
set kmods.radeon=auto_unload
set kmods.radeon.function=radeon
delete kmods.mwifiex
set kmods.mwifiex=auto_unload
set kmods.mwifiex.function=mwifiex_pcie
set kmods.mwifiex.support=mwifiex
delete kmods.ath10k
set kmods.ath10k=auto_unload
set kmods.ath10k.function=ath10k_pci
set kmods.ath10k.support=ath10k_core
delete kmods.x86_others
set kmods.x86_others=auto_unload
set kmods.x86_others.function="bnx2x mlx5_core i40e mpt3sas ixgbe"
commit kmods
EOF