# Identify the tarball.
clean_sed "s,^EXTRAVERSION.*,&-libre$extra," Makefile
-# Add reject_firmware and check_reject_firmware
+# Add reject_firmware and maybe_reject_firmware
cat >> include/linux/firwmare.h <<\EOF
#ifndef _LINUX_LIBRE_FIRMWARE_H
#define _LINUX_LIBRE_FIRMWARE_H
#########################
+announce DVB non-Free firmware scripts and documentation
+clean_blob Documentation/dvb/get_dvb_firmware
+clean_blob Documentation/dvb/avermedia.txt
+clean_blob Documentation/dvb/opera-firmware.txt
+clean_blob Documentation/dvb/ttusb-dec.txt
+
announce DVB_USB_AF9005 - Afatech AF9005 DVB-T USB1.1
clean_file drivers/media/dvb/dvb-usb/af9005-script.h
clean_sed 's,^ deb_info("load init script\\n");$, {\n err("Missing Free init script\\n");\n return scriptlen = ret = -EINVAL;\n ,' drivers/media/dvb/dvb-usb/af9005-fe.c
clean_kconfig drivers/media/dvb/dvb-usb/Kconfig 'DVB_USB_AF9005'
clean_mk CONFIG_DVB_USB_AF9005 drivers/media/dvb/dvb-usb/Makefile
-# dvb/frontends
-
-# DVB_TDA10021 - Philips TDA10021 based
-clean_blob drivers/media/dvb/frontends/tda10021.c
-clean_kconfig drivers/media/dvb/frontends/Kconfig 'DVB_TDA10021'
-clean_mk CONFIG_DVB_TDA10021 drivers/media/dvb/frontends/Makefile
-
-# DVB_TDA8083 - Philips TDA8083 based
-clean_blob drivers/media/dvb/frontends/tda8083.c
-clean_kconfig drivers/media/dvb/frontends/Kconfig 'DVB_TDA8083'
-clean_mk CONFIG_DVB_TDA8083 drivers/media/dvb/frontends/Makefile
-
-# DVB_VES1820 - VLSI VES1820 based
-clean_blob drivers/media/dvb/frontends/ves1820.c
-clean_kconfig drivers/media/dvb/frontends/Kconfig 'DVB_VES1820'
-clean_mk CONFIG_DVB_VES1820 drivers/media/dvb/frontends/Makefile
-
-# DVB_VES1X93 - VLSI VES1893 or VES1993 based
-clean_blob drivers/media/dvb/frontends/ves1x93.c
-clean_kconfig drivers/media/dvb/frontends/Kconfig 'DVB_VES1X93'
-clean_mk CONFIG_DVB_VES1X93 drivers/media/dvb/frontends/Makefile
-
# dvb/ttpci
-# DVB_AV7110 - AV7110 cards
+announce DVB_AV7110 - AV7110 cards
+# The bootcode is actually Free Software under GPLv2, but since it's
+# being distributed without source code, we're taking it out for now.
+clean_sed 's,^ \/\* boot \*\/$, printk(KERN_ERR "dvb-ttpci: av7110_bootarm(): Missing Free bootcode\\n");\n return -EINVAL;\n\n&,' drivers/media/dvb/ttpci/av7110_hw.c
+clean_sed 's,mwdebi(.*bootcode.*$,/* & */,' drivers/media/dvb/ttpci/av7110_hw.c
clean_blob drivers/media/dvb/ttpci/av7110_hw.c
+clean_sed '/^static int get_firmware(/,/^}$/s, request_firmware(, reject_firmware(,' drivers/media/dvb/ttpci/av7110.c
+clean_sed '/^static int alps_tdlb7_request_firmware(/,/^}$/s, request_firmware(, maybe_reject_firmware(,' drivers/media/dvb/ttpci/av7110.c
clean_blob drivers/media/dvb/ttpci/av7110.c
clean_kconfig drivers/media/dvb/ttpci/Kconfig 'DVB_AV7110'
clean_mk CONFIG_DVB_AV7110 drivers/media/dvb/ttpci/Makefile
#! /bin/sh
-# deblob-check version 2009-02-07
+# deblob-check version 2009-02-09
# Inspired in gNewSense's find-firmware script.
# Written by Alexandre Oliva <lxoliva@fsfla.org>
defsnc ' static const u32 test_pat\[4\]\[6\] =' drivers/net/tg3.c
accept " }\\(,\\? mem_tbl_5\\(70x\\|705\\|755\\|906\\)\\[\\] = {$sepx$blobpat*$sepx}\\)*;" drivers/net/tg3.c
+ # These were removed in early versions of Linux-libre. They're
+ # now believed to be mere initialization data, rather than code
+ # disguised as such, and it's not long enough that it renders the
+ # software non-Free.
+ defsnc 'static u8 tda10021_inittab\[0x40\]=' drivers/media/dvb/frontends/tda10021.c
+ defsnc 'static u8 tda8083_init_tab \[\] =' drivers/media/dvb/frontends/tda8083.c
+ defsnc 'static u8 ves1820_inittab\[\] =' drivers/media/dvb/frontends/ves1820.c
+ defsnc 'static u8 init_1[89]93_w\?tab \?\[\] =' drivers/media/dvb/frontends/ves1x93.c
+ defsnc 'static const u8 rtl8187b_reg_table\[\]\[3\] =' drivers/net/wireless/rtl8187_dev.c
+
# end of generic checked expressions.
# version-specific checked bits start here
defsnc 'static u8 serit_sp1511lhb_inittab\[\] =' drivers/media/dvb/frontends/si21xx.c
defsnc 'static u8 stv0288_inittab\[\] =' drivers/media/dvb/frontends/stv0288.c
defsnc 'static const struct rf_channel rf_vals_b\[\] =' drivers/net/wireless/rt2x00/rt2400pci.c
- defsnc 'static const u8 rtl8187b_reg_table\[\]\[3\] =' drivers/net/wireless/rtl8187_dev.c
# request_firmware matches for 2.6.28
accept 'D: Firmware loader (request_firmware)' CREDITS
# Hunting down non-Free firmware-loading code and instructions.
- blob 'atmsar11\.fw' drivers/atm/ambassador.c
+ blobna 'atmsar11\.fw' drivers/atm/ambassador.c
blob ' sprintf([^;]*fore200[^;]*FW_EXT[^;]*);' drivers/atm/fore200e.c
blobna '\(pc\|sb\)a200e\(_ecd\)\?\.bin[12]?' drivers/atm/fore200e.c
blob 'static void radeon_cp_load_microcode([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}[\n]' drivers/gpu/drm/radeon/radeon_cp.c
blob ' radeon_cp_load_microcode([^;]*);' drivers/gpu/drm/radeon/radeon_cp.c
- blob '\/\*[\n ]*File automatically generated by createinit\.py using data[\n ]*extracted from AF05BDA\.sys.*};' drivers/media/dvb/dvb-use/af9005-script.h
+ blob 'sub \(sp887[0x]\|tda1004\(5\|6\(lifeview\)\?\)\|av7110\|dec\(2\(00\|54\)0t\|3000s\)\|opera1\|vp7041\|dibusb\|nxt200[24]\|or51\(211\|132_\(qam\|vsb\)\)\|bluebird\) *{\([^}]*\|[^\n]}*\)[\n]}' Documentation/dvb/get_dvb_firmware
+ blobna 'Please use[^\n]*firmware[^\n]*sp887x[^\n]*\([\n][^\n]\+\)\+' Documentation/dvb/avermedia.txt
+ blob 'To extract the firmware[^\n]*Opera DVB-S1 USB-Box.*\/lib\/firmware\/ \.' Documentation/dvb/opera-firmware.txt
+ blobna '\(dvb-usb-opera[^\n]*\.fw\|2830S[^\n]*2\.sys\)' Documentation/dvb/opera-firmware.txt
+ blob 'Getting the Firmware\([\n][^\n]\+\)*' Documentation/dvb/ttusb-dec.txt
+
+ blob '\/\*[\n ]*File automatically generated by createinit\.py using data[\n ]*extracted from AF05BDA\.sys.*};' drivers/media/dvb/dvb-usb/af9005-script.h
blob '#include "af9005-script\.h"' drivers/media/dvb/dvb-usb/af9005-fe.c
- blob '[\n] scriptlen = sizeof(script)[^;]*;[\n] for[^{]*scriptlen[^{]*{[^}]*[^\n }]' drivers/media/dvb/dvb-usb/af9005-fe.c
+ blobna '[\n] scriptlen = sizeof(script)[^;]*;[\n] for[^{]*scriptlen[^{]*{[^}]*[^\n }]' drivers/media/dvb/dvb-usb/af9005-fe.c
+
+ # This bootcode is actually Free Software under GPLv2, but since it's
+ # being distributed without source code, we're taking it out.
+ blob 'static u8 bootcode\[\] = {[^}]*};' drivers/media/dvb/ttpci/av7110_hw.c
+ blobna 'dvb-ttpci-01\.fw' drivers/media/dvb/ttpci/av7110.c
+ accept '\(static int\| \.request_firmware =\) alps_tdlb7_request_firmware[(,]' drivers/media/dvb/ttpci/av7110.c
+ defsnc 'static u8 nexusca_stv0297_inittab\[\] =' drivers/media/dvb/ttpci/av7110.c
+ accept 'struct sp8870_config[\n]{[^}]*(\*request_firmware)[^}]*[\n]};' drivers/media/dvb/frontends/sp8870.h
+ accept ' if (state->config->request_firmware(' drivers/media/dvb/frontends/sp8870.c
blobna '\(agere\|prism\)_\(sta\|ap\)_fw\.bin' drivers/net/wireless/orinoco.c
blobna 'symbol_sp24t_\(prim\|sec\)_fw' drivers/net/wireless/orinoco.c
fi
sedmain="
-/^;[/][*]\\(end .*\\)\\?[*][/];$/{
+/^[\n]\?;[/][*]\\(end .*\\)\\?[*][/];$/{
$4;
d;
}
# Extract or otherwise munge...
case /$input in
*.tar*)
- cmd="tar -xf - --to-command='echo \";/*begin \$TAR_FILENAME*/;\"; cat; echo \";/**/;\"; echo \";/*end \$TAR_FILENAME*/;\"'"
+ cmd="tar -xf - --to-command='echo \";/*begin \$TAR_FILENAME*/;\"; cat; echo \";/**/;\"; echo; echo \";/*end \$TAR_FILENAME*/;\"'"
;;
*.patch | *.patch.*z* | */patch-* | *.diff | *.diff.*z*)
if $reverse_patch; then
cmd='cat'
;;
esac
- cmd="{ echo \";/*begin $input*/;\"; $cmd; echo \";/*end $input*/;\"; }"
+ cmd="{ echo \";/*begin $input*/;\"; $cmd; echo; echo \";/*end $input*/;\"; }"
set "$@" "$cmd"
case $input in