1#!/bin/sh 2 3# 3com 4# atheros813x atheros81xx attansic_l1 attansic_l2 5# broadcom440x broadcom570x 6# dec21xxx 7# ipro100 ipro1000 8# intel22x 9# jmicron2x0 10# marvell_yukon 11# nforce 12# pcnet 13# rtl8139 rtl81xx 14# sis19x sis900 syskonnect 15# via_rhine vt612x 16 17TOPDIR=$PWD/.. 18 19pciBsdEtherDriver() 20{ 21driverPath=src/add-ons/kernel/drivers/network/ether/$1 22bsdname=$2 23headername=$3 24table=$4 25sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/if_${bsdname}.c | awk '/VENDORID_.*,$/ { printf("%s\t", $0); next } 1' | gcc -E -include $TOPDIR/$driverPath/dev/$headername/if_${headername}${5}.h - | sed -E -n "/${bsdname}_${table}\[/,/^$/p" | sed -r -e 's/.*0x([^ ,]+), 0x([^ ,]+).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "pci %s %s .... .... ...... : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | uniq 26 27} 28 29pciBsdWlanDriver() 30{ 31driverPath=src/add-ons/kernel/drivers/network/wlan/$1 32bsdname=$2 33headername=$3 34table=$4 35headersuffix=$5 36sourcesuffix=$6 37sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/if_${bsdname}${sourcesuffix}.c | awk '/VENDORID_.*,$/ { printf("%s\t", $0); next } 1' | gcc -E -include $TOPDIR/$driverPath/dev/$headername/if_${headername}${headersuffix}.h - | sed -E -n "/${bsdname}_${table}\[/,/^\};$/p" | sed -e 's/0X/0x/g' | sed -r -e 's/[^0x]*0x([^ ,]+), 0x([^ ,]+).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "pci %s %s .... .... ...... : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | sort | uniq 38 39} 40 41 42pciBsdEtherDriver 3com xl xl devs reg 43pciBsdEtherDriver atheros813x alc alc ident_table reg 44pciBsdEtherDriver atheros81xx ale ale devs reg 45pciBsdEtherDriver attansic_l1 age age devs reg 46pciBsdEtherDriver attansic_l2 ae ae devs var 47pciBsdEtherDriver broadcom440x bfe bfe devs reg 48pciBsdEtherDriver broadcom570x bge bge devs reg 49 50 51#dec21xxx 52driverPath=src/add-ons/kernel/drivers/network/ether/dec21xxx 53bsdname=dc 54headername=dc 55sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/if_dcreg.h > /tmp/if_dcreg.h 56echo "#undef DC_DEVID" >> /tmp/if_dcreg.h 57sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/if_${bsdname}.c | awk '/VENDORID_.*,$/ { printf("%s\t", $0); next } 1' | gcc -E -include /tmp/if_dcreg.h - | sed -E -n "/${bsdname}_devs\[|${bsdname}_products\[|${bsdname}_ident_table\[/,/^$/p" | sed -r -e 's/[^0x]*0x([^ ,]+).*0x([^\)]+)\).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "pci %s %s .... .... ...... : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | uniq 58rm /tmp/if_dcreg.h 59 60 61#intel22x 62driverPath=src/add-ons/kernel/drivers/network/ether/intel22x 63bsdname=igc 64headername= 65sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/igc_hw.h > /tmp/igc_hw.h 66sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/if_igc.c | gcc -E -include /tmp/igc_hw.h - | sed -E -n "/igc_vendor_info_array\[/,/PVID_END/p" | sed -r -e 's/.*0x([^ ,]+), 0x([^,]+),.*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "pci %s %s .... .... ...... : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' 67rm /tmp/igc_hw.h 68 69pciBsdEtherDriver ipro100 fxp fxp ident_table reg 70 71 72#e1000 73driverPath=src/add-ons/kernel/drivers/network/ether/ipro1000 74bsdname=e1000 75headername= 76sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/e1000_hw.h > /tmp/e1000_hw.h 77sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/if_em.c | gcc -E -include /tmp/e1000_hw.h - | sed -E -n "/em_vendor_info_array\[/,/PVID_END/p" | sed -r -e 's/.*0x([^ ,]+), 0x([^,]+),.*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "pci %s %s .... .... ...... : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' 78sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/if_em.c | gcc -E -include /tmp/e1000_hw.h - | sed -E -n "/igb_vendor_info_array\[/,/PVID_END/p" | sed -r -e 's/.*0x([^ ,]+), 0x([^,]+),.*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "pci %s %s .... .... ...... : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' 79rm /tmp/e1000_hw.h 80 81pciBsdEtherDriver jmicron2x0 jme jme devs reg 82pciBsdEtherDriver marvell_yukon msk msk products reg 83pciBsdEtherDriver nforce nfe nfe devs reg 84pciBsdEtherDriver pcnet pcn pcn devs reg 85pciBsdEtherDriver rtl81xx re rl devs reg 86pciBsdEtherDriver rtl8139 rl rl devs reg 87pciBsdEtherDriver sis19x sge sge devs reg 88pciBsdEtherDriver sis900 sis sis devs reg 89pciBsdEtherDriver syskonnect sk sk devs reg 90pciBsdEtherDriver via_rhine vr vr devs reg 91pciBsdEtherDriver vt612x vge vge devs reg 92 93#pegasus 94driverPath=src/add-ons/kernel/drivers/network/ether/pegasus 95sed -e 's/#include.*//g' $TOPDIR/$driverPath/driver.c | gcc -E -include objects/common/libs/compat/freebsd_network/usbdevs.h - | sed -E -n "/supported_devices\[/,/^$/p" | sed -e 's/0X/0x/g' | sed -r -e 's/.*0x([^ ,]+), 0x([^ \}]+).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "usb %s %s .. .. .. .. .. .. 0000 ffff : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | sort | uniq 96 97#usb_asix 98driverPath=src/add-ons/kernel/drivers/network/ether/usb_asix 99sed -e 's/#include.*//g' $TOPDIR/$driverPath/Driver.cpp | gcc -E - | sed -E -n "/gSupportedDevices\[/,/^$/p" | sed -e 's/0X/0x/g' | sed -r -e 's/[^0x]*0x([^ ,]+), 0x([^ \}]+).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "usb %s %s .. .. .. .. .. .. 0000 ffff : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | sort | uniq 100 101echo "usb .... .... .. .. .. 02 06 00 0000 ffff : CONFIG__UNKNOWN__ : src/add-ons/kernel/drivers/network/ether/usb_ecm" 102echo "usb .... .... .. .. .. e0 01 03 0000 ffff : CONFIG__UNKNOWN__ : src/add-ons/kernel/drivers/network/ether/usb_rndis" 103 104#usb_davicom 105driverPath=src/add-ons/kernel/drivers/network/ether/usb_davicom 106sed -e 's/#include.*//g' $TOPDIR/$driverPath/Driver.cpp | gcc -E - | sed -E -n "/gSupportedDevices\[/,/^$/p" | sed -e 's/0X/0x/g' | sed -r -e 's/[^0x]*0x([^ ,]+), 0x([^ \}]+).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "usb %s %s .. .. .. .. .. .. 0000 ffff : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | sort | uniq 107 108echo "pci 1050 0840 .... .... ...... : CONFIG__UNKNOWN__ : src/add-ons/kernel/drivers/network/ether/wb840" 109echo "pci 11f6 2011 .... .... ...... : CONFIG__UNKNOWN__ : src/add-ons/kernel/drivers/network/ether/wb840" 110 111 112#aironetwifi atheroswifi 113#broadcom43xx 114#iaxwifi200 idualwifi7260 115#iprowifi2100 iprowifi2200 iprowifi3945 iprowifi4965 116#marvell88w8363 marvell88w8335 117#ralinkwifi realtekwifi 118 119pciBsdWlanDriver aironetwifi an an devs reg _pci 120 121#atheroswifi 122driverPath=src/add-ons/kernel/drivers/network/wlan/atheroswifi 123bsdname=ath 124headername=ath 125table=pci_id_table 126headersuffix=_pci_devlist 127sourcesuffix=_pci 128sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/if_${bsdname}${sourcesuffix}.c | awk '/VENDORID_.*,$/ { printf("%s\t", $0); next } 1' | gcc -E -DPCI_VENDOR_ID_ATHEROS=0x168c -include $TOPDIR/$driverPath/dev/$headername/if_${headername}${headersuffix}.h - | sed -E -n "/${bsdname}_${table}\[/,/^\};$/p" | sed -e 's/0X/0x/g' | sed -r -e 's/[^0x]*0x([^ ,]+), 0x([^ \)]+).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "pci %s %s .... .... ...... : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | sort | uniq 129 130pciBsdWlanDriver broadcom43xx bwi bwi devices reg _pci 131 132#iaxwifi200 133driverPath=src/add-ons/kernel/drivers/network/wlan/iaxwifi200 134bsdname=iwx 135headername=iwx 136table=devices 137headersuffix=reg 138sourcesuffix= 139sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/pci/if_${bsdname}${sourcesuffix}.c | awk '/VENDORID_.*,$/ { printf("%s\t", $0); next } 1' | gcc -E -D__FreeBSD_version -include $TOPDIR/$driverPath/dev/pci/if_${headername}${headersuffix}.h - | sed -E -n "/${bsdname}_${table}\[/,/^iwx_probe/p" | sed -e 's/0X/0x/g' | sed -r -e 's/[^0x]*0x([^ ,]+), 0x([^ \},]+).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "pci %s %s .... .... ...... : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | sort | uniq 140 141 142#idualwifi7260 143driverPath=src/add-ons/kernel/drivers/network/wlan/idualwifi7260 144bsdname=iwm 145headername=iwm 146table=devices 147headersuffix=reg 148sourcesuffix= 149sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/pci/if_${bsdname}${sourcesuffix}.c | awk '/VENDORID_.*,$/ { printf("%s\t", $0); next } 1' | gcc -E -D__FreeBSD_version -include $TOPDIR/$driverPath/dev/pci/if_${headername}${headersuffix}.h - | sed -E -n "/${bsdname}_${table}\[/,/^$/p" | sed -e 's/0X/0x/g' | sed -r -e 's/[^0x]*0x([^ ,]+), 0x([^ \}]+).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "pci %s %s .... .... ...... : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | sort | uniq 150 151 152pciBsdWlanDriver iprowifi2100 ipw ipw ident_table reg 153pciBsdWlanDriver iprowifi2200 iwi iwi ident_table reg 154pciBsdWlanDriver iprowifi3945 wpi wpi ident_table reg 155pciBsdWlanDriver iprowifi4965 iwn iwn ident_table _devid 156pciBsdWlanDriver marvell88w8335 malo malo products hal _pci 157pciBsdWlanDriver marvell88w8363 mwl mwl pci_ids ioctl _pci 158 159 160#ralinkwifi 161driverPath=src/add-ons/kernel/drivers/network/wlan/ralinkwifi 162bsdname=ral 163table=pci_ids 164sourcesuffix=_pci 165sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/if_${bsdname}${sourcesuffix}.c | awk '/VENDORID_.*,$/ { printf("%s\t", $0); next } 1' | gcc -E - | sed -E -n "/${bsdname}_${table}\[/,/^\};$/p" | sed -e 's/0X/0x/g' | sed -r -e 's/[^0x]*0x([^ ,]+), 0x([^ ,]+).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "pci %s %s .... .... ...... : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | sort | uniq 166bsdname=ural 167table=devs 168sourcesuffix= 169sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/usb/wlan/if_${bsdname}${sourcesuffix}.c | awk '/VENDORID_.*,$/ { printf("%s\t", $0); next } 1' | gcc -E -include objects/common/libs/compat/freebsd_network/usbdevs.h - | sed -E -n "/${bsdname}_${table}\[/,/^\};$/p" | sed -e 's/0X/0x/g' | sed -r -e 's/[^0x]*0x([^ ,]+), 0x([^ \)]+).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "usb %s %s .. .. .. .. .. .. 0000 ffff : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | sort | uniq 170 171 172#realtekwifi 173driverPath=src/add-ons/kernel/drivers/network/wlan/realtekwifi 174bsdname=rtwn 175headername=rtwn 176table=pci_ident_table 177headersuffix=_pci_attach 178sourcesuffix=_pci_attach 179sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/pci/${bsdname}${sourcesuffix}.c | awk '/VENDORID_.*,$/ { printf("%s\t", $0); next } 1' | gcc -E -include $TOPDIR/$driverPath/dev/$headername/pci/${headername}${headersuffix}.h - | sed -E -n "/${bsdname}_${table}\[/,/^$/p" | sed -e 's/0X/0x/g' | sed -r -e 's/[^0x]*0x([^ ,]+), 0x([^ ,]+).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "pci %s %s .... .... ...... : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | sort | uniq 180 181table=devs 182headersuffix=_usb_attach 183sourcesuffix=_usb_attach 184sed -e 's/#include.*//g' $TOPDIR/$driverPath/dev/$bsdname/usb/${bsdname}${sourcesuffix}.c | awk '/VENDORID_.*,$/ { printf("%s\t", $0); next } 1' | gcc -E -include objects/common/libs/compat/freebsd_network/usbdevs.h -include $TOPDIR/$driverPath/dev/$headername/usb/${headername}${headersuffix}.h - | sed -E -n "/${bsdname}_${table}\[/,/^typedef/p" | sed -e 's/0X/0x/g' | sed -r -e 's/[^0x]*0x([^ ,]+), 0x([^ ,]+).*/\1\t\2/' -e '/^[[:alnum:]]/!d' | awk -F'\t' -v driverPath=$driverPath 'NF > 1 { printf "usb %s %s .. .. .. .. .. .. 0000 ffff : CONFIG__UNKNOWN__ : %s\n", $1, $2, driverPath }' | sort | uniq 185 186 187exit 0 188 189 190