1
0
forked from rpms/kernel
kernel/filter-modules.sh.rhel
Herton R. Krzesinski 4dee723bad kernel-5.14.0-24.el9
* Wed Dec 01 2021 Herton R. Krzesinski <herton@redhat.com> [5.14.0-24.el9]
- perf test: Handle fd gaps in test__dso_data_reopen (Michael Petlan) [1937209]
- perf tests vmlinux-kallsyms: Ignore hidden symbols (Michael Petlan) [1975103]
- perf script: Fix PERF_SAMPLE_WEIGHT_STRUCT support (Michael Petlan) [2009378]
- redhat/kernel.spec.template: Link perf with --export-dynamic (Michael Petlan) [2006775]
- xfs: fix I_DONTCACHE (Carlos Maiolino) [2022435]
- virtio: write back F_VERSION_1 before validate (Thomas Huth) [2008401]
- net/tls: Fix flipped sign in tls_err_abort() calls (Sabrina Dubroca) [2022006]
- net/tls: Fix flipped sign in async_wait.err assignment (Sabrina Dubroca) [2022006]
- hyper-v: Replace uuid.h with types.h (Mohammed Gamal) [2008572]
- Drivers: hv: vmbus: Remove unused code to check for subchannels (Mohammed Gamal) [2008572]
- hv: hyperv.h: Remove unused inline functions (Mohammed Gamal) [2008572]
- asm-generic/hyperv: provide cpumask_to_vpset_noself (Mohammed Gamal) [2008572]
- asm-generic/hyperv: Add missing #include of nmi.h (Mohammed Gamal) [2008572]
- x86/hyperv: Avoid erroneously sending IPI to 'self' (Mohammed Gamal) [2008572]
- x86/hyperv: remove on-stack cpumask from hv_send_ipi_mask_allbutself (Mohammed Gamal) [2008572]
- [s390] net/smc: improved fix wait on already cleared link (Mete Durlu) [1869652]
- [s390] net/smc: fix 'workqueue leaked lock' in smc_conn_abort_work (Mete Durlu) [1869652]
- [s390] net/smc: add missing error check in smc_clc_prfx_set() (Mete Durlu) [1869652]
- cifs: enable SMB_DIRECT in RHEL9 (Ronnie Sahlberg) [1965209]
- scsi: mpt3sas: Clean up some inconsistent indenting (Tomas Henzl) [1876119]
- scsi: mpt3sas: Call cpu_relax() before calling udelay() (Tomas Henzl) [1876119]
- scsi: mpt3sas: Introduce sas_ncq_prio_supported sysfs sttribute (Tomas Henzl) [1876119]
- scsi: mpt3sas: Update driver version to 39.100.00.00 (Tomas Henzl) [1876119]
- scsi: mpt3sas: Use firmware recommended queue depth (Tomas Henzl) [1876119]
- scsi: mpt3sas: Bump driver version to 38.100.00.00 (Tomas Henzl) [1876119]
- scsi: mpt3sas: Add io_uring iopoll support (Tomas Henzl) [1876119]
- serial: 8250_lpss: Extract dw8250_do_set_termios() for common use (David Arcari) [1880032]
- serial: 8250_lpss: Enable DMA on Intel Elkhart Lake (David Arcari) [1880032]
- dmaengine: dw: Convert members to u32 in platform data (David Arcari) [1880032]
- dmaengine: dw: Simplify DT property parser (David Arcari) [1880032]
- dmaengine: dw: Remove error message from DT parsing code (David Arcari) [1880032]
- dmaengine: dw: Program xBAR hardware for Elkhart Lake (David Arcari) [1880032]
- vmxnet3: switch from 'pci_' to 'dma_' API (Kamal Heib) [2003297]
- vmxnet3: update to version 6 (Kamal Heib) [2003297]
- vmxnet3: increase maximum configurable mtu to 9190 (Kamal Heib) [2003297]
- vmxnet3: set correct hash type based on rss information (Kamal Heib) [2003297]
- vmxnet3: add support for ESP IPv6 RSS (Kamal Heib) [2003297]
- vmxnet3: remove power of 2 limitation on the queues (Kamal Heib) [2003297]
- vmxnet3: add support for 32 Tx/Rx queues (Kamal Heib) [2003297]
- vmxnet3: prepare for version 6 changes (Kamal Heib) [2003297]
Resolves: rhbz#1869652, rhbz#1876119, rhbz#1880032, rhbz#1937209, rhbz#1965209, rhbz#1975103, rhbz#2003297, rhbz#2006775, rhbz#2008401, rhbz#2008572, rhbz#2009378, rhbz#2022006, rhbz#2022435

Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2021-12-01 19:08:08 +00:00

170 lines
4.4 KiB
Bash
Executable File

#! /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 cifs 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 "
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
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
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