1
0
forked from rpms/kernel
kernel/filter-modules.sh.rhel

170 lines
4.4 KiB
Plaintext
Raw Normal View History

#! /bin/bash
#
# Called as filter-modules.sh list-of-modules Arch
# This script filters the modules into the kernel-core and kernel-modules
# subpackages. We list out subsystems/subdirs to prune from the installed
# module directory. What is left is put into the kernel-core package. What is
# pruned is contained in the kernel-modules package.
#
# This file contains the default subsys/subdirs to prune from all architectures.
# If an architecture needs to differ, we source a per-arch filter-<arch>.sh file
# that contains the set of override lists to be used instead. If a module or
# subsys should be in kernel-modules on all arches, please change the defaults
# listed here.
# Overrides is individual modules which need to remain in kernel-core due to deps.
overrides="cec"
# Set the default dirs/modules to filter out
driverdirs="atm auxdisplay bcma bluetooth firewire fmc iio infiniband isdn leds media memstick mfd mmc mtd nfc ntb pcmcia platform power ssb staging tty uio uwb w1"
chardrvs="mwave pcmcia"
netdrvs="appletalk can dsa hamradio ieee802154 irda ppp slip usb wireless"
ethdrvs="3com adaptec alteon amd aquantia atheros broadcom cadence calxeda chelsio cisco dec dlink emulex icplus marvell neterion nvidia oki-semi packetengines qlogic rdc renesas sfc silan sis smsc stmicro sun tehuti ti wiznet xircom"
inputdrvs="gameport tablet touchscreen"
scsidrvs="aacraid aic7xxx aic94xx be2iscsi bfa bnx2i bnx2fc csiostor cxgbi esas2r fcoe fnic hisi_sas isci libsas lpfc megaraid mpt2sas mpt3sas mvsas pm8001 qla2xxx qla4xxx sym53c8xx_2 ufs qedf"
usbdrvs="atm image misc serial wusbcore"
fsdrvs="affs befs coda cramfs ecryptfs hfs hfsplus jfs minix ncpfs nilfs2 ocfs2 reiserfs romfs squashfs sysv ubifs ufs"
netprots="6lowpan appletalk atm ax25 batman-adv bluetooth can dccp dsa ieee802154 irda l2tp mac80211 mac802154 mpls netrom nfc rds rfkill rose sctp smc wireless"
drmdrvs="amd ast gma500 i2c i915 mgag200 nouveau radeon via "
kernel-5.14.0-0.rc7.54.el9 * Tue Aug 24 2021 Herton R. Krzesinski <herton@redhat.com> [5.14.0-0.rc7.54] - v5.14-rc7-1-gd5ae8d7f85b7 rebase - arm64: dts: rockchip: Disable CDN DP on Pinebook Pro (Matthias Brugger) - arm64: dts: rockchip: Setup USB typec port as datarole on (Dan Johansen) - Revert "IB/rxe: Mark Soft-RoCE Transport driver as tech-preview" (Herton R. Krzesinski) - redhat/configs: Enable genet and brcmfmac wlan (Jeremy Linton) [1992902] - [scsi] megaraid_sas: re-add certain pci-ids (Tomas Henzl) - xfs: drop experimental warnings for bigtime and inobtcount (Bill O'Donnell) [1995321] - Disable liquidio driver on ark/rhel (Herton R. Krzesinski) [1993393] - More Fedora config updates (Justin M. Forbes) - Fedora config updates for 5.14 (Justin M. Forbes) - CI: Rename ARK CI pipeline type (Veronika Kabatova) - CI: Finish up c9s config (Veronika Kabatova) - CI: Update ppc64le config (Veronika Kabatova) - CI: use more templates (Veronika Kabatova) - Filter updates for aarch64 (Justin M. Forbes) - increase CONFIG_NODES_SHIFT for aarch64 (Chris von Recklinghausen) [1890304] - Revert "redhat: ark: disable CONFIG_NET_SCH_MULTIQ" (Marcelo Ricardo Leitner) [1991624] - redhat: configs: Enable CONFIG_WIRELESS_HOTKEY (Hans de Goede) - redhat/configs: Update CONFIG_NVRAM (Desnes A. Nunes do Rosario) [1988254] - common: serial: build in SERIAL_8250_LPSS for x86 (Peter Robinson) - powerpc: enable CONFIG_FUNCTION_PROFILER (Diego Domingos) [1831065] - crypto: rng - Override drivers/char/random in FIPS mode (Herbert Xu) [1984784] - random: Add hook to override device reads and getrandom(2) (Herbert Xu) [1984784] - redhat/configs: Disable Soft-RoCE driver (Kamal Heib) - filter-modules.sh: add more sound modules to filter (Jaroslav Kysela) - redhat/configs: sound configuration cleanups and updates (Jaroslav Kysela) Resolves: rhbz#1831065, rhbz#1988254, rhbz#1890304, rhbz#1993393, rhbz#1995321 Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2021-08-24 14:33:10 +00:00
singlemods="ntb_netdev iscsi_ibft iscsi_boot_sysfs megaraid pmcraid qedi qla1280 9pnet_rdma rpcrdma nvmet-rdma nvme-rdma hid-picolcd hid-prodikeys hwa-hc hwpoison-inject hid-sensor-hub target_core_user sbp_target cxgbit iw_cxgb3 iw_cxgb4 cxgb3i cxgb3i cxgb3i_ddp cxgb4i chcr chtls parport_serial ism regmap-sdw regmap-sdw-mbq arizona-micsupp hid-asus"
# Grab the arch-specific filter list overrides
source ./filter-$2.sh
filter_dir() {
filelist=$1
dir=$2
grep -v -e "${dir}/" ${filelist} > ${filelist}.tmp
if [ $? -ne 0 ]
then
echo "Couldn't remove ${dir}. Skipping."
else
grep -e "${dir}/" ${filelist} >> k-d.list
mv ${filelist}.tmp $filelist
fi
return 0
}
filter_ko() {
filelist=$1
mod=$2
grep -v -e "${mod}.ko" ${filelist} > ${filelist}.tmp
if [ $? -ne 0 ]
then
echo "Couldn't remove ${mod}.ko Skipping."
else
grep -e "${mod}.ko" ${filelist} >> k-d.list
mv ${filelist}.tmp $filelist
fi
return 0
}
# Filter the drivers/ subsystems
for subsys in ${driverdirs}
do
filter_dir $1 drivers/${subsys}
done
# Filter the networking drivers
for netdrv in ${netdrvs}
do
filter_dir $1 drivers/net/${netdrv}
done
# Filter the char drivers
for char in ${chardrvs}
do
kernel-5.12.0-0.rc8.193.el9 * Thu Apr 22 2021 Herton R. Krzesinski <herton@redhat.com> [5.12.0-0.rc8.193] - v5.12-rc8-1-g7af08140979a rebase - Replace /usr/libexec/platform-python with /usr/bin/python3 (David Ward) - Turn off ADI_AXI_ADC and AD9467 which now require CONFIG_OF (Justin M. Forbes) - Export ark infrastructure files (Don Zickus) - docs: Update docs to reflect newer workflow. (Don Zickus) - Use upstream/master for merge-base with fallback to master (Don Zickus) - Fedora: Turn off the SND_INTEL_BYT_PREFER_SOF option (Hans de Goede) - filter-modules.sh.fedora: clean up "netprots" (Paul Bolle) - filter-modules.sh.fedora: clean up "scsidrvs" (Paul Bolle) - filter-*.sh.fedora: clean up "ethdrvs" (Paul Bolle) - filter-*.sh.fedora: clean up "driverdirs" (Paul Bolle) - filter-*.sh.fedora: remove incorrect entries (Paul Bolle) - filter-*.sh.fedora: clean up "singlemods" (Paul Bolle) - filter-modules.sh.fedora: drop unused list "iiodrvs" (Paul Bolle) - Update mod-internal to fix depmod issue (Nico Pache) - Turn on CONFIG_VDPA_SIM_NET (rhbz 1942343) (Justin M. Forbes) - New configs in drivers/power (Fedora Kernel Team) - Turn on CONFIG_NOUVEAU_DEBUG_PUSH for debug configs (Justin M. Forbes) - Turn off KFENCE sampling by default for Fedora (Justin M. Forbes) - Fedora config updates round 2 (Justin M. Forbes) - New configs in drivers/soc (Jeremy Cline) - filter-modules.sh: Fix copy/paste error 'input' (Paul Bolle) - Update module filtering for 5.12 kernels (Justin M. Forbes) - Fix genlog.py to ensure that comments retain "%%" characters. (Mark Mielke) - New configs in drivers/leds (Fedora Kernel Team) - Limit CONFIG_USB_CDNS_SUPPORT to x86_64 and arm in Fedora (David Ward) - Fedora: Enable CHARGER_GPIO on aarch64 too (Peter Robinson) - Fedora config updates (Justin M. Forbes) - wireguard: mark as Tech Preview (Hangbin Liu) [1613522] - configs: enable CONFIG_WIREGUARD in ARK (Hangbin Liu) [1613522] - Remove duplicate configs acroos fedora, ark and common (Don Zickus) - Combine duplicate configs across ark and fedora into common (Don Zickus) - common/ark: cleanup and unify the parport configs (Peter Robinson) - iommu/vt-d: enable INTEL_IDXD_SVM for both fedora and rhel (Jerry Snitselaar) - REDHAT: coresight: etm4x: Disable coresight on HPE Apollo 70 (Jeremy Linton) - configs/common/generic: disable CONFIG_SLAB_MERGE_DEFAULT (Rafael Aquini) - Remove _legacy_common_support (Justin M. Forbes) - redhat/mod-blacklist.sh: Fix floppy blacklisting (Hans de Goede) Resolves: rhbz#1613522 Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2021-04-22 22:01:48 +00:00
filter_dir $1 drivers/char/${char}
done
# Filter the ethernet drivers
for eth in ${ethdrvs}
do
filter_dir $1 drivers/net/ethernet/${eth}
done
# SCSI
for scsi in ${scsidrvs}
do
filter_dir $1 drivers/scsi/${scsi}
done
# Input
for input in ${inputdrvs}
do
filter_dir $1 drivers/input/${input}
done
# USB
for usb in ${usbdrvs}
do
filter_dir $1 drivers/usb/${usb}
done
# Filesystems
for fs in ${fsdrvs}
do
filter_dir $1 fs/${fs}
done
# Network protocols
for prot in ${netprots}
do
filter_dir $1 kernel/net/${prot}
done
# DRM
for drm in ${drmdrvs}
do
filter_dir $1 drivers/gpu/drm/${drm}
done
# Just kill sound.
filter_dir $1 kernel/sound
kernel-5.14.0-0.rc7.54.el9 * Tue Aug 24 2021 Herton R. Krzesinski <herton@redhat.com> [5.14.0-0.rc7.54] - v5.14-rc7-1-gd5ae8d7f85b7 rebase - arm64: dts: rockchip: Disable CDN DP on Pinebook Pro (Matthias Brugger) - arm64: dts: rockchip: Setup USB typec port as datarole on (Dan Johansen) - Revert "IB/rxe: Mark Soft-RoCE Transport driver as tech-preview" (Herton R. Krzesinski) - redhat/configs: Enable genet and brcmfmac wlan (Jeremy Linton) [1992902] - [scsi] megaraid_sas: re-add certain pci-ids (Tomas Henzl) - xfs: drop experimental warnings for bigtime and inobtcount (Bill O'Donnell) [1995321] - Disable liquidio driver on ark/rhel (Herton R. Krzesinski) [1993393] - More Fedora config updates (Justin M. Forbes) - Fedora config updates for 5.14 (Justin M. Forbes) - CI: Rename ARK CI pipeline type (Veronika Kabatova) - CI: Finish up c9s config (Veronika Kabatova) - CI: Update ppc64le config (Veronika Kabatova) - CI: use more templates (Veronika Kabatova) - Filter updates for aarch64 (Justin M. Forbes) - increase CONFIG_NODES_SHIFT for aarch64 (Chris von Recklinghausen) [1890304] - Revert "redhat: ark: disable CONFIG_NET_SCH_MULTIQ" (Marcelo Ricardo Leitner) [1991624] - redhat: configs: Enable CONFIG_WIRELESS_HOTKEY (Hans de Goede) - redhat/configs: Update CONFIG_NVRAM (Desnes A. Nunes do Rosario) [1988254] - common: serial: build in SERIAL_8250_LPSS for x86 (Peter Robinson) - powerpc: enable CONFIG_FUNCTION_PROFILER (Diego Domingos) [1831065] - crypto: rng - Override drivers/char/random in FIPS mode (Herbert Xu) [1984784] - random: Add hook to override device reads and getrandom(2) (Herbert Xu) [1984784] - redhat/configs: Disable Soft-RoCE driver (Kamal Heib) - filter-modules.sh: add more sound modules to filter (Jaroslav Kysela) - redhat/configs: sound configuration cleanups and updates (Jaroslav Kysela) Resolves: rhbz#1831065, rhbz#1988254, rhbz#1890304, rhbz#1993393, rhbz#1995321 Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2021-08-24 14:33:10 +00:00
filter_dir $1 kernel/drivers/soundwire
# Now go through and filter any single .ko files that might have deps on the
# things we filtered above
for mod in ${singlemods}
do
filter_ko $1 ${mod}
done
# Now process the override list to bring those modules back into core
for mod in ${overrides}
do
grep -v -e "/${mod}.ko" k-d.list > k-d.list.tmp
if [ $? -ne 0 ]
then
echo "Couldn't save ${mod}.ko Skipping."
else
grep -e "/${mod}.ko" k-d.list >> $filelist
mv k-d.list.tmp k-d.list
fi
done
# Go through our generated drivers list and remove the .ko files. We'll
# restore them later.
for mod in `cat k-d.list`
do
rm -rf $mod
done