reject_firmware () {
#$1 = file
clean_sed '
-s,request\(_ihex\)\?_firmware\(_nowait\)\?,reject_firmware\2,
+s,request\(_ihex\)\?_firmware\(_nowait\)\?,reject_firmware\2,g
' "$1" 'disabled non-Free firmware-loading machinery'
}
return -EINVAL;\
}\
static inline int\
-reject_firmware(const struct firmware **fw,
+reject_firmware(const struct firmware **fw,\
const char *name, struct device *device)\
{\
- struct firmware *xfw = NULL;\
+ const struct firmware *xfw = NULL;\
int retval;\
- report_missing_free_firmware(device->name, NULL);\
+ report_missing_free_firmware(dev_name(device), NULL);\
retval = request_firmware(&xfw, NONFREE_FIRMWARE, device);\
if (!retval)\
release_firmware(xfw);\
void *context))\
{\
int retval;\
- report_missing_free_firmware(device->name, NULL);\
+ report_missing_free_firmware(dev_name(device), NULL);\
retval = request_firmware_nowait(module, uevent, NONFREE_FIRMWARE,\
device, NULL,\
discard_rejected_firmware);\
return -EINVAL;
}
}' drivers/gpu/drm/radeon/radeon_cp.c 'report missing Free microcode'
+clean_blob drivers/gpu/drm/radeon/radeon_cp.c
clean_blob drivers/gpu/drm/radeon/radeon_microcode.h
clean_kconfig drivers/gpu/drm/Kconfig 'DRM_RADEON'
clean_mk CONFIG_DRM_RADEON drivers/gpu/drm/Makefile
drivers/media/video/em28xx/em28xx-cards.c \
drivers/media/dvb/dvb-usb/dib0700_devices.c \
drivers/media/dvb/dvb-usb/cxusb.c
-clean_blob drivers/media/common/tuners/tuner-xc2028.h
reject_firmware drivers/media/common/tuners/tuner-xc2028.c
clean_kconfig drivers/media/common/tuners/Kconfig 'MEDIA_TUNER_XC2028'
clean_mk CONFIG_MEDIA_TUNER_XC2028 drivers/media/common/tuners/Makefile
announce MEDIA_TUNER_XC5000 - "Xceive XC5000 silicon tuner"
undefault_firmware 'XC5000' drivers/media/common/tuners/xc5000.c
reject_firmware drivers/media/common/tuners/xc5000.c
-clean_blob drivers/media/common/tuners/xc5000.c
clean_kconfig drivers/media/common/tuners/Kconfig 'MEDIA_TUNER_XC5000'
clean_mk CONFIG_MEDIA_TUNER_XC5000 drivers/media/common/tuners/Makefile
announce DVB_USB - "Support for various USB DVB devices"
reject_firmware drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
-clean_blob drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
clean_kconfig drivers/media/dvb/dvb-usb/Kconfig 'DVB_USB'
clean_mk CONFIG_DVB_USB drivers/media/dvb/dvb-usb/Makefile
undefault_firmware 'BCM3510' drivers/media/dvb/frontends/bcm3510.c
reject_firmware drivers/media/dvb/frontends/bcm3510.c
reject_firmware drivers/media/dvb/frontends/bcm3510.h
+clean_sed '
+/You.ll need a firmware/,/dvb-fe-bcm/d;
+' drivers/media/dvb/frontends/bcm3510.c \
+ "removed non-Free firmware notes"
clean_kconfig drivers/media/dvb/frontends/Kconfig 'DVB_BCM3510'
clean_mk CONFIG_DVB_BCM3510 drivers/media/dvb/frontends/Makefile
announce DVB_CX24116 - "Conexant CX24116 based"
undefault_firmware CX24116 drivers/media/dvb/frontends/cx24116.c
reject_firmware drivers/media/dvb/frontends/cx24116.c
-clean_blob drivers/media/dvb/frontends/cx24116.c
clean_kconfig drivers/media/dvb/frontends/Kconfig 'DVB_CX24116'
clean_mk CONFIG_DVB_CX24116 drivers/media/dvb/frontends/Makefile
' drivers/media/dvb/ttpci/av7110_hw.c 'adjust bootcode loader'
clean_blob drivers/media/dvb/ttpci/av7110_hw.c
reject_firmware drivers/media/dvb/ttpci/av7110.c
-reject_firmware drivers/media/dvb/ttpci/av7110.c
clean_blob drivers/media/dvb/ttpci/av7110.c
clean_sed '
/^config DVB_AV7110_FIRMWARE_FILE$/, /^config / {
announce DVB_TTUSB_BUDGET - "Technotrend/Hauppauge Nova-USB devices"
drop_fw_file firmware/ttusb-budget/dspbootcode.bin.ihex firmware/ttusb-budget/dspbootcode.bin
reject_firmware drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
-reject_firmware drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
clean_blob drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
clean_kconfig drivers/media/dvb/ttusb-budget/Kconfig 'DVB_TTUSB_BUDGET'
clean_mk CONFIG_DVB_TTUSB_BUDGET drivers/media/dvb/ttusb-budget/Makefile
announce VIDEO_BT848 - "BT848 Video For Linux"
reject_firmware drivers/media/video/bt8xx/bttv-cards.c
-clean_blob drivers/media/video/bt8xx/bttv-cards.c
clean_kconfig drivers/media/video/bt8xx/Kconfig 'VIDEO_BT848'
clean_mk CONFIG_VIDEO_BT848 drivers/media/video/bt8xx/Makefile
reject_firmware drivers/media/video/cx18/cx18-av-firmware.c
reject_firmware drivers/media/video/cx18/cx18-firmware.c
clean_blob drivers/media/video/cx18/cx18-av-firmware.c
-clean_blob drivers/media/video/cx18/cx18-firmware.c
clean_kconfig drivers/media/video/cx18/Kconfig 'VIDEO_CX18'
clean_mk CONFIG_VIDEO_CX18 drivers/media/video/cx18/Makefile
announce VIDEO_SAA7134_DVB - "DVB/ATSC Support for saa7134 based TV cards"
reject_firmware drivers/media/video/saa7134/saa7134-dvb.c
-clean_blob drivers/media/video/saa7134/saa7134-dvb.c
clean_kconfig drivers/media/video/saa7134/Kconfig 'VIDEO_SAA7134_DVB'
clean_mk CONFIG_VIDEO_SAA7134_DVB drivers/media/video/saa7134/Makefile
clean_mk CONFIG_CASSINI drivers/net/Makefile
announce CHELSIO_T3 - "Chelsio AEL 2005 support"
+reject_firmware drivers/net/cxgb3/cxgb3_main.c
clean_sed '
/^static int ael2005_setup_\(sr\|twinax\)_edc([^;]*$/,/^}$/{
/for.*ARRAY_SIZE(\(sr\|twinax\)_edc)/i\
CH_ERR(phy->adapter, "Missing Free firwmare\\n");\
err = -EINVAL;
}' drivers/net/cxgb3/ael1002.c 'report missing Free firmware'
+clean_blob drivers/net/cxgb3/cxgb3_main.c
clean_blob drivers/net/cxgb3/ael1002.c
clean_kconfig drivers/net/Kconfig 'CHELSIO_T3'
clean_mk CONFIG_CHELSIO_T3 drivers/net/cxgb3/Makefile
announce SPIDER_NET - "Spider Gigabit Ethernet driver"
reject_firmware drivers/net/spider_net.c
+clean_sed 's,spider_fw\.bin,DEBLOBBED.bin,g' \
+ drivers/net/spider_net.c 'removed non-Free firmware notes'
clean_blob drivers/net/spider_net.h
clean_kconfig drivers/net/Kconfig 'SPIDER_NET'
clean_mk CONFIG_SPIDER_NET drivers/net/Makefile
# pcmcia
announce PCMCIA_SMC91C92 - "SMC 91Cxx PCMCIA"
-clean_blob drivers/net/pcmcia/ositech.h
clean_sed '
/^\(static int \)\?osi_setup([^;]*$/,/^}$/{
s/^\(.*\)[/][*] Download.*firmware [*][/]/\1printk(KERN_ERR "%s: Missing Free firmware\\n", dev->name);\n\1rc = -EINVAL;\n\1goto free_cfg_mem;\n&/
/^\(static int \)\?smc91c92_resume([^;]*$/,/^}$/{
s/^\(.*\)[/][*] Download.*firmware [*][/]/\1printk(KERN_ERR "%s: Missing Free firmware\\n", dev->name);\n\1return -EINVAL;\n&/
}' drivers/net/pcmcia/smc91c92_cs.c 'report another missing Free firmware'
+clean_blob drivers/net/pcmcia/ositech.h
+clean_blob drivers/net/pcmcia/smc91c92_cs.c
clean_kconfig drivers/net/pcmcia/Kconfig 'PCMCIA_SMC91C92'
clean_mk CONFIG_PCMCIA_SMC91C92 drivers/net/pcmcia/Makefile
announce PCCARD - "PCCard (PCMCIA/CardBus) support"
reject_firmware drivers/pcmcia/ds.c
-clean_blob drivers/pcmcia/ds.c
clean_kconfig drivers/pcmcia/Kconfig 'PCCARD'
clean_mk CONFIG_PCCARD drivers/pcmcia/Makefile
announce IWLAGN - "Intel Wireless WiFi Next Gen AGN"
reject_firmware drivers/net/wireless/iwlwifi/iwl-agn.c
-clean_blob drivers/net/wireless/iwlwifi/iwl-agn.c
clean_kconfig drivers/net/wireless/iwlwifi/Kconfig 'IWLAGN'
clean_mk CONFIG_IWLAGN drivers/net/wireless/iwlwifi/Makefile
announce P54_USB - "Prism54 USB support"
reject_firmware drivers/net/wireless/p54/p54usb.c
clean_blob drivers/net/wireless/p54/p54usb.c
+clean_blob drivers/net/wireless/p54/p54usb.h
clean_kconfig drivers/net/wireless/p54/Kconfig 'P54_USB'
clean_mk CONFIG_P54_USB drivers/net/wireless/p54/Makefile
announce RT2X00_LIB_FIRMWARE - "Ralink driver firmware support"
reject_firmware drivers/net/wireless/rt2x00/rt2x00firmware.c
-clean_blob drivers/net/wireless/rt2x00/rt2x00firmware.c
clean_kconfig drivers/net/wireless/rt2x00/Kconfig 'RT2X00_LIB_FIRMWARE'
clean_mk CONFIG_RT2X00_LIB_FIRMWARE drivers/net/wireless/rt2x00/Makefile
clean_blob sound/oss/msnd_classic.h
clean_kconfig sound/oss/Kconfig 'SOUND_MSNDCLAS'
clean_sed '
-/^config MSNDCLAS_\(INIT\|PERM\)_FILE$/, /^config / {
- /^ default.*msnd\(init\|perm\)\.bin/ s,".*","/*(DEBLOBBED)*/",;
+/^config MSNDCLAS_INIT_FILE$/, /^config / {
+ /^ default.*msndinit\.bin/ s,".*","/*(DEBLOBBED)*/",;
+}
+/^config MSNDCLAS_PERM_FILE$/, /^config / {
+ /^ default.*msndperm\.bin/ s,".*","/*(DEBLOBBED)*/",;
}' sound/oss/Kconfig 'removed default firmware'
clean_mk CONFIG_SOUND_MSNDCLAS sound/oss/Makefile
clean_blob sound/oss/msnd_pinnacle.h
clean_kconfig sound/oss/Kconfig 'SOUND_MSNDPIN'
clean_sed '
-/^config MSNDPIN_\(INIT\|PERM\)_FILE$/, /^config / {
- /^ default.*pndsp\(ini\|erm\)\.bin/ s,".*","/*(DEBLOBBED)*/",;
+/^config MSNDPIN_INIT_FILE$/, /^config / {
+ /^ default.*pndspini\.bin/ s,".*","/*(DEBLOBBED)*/",;
+}
+/^config MSNDPIN_PERM_FILE$/, /^config / {
+ /^ default.*pndsperm\.bin/ s,".*","/*(DEBLOBBED)*/",;
}' sound/oss/Kconfig 'removed default firmware'
clean_mk CONFIG_SOUND_MSNDPIN sound/oss/Makefile
accept '[/][*][*][\n] [*] request_firmware_nowait: asynchronous version[^{]*[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}[\n]' drivers/base/firmware_class.c
accept 'EXPORT_SYMBOL(request_firmware\(_nowait\)\?);' drivers/base/firmware_class.c
accept 'int request_firmware\(_nowait\)\?([^;]*);' include/linux/firmware.h
- accept 'static inline int request_firmware\(_nowait\)\?([^{]*)[\n]{[\n][\t]return -EINVAL;[\n]}[\n]' include/linux/firmware.h
- accept 'static inline int \(maybe_\)\?reject_firmware\(_nowait\)\?([^{;]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}[\n]' include/linux/firmware.h
+ accept 'static inline int request_firmware\(_nowait\)\?([^{]*)[\n]{[\n][\t]return -EINVAL;[\n]}' include/linux/firmware.h
+ accept 'static inline int[\n]\(maybe_\)\?reject_firmware\(_nowait\)\?([^{;]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}' include/linux/firmware.h
accept 'static inline int request_ihex_firmware\?([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}[\n]' include/linux/ihex.h
ocomment '[/][*] Optional firmware\([^\n]*[\n] [*]\)*[^\n]* MODULE_FIRMWARE()'
blob ' sprintf([^;]*fore200[^;]*FW_EXT[^;]*);' drivers/atm/fore200e.c
blobname '\(pc\|sb\)a200e\(_ecd\)\?\.bin[12]?' drivers/atm/fore200e.c
- blobna 'The supplied firmware images.*fore.*Rebuild and reinstall[^.]*\.' Documentation/networking/fore200e.txt
+ blobna 'The supplied firmware images.*fore.*Rebuild and re-install[^.]*\.' Documentation/networking/fore200e.txt
blobname 'intelliport2\.bin' drivers/char/ip2/ip2main.c
blobna 'static u16 \(sr\|twinax\)_edc\[\] = {[^;]*};' drivers/net/cxgb3/ael1002.c
blobna 'for ([^\n]*ARRAY_SIZE(\(sr\|twinax\)_edc)[^\n]*)[\n][^;]*mdio_write[^;]*;' drivers/net/cxgb3/ael1002.c
+ blobname 't3fw\(_protocol_sram\)\?-\(%d\|[0-9]*\)\.\(%d\|[0-9]*\)\.\(%d\|[0-9]*\)\.bin' drivers/net/cxgb3/cxgb3_main.c
blob '\([/][*][*]*[*][/][\n]*\)*\([/][*]\([^/]\|[^*/][/]*\)*Micro code\([^/]\|[^*/][/]*\)*8086:\([^/]\|[^*/][/]*\)*[*][/]\([\n]*[/][*]\([^/]\|[^*/][/]*\)*[*][/]\)*\|#define *D10\(1M\(_B\)\?\|1S\|2_E\)_\(CPUSAVER_\(TIMER\|BUNDLE\|MIN_SIZE\)_DWORD\|RCVBUNDLE_UCODE\)[ ]\(\\[\n]\|[^\n]\)*\)\([\n]*[/][*]\([^/]\|[^*/][/]*\|[*][/][\n]*[/][*]\)*Micro code\([^/]\|[^*/][/]*\)*8086:\([^/]\|[^*/][/]*\)*[*][/]\([\n]*[/][*]\([^/]\|[^*/][/]*\)*[*][/]\)*\|[\n][\n]*#define *D10\(1M\(_B\)\?\|1S\|2_E\)_\(CPUSAVER_\(TIMER\|BUNDLE\|MIN_SIZE\)_DWORD\|RCVBUNDLE_UCODE\)[ ]\(\\[\n]\|[^\n]\)*\)*' drivers/net/e100.c
blobna '\([/][*]\([^/]\|[*][/]*\)*[*][/][\n]* \)\(ucode\[opts->\(timer\|bundle\|min_size\)_dword\] .= [^;]*;[\n][\n]* \)*[^}]*UCODE_SIZE[^}]*cb_ucode[^}]*return;[\n] }' drivers/net/e100.c
accept 'int xc_request_firmware(struct xc *[*] *x);' arch/arm/mach-netx/include/mach/xc.h
accept 'int xc_request_firmware(struct xc *[*] *x)[\n]{' arch/arm/mach-netx/xc.c
+ accept ' dev_err(x->dev, "request_firmware failed\\n");' arch/arm/mach-netx/xc.c
accept 'EXPORT_SYMBOL(xc_request_firmware);' arch/arm/mach-netx/xc.c
accept ' if (xc_request_firmware(priv->xc)) {' drivers/net/netx-eth.c
blobname 'isi\(6\(08\|\(08\|16\)em\)\|46\(08\|16\)\)\.bin' drivers/char/isicom.c
- blobname 'c\(218t\|p204\|320t\)unx\.code' drivers/char/moxa.c
+ blobname 'c\(218t\|p204\|320t\)unx\.cod' drivers/char/moxa.c
accept ' printk(KERN_ERR "MOXA: request_firmware failed' drivers/char/moxa.c
# This driver enables the user to update the non-Free BIOS, but it
blobname 'lbtf_usb\.bin' drivers/net/wireless/libertas_tf/if_usb.c
blobname 'isl38\(86\|87usb_bare\|90usb\)' 'drivers/net/wireless/p54/p54\(pci\.c\|usb\.[ch]\)'
+ blob '[/][*] for isl3886 register definitions\([^/]\|[^*][/]*\)*[*][/]' drivers/net/wireless/p54/p54usb.h
blobna 'If you enable this\([^\n]\|[\n][ ]*[^ \n]\)*isl3890\([^\n]\|[\n][ ]*[^ \n]\)*' drivers/net/wireless/Kconfig
blobname 'isl38\(77\|86\|90\)' drivers/net/wireless/prism54/islpci_dev.c
fi
sedmain="
+/^$/N;
/^[\n]\?;[/][*]\\(end .*\\)\\?[*][/];$/{
$4;
d;
}
/^;[/][*]begin /!{
: internal_error
+ $v:internal_error
i\\
Internal error at
p;
H;
g;
$4
-s/^\(;[/][*]begin [^\n]*[\n]\)*//;
-s/\\($bol;[/][*]\\(end [^\n]*\\)\\?[*][/];\\)*$//;
+$v:read all
+s/^\\(;[/][*]begin [^\n]*[\\n]\\)*//;
+s/\\($bol[\n]\?;[/][*]\\(end [^\\n]*\\)\\?[*][/];\\)*$//;
$v:???!blobfast
/$blobfast/!b clean;
$check_false_positives