summaryrefslogtreecommitdiffstats
path: root/filter-modules.sh.fedora
blob: 436dcc50a037a9f8562a8eedcc4bda4718ce9849 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#! /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 fpga infiniband isdn leds media memstick mfd mmc mtd nfc ntb pcmcia platform power ssb soundwire 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 mellanox neterion nvidia oki-semi packetengines qlogic rdc renesas sfc silan sis smsc stmicro sun tehuti ti wiznet xircom"

inputdrvs="gameport tablet touchscreen"

scsidrvs="aacraid advansys aic7xxx aic94xx be2iscsi bfa bnx2i bnx2fc csiostor cxgbi esas2r fcoe fnic isci libsas lpfc megaraid mpt2sas mpt3sas mvsas pm8001 qla2xxx qla4xxx sym53c8xx_2 ufs qedf wd719x"

usbdrvs="atm image misc serial wusbcore"

fsdrvs="affs befs coda cramfs dlm ecryptfs hfs hfsplus jfs jffs2 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 bridge gma500 i2c i915 mgag200 nouveau panel radeon"

iiodrvs="accel adc afe common dac gyro health humidity light magnetometer multiplexer orientation potentiometer potentiostat pressure temperature"

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 target_core_user sbp_target cxgbit iw_cxgb3 iw_cxgb4 cxgb3i cxgb3i cxgb3i_ddp cxgb4i chcr chtls parport_serial regmap-sdw 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/${input}
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

# 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
UBURN_EEPROM_CS_0 0x0 #define AUBURN_EEPROM_CS_1 0x2 #define AUBURN_EEPROM_CLK_RISE 0x1 #define AUBURN_EEPROM_CLK_FALL 0x0 /**/ /* EEPROM format */ /**/ struct bios_params { uint16_t SpinUpDelay:1; uint16_t BIOSDisable:1; uint16_t MMAPEnable:1; uint16_t BootEnable:1; uint16_t Reserved0:12; uint8_t bootID0:7; uint8_t bootID0Valid:1; uint8_t bootLUN0[8]; uint8_t bootID1:7; uint8_t bootID1Valid:1; uint8_t bootLUN1[8]; uint16_t MaxLunsPerTarget; uint8_t Reserved1[10]; }; struct eeprom_port_cfg { /* MTU MAC 0 */ u16 etherMtu_mac; /* Flow Control MAC 0 */ u16 pauseThreshold_mac; u16 resumeThreshold_mac; u16 reserved[13]; }; struct eeprom_function_cfg { u8 reserved[30]; /* MAC ADDR */ u8 macAddress[6]; u8 macAddressSecondary[6]; u16 subsysVendorId; u16 subsysDeviceId; }; struct eeprom_data { union { struct { /* isp4010 */ u8 asic_id[4]; /* x00 */ u8 version; /* x04 */ u8 reserved; /* x05 */ u16 board_id; /* x06 */ #define EEPROM_BOARDID_ELDORADO 1 #define EEPROM_BOARDID_PLACER 2 #define EEPROM_SERIAL_NUM_SIZE 16 u8 serial_number[EEPROM_SERIAL_NUM_SIZE]; /* x08 */ /* ExtHwConfig: */ /* Offset = 24bytes * * | SSRAM Size| |ST|PD|SDRAM SZ| W| B| SP | | * |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0| * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ u16 ext_hw_conf; /* x18 */ u8 mac0[6]; /* x1A */ u8 mac1[6]; /* x20 */ u8 mac2[6]; /* x26 */ u8 mac3[6]; /* x2C */ u16 etherMtu; /* x32 */ u16 macConfig; /* x34 */ #define MAC_CONFIG_ENABLE_ANEG 0x0001 #define MAC_CONFIG_ENABLE_PAUSE 0x0002 u16 phyConfig; /* x36 */ #define PHY_CONFIG_PHY_ADDR_MASK 0x1f #define PHY_CONFIG_ENABLE_FW_MANAGEMENT_MASK 0x20 u16 reserved_56; /* x38 */ #define EEPROM_UNUSED_1_SIZE 2 u8 unused_1[EEPROM_UNUSED_1_SIZE]; /* x3A */ u16 bufletSize; /* x3C */ u16 bufletCount; /* x3E */ u16 bufletPauseThreshold; /* x40 */ u16 tcpWindowThreshold50; /* x42 */ u16 tcpWindowThreshold25; /* x44 */ u16 tcpWindowThreshold0; /* x46 */ u16 ipHashTableBaseHi; /* x48 */ u16 ipHashTableBaseLo; /* x4A */ u16 ipHashTableSize; /* x4C */ u16 tcpHashTableBaseHi; /* x4E */ u16 tcpHashTableBaseLo; /* x50 */ u16 tcpHashTableSize; /* x52 */ u16 ncbTableBaseHi; /* x54 */ u16 ncbTableBaseLo; /* x56 */ u16 ncbTableSize; /* x58 */ u16 drbTableBaseHi; /* x5A */ u16 drbTableBaseLo; /* x5C */ u16 drbTableSize; /* x5E */ #define EEPROM_UNUSED_2_SIZE 4 u8 unused_2[EEPROM_UNUSED_2_SIZE]; /* x60 */ u16 ipReassemblyTimeout; /* x64 */ u16 tcpMaxWindowSizeHi; /* x66 */ u16 tcpMaxWindowSizeLo; /* x68 */ u32 net_ip_addr0; /* x6A Added for TOE * functionality. */ u32 net_ip_addr1; /* x6E */ u32 scsi_ip_addr0; /* x72 */ u32 scsi_ip_addr1; /* x76 */ #define EEPROM_UNUSED_3_SIZE 128 /* changed from 144 to account * for ip addresses */ u8 unused_3[EEPROM_UNUSED_3_SIZE]; /* x7A */ u16 subsysVendorId_f0; /* xFA */ u16 subsysDeviceId_f0; /* xFC */ /* Address = 0x7F */ #define FM93C56A_SIGNATURE 0x9356 #define FM93C66A_SIGNATURE 0x9366 u16 signature; /* xFE */ #define EEPROM_UNUSED_4_SIZE 250 u8 unused_4[EEPROM_UNUSED_4_SIZE]; /* x100 */ u16 subsysVendorId_f1; /* x1FA */ u16 subsysDeviceId_f1; /* x1FC */ u16 checksum; /* x1FE */ } __attribute__ ((packed)) isp4010; struct { /* isp4022 */ u8 asicId[4]; /* x00 */ u8 version; /* x04 */ u8 reserved_5; /* x05 */ u16 boardId; /* x06 */ u8 boardIdStr[16]; /* x08 */ u8 serialNumber[16]; /* x18 */ /* External Hardware Configuration */ u16 ext_hw_conf; /* x28 */ /* MAC 0 CONFIGURATION */ struct eeprom_port_cfg macCfg_port0; /* x2A */ /* MAC 1 CONFIGURATION */ struct eeprom_port_cfg macCfg_port1; /* x4A */ /* DDR SDRAM Configuration */ u16 bufletSize; /* x6A */ u16 bufletCount; /* x6C */ u16 tcpWindowThreshold50; /* x6E */ u16 tcpWindowThreshold25; /* x70 */ u16 tcpWindowThreshold0; /* x72 */ u16 ipHashTableBaseHi; /* x74 */ u16 ipHashTableBaseLo; /* x76 */ u16 ipHashTableSize; /* x78 */ u16 tcpHashTableBaseHi; /* x7A */ u16 tcpHashTableBaseLo; /* x7C */ u16 tcpHashTableSize; /* x7E */ u16 ncbTableBaseHi; /* x80 */ u16 ncbTableBaseLo; /* x82 */ u16 ncbTableSize; /* x84 */ u16 drbTableBaseHi; /* x86 */ u16 drbTableBaseLo; /* x88 */ u16 drbTableSize; /* x8A */ u16 reserved_142[4]; /* x8C */ /* TCP/IP Parameters */ u16 ipReassemblyTimeout; /* x94 */ u16 tcpMaxWindowSize; /* x96 */ u16 ipSecurity; /* x98 */ u8 reserved_156[294]; /* x9A */ u16 qDebug[8]; /* QLOGIC USE ONLY x1C0 */ struct eeprom_function_cfg funcCfg_fn0; /* x1D0 */ u16 reserved_510; /* x1FE */ /* Address = 512 */ u8 oemSpace[432]; /* x200 */ struct bios_params sBIOSParams_fn1; /* x3B0 */ struct eeprom_function_cfg funcCfg_fn1; /* x3D0 */ u16 reserved_1022; /* x3FE */ /* Address = 1024 */ u8 reserved_1024[464]; /* x400 */ struct eeprom_function_cfg funcCfg_fn2; /* x5D0 */ u16 reserved_1534; /* x5FE */ /* Address = 1536 */ u8 reserved_1536[432]; /* x600 */ struct bios_params sBIOSParams_fn3; /* x7B0 */ struct eeprom_function_cfg funcCfg_fn3; /* x7D0 */ u16 checksum; /* x7FE */ } __attribute__ ((packed)) isp4022; }; }; #endif /* _QL4XNVRM_H_ */