#define NONFREE_FIRMWARE "/*(DEBLOBBED)*/"\
\
static inline int\
+is_nonfree_firmware(const char *name)\
+{\
+ return strstr(name, NONFREE_FIRMWARE) != 0;\
+}\
+\
+static inline int\
report_missing_free_firmware(const char *name, const char *what)\
{\
- printk(KERN_ERR "%s: Missing Free %s\\n", name,\
+ printk(KERN_ERR "%s: Missing Free %s (non-Free firmware loading is disabled)\\n", name,\
what ? what : "firmware");\
return -EINVAL;\
}\
maybe_reject_firmware(const struct firmware **fw,\
const char *name, struct device *device)\
{\
- if (strstr (name, NONFREE_FIRMWARE))\
+ if (is_nonfree_firmware(name))\
return reject_firmware(fw, name, device);\
else\
return request_firmware(fw, name, device);\
void (*cont)(const struct firmware *fw,\
void *context))\
{\
- if (strstr (name, NONFREE_FIRMWARE))\
+ if (is_nonfree_firmware(name))\
return reject_firmware_nowait(module, uevent, name,\
device, gfp, context, cont);\
else\
#endif /* _LINUX_LIBRE_IHEX_H */\
' include/linux/ihex.h 'added non-Free ihex firmware notification support'
+clean_sed '
+s,\(timeout = \)\(firmware_loading_timeout()\),\1is_nonfree_firmware(name) ? 1 : \2,
+' drivers/base/firmware_class.c 'shorten non-Free firmware fail-to-load timeout'
+
+
########
# Arch #
########
announce USB_IRDA - "IrDA USB dongles"
reject_firmware drivers/net/irda/irda-usb.c
clean_blob drivers/net/irda/irda-usb.c
+clean_sed '
+s,\(char stir421x_fw_name\)\[12\];,\1[16];,
+' drivers/net/irda/irda-usb.c "avoid buffer overflow with deblobbed filename"
clean_kconfig drivers/net/irda/Kconfig 'USB_IRDA'
clean_mk CONFIG_USB_IRDA drivers/net/irda/Makefile
####################
announce COMEDI - "Data acquisition support (comedi)"
-reject_firmware drivers/staging/comedi/drivers.c
+maybe_reject_firmware drivers/staging/comedi/drivers.c
clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI'
clean_mk CONFIG_COMEDI drivers/staging/comedi/Makefile
clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_NI_PCIDIO'
clean_mk CONFIG_COMEDI_NI_PCIDIO drivers/staging/comedi/drivers/Makefile
-announce COMEDI_USBDUX - "ITL USBDUX support"
-clean_blob drivers/staging/comedi/drivers/usbdux.c
-clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_USBDUX'
-clean_mk CONFIG_COMEDI_USBDUX drivers/staging/comedi/drivers/Makefile
-
-announce COMEDI_USBDUXFAST - "ITL USB-DUXfast support"
-clean_blob drivers/staging/comedi/drivers/usbduxfast.c
-clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_USBDUXFAST'
-clean_mk CONFIG_COMEDI_USBDUXFAST drivers/staging/comedi/drivers/Makefile
-
-announce COMEDI_USBDUXSIGMA - "ITL USB-DUXsigma support"
-clean_blob drivers/staging/comedi/drivers/usbduxsigma.c
-clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_USBDUXSIGMA'
-clean_mk CONFIG_COMEDI_USBDUXSIGMA drivers/staging/comedi/drivers/Makefile
-
#######
# MMC #
#! /bin/sh
-# deblob-check version 2014-11-25
+# deblob-check version 2014-12-07
# Inspired in gNewSense's find-firmware script.
# Written by Alexandre Oliva <lxoliva@fsfla.org>
blobname '3826\.arm' 'drivers/\(net/wireless/p54/p54spi\|staging/stlc45xx/stlc45xx\)\.c'
defsnc 'static[ ]unsigned[ ]char[ ]p54spi_eeprom\[\][ ]=' drivers/net/wireless/p54/p54spi_eeprom.h
blobname '\(comedi[/]\)\?jr3pci\.idm\(["]\.[\n][ ][*][/]\)\?' drivers/staging/comedi/drivers/jr3_pci.c
- blobname 'usbdux\(fast\)\?_firmware\.\(hex\|bin\)' 'drivers/staging/comedi/drivers/usbdux\(fast\)\?\.c'
+ accept '#define[ ]USBDUX_FIRMWARE[ \t]*["]usbdux_firmware\.bin["]' drivers/staging/comedi/drivers/usbdux.c
+ accept 'MODULE_FIRMWARE[(]USBDUX_FIRMWARE[)][;]' drivers/staging/comedi/drivers/usbdux.c
+ accept '#define[ ]FIRMWARE[ \t]*["]usbduxfast_firmware\.bin["]' drivers/staging/comedi/drivers/usbduxfast.c
+ accept 'MODULE_DESCRIPTION[(]["]USB-DUXfast[^"]*["][)][;][\n]MODULE_LICENSE[(]["]GPL["][)][;][\n]MODULE_FIRMWARE[(]FIRMWARE[)][;]' drivers/staging/comedi/drivers/usbduxfast.c
blobname 'RT30xxEEPROM\.bin' drivers/staging/rt3070/common/eeprom.c
defsnc 'static[ ]const[ ]u8[ ]default_cal_\(channels\|rssi\)\[\][ ]=' drivers/staging/stlc45xx/stlc45xx.c
accept '[ ][ ]stlc45xx_error[(]["]request_firmware[(][)][ ]failed' drivers/staging/stlc45xx/stlc45xx.c
blobname '%s[/]bdata\.%s\.bin' drivers/net/wireless/ath/ath6kl/init.c
blobna 'Used[ ][(]for[ ]now[)][^*]*\([*]\+[^/*][^*]*\)*[*]*["]bdata\.bin["][^*]*\([*]\+[^/*][^*]*\)*[*]\+[/]' drivers/net/wireless/ath/ath6kl/init.c
blobname 'mrvl[/]pcie8766_uapsta\.bin' 'drivers/net/wireless/mwifiex/pcie\.[ch]'
- blobname 'usbduxsigma_firmware\.bin' drivers/staging/comedi/drivers/usbduxsigma.c
+ accept '#define[ ]FIRMWARE[ \t]*["]usbduxsigma_firmware\.bin["]' drivers/staging/comedi/drivers/usbduxsigma.c
+ accept 'MODULE_DESCRIPTION[(]["]Stirling[/]ITL[ ]USB-DUX[ ]SIGMA[^"]*["][)][;][\n]MODULE_LICENSE[(]["]GPL["][)][;][\n]MODULE_FIRMWARE[(]FIRMWARE[)][;]' drivers/staging/comedi/drivers/usbduxsigma.c
blobname 'as102_data[12]_[sd]t\.hex' drivers/staging/media/as102/as102_fw.c
blob 'u8[ ]Rtl8192PciEFw\(Boot\|Main\|Data\)Array\[\(Boot\|Main\|Data\)ArrayLengthPciE\][ ]=[ ][{][^}]*[}][;]' drivers/staging/rtl8192e/r8192E_hwimg.c
blobna '\([&]\|sizeof[(]\)Rtl8192PciEFw\(Boot\|Main\|Data\)Array\(\[0\]\|[)]\)\(,[ \n]*\([&]\|sizeof[(]\)Rtl8192PciEFw\(Boot\|Main\|Data\)Array\(\[0\]\|[)]\)\)*' drivers/staging/rtl8192e/r8192E_firmware.c