Completed re-checking of previously-deblobbed drivers/video.
authorlxoliva <lxoliva@559672b5-ba27-0410-b829-e8f1faed8b1b>
Thu, 12 Feb 2009 23:14:35 +0000 (23:14 +0000)
committerlxoliva <lxoliva@559672b5-ba27-0410-b829-e8f1faed8b1b>
Thu, 12 Feb 2009 23:14:35 +0000 (23:14 +0000)
git-svn-id: http://www.fsfla.org/svn/fsfla/software/linux-libre/scripts@4720 559672b5-ba27-0410-b829-e8f1faed8b1b

deblob-2.6.28
deblob-2.6.28-todo
deblob-check

index 113eeaa93c5155124f53df05e2a991ed11bdf550..63686440b1aeaf1ecb59fe2aa05060df8c7a1b9c 100755 (executable)
@@ -171,6 +171,7 @@ clean_mk () {
 
 clean_sed () {
        #$1 = sed-script $2 = file
+       echo Cleaning "$2" with sed script "$1"
        sed -e "$1" "$2" > "$2".deblob
        check_changed "$2"
 }
@@ -375,6 +376,20 @@ clean_blob 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
+
+announce DVB_SP8870 - Spase sp8870
+clean_sed 's,SP8870_DEFAULT_FIRMWARE,NONFREE_FIRMWARE,g' drivers/media/dvb/frontends/sp8870.c
+clean_blob drivers/media/dvb/frontends/sp8870.c
+clean_kconfig drivers/media/dvb/frontends 'DVB_SP8870'
+clean_mk CONFIG_DVB_SP8870 drivers/media/dvb/frontends/Makefile
+
+announce DVB_TDA1004X - Philips TDA10045H/TDA10046H
+clean_sed 's,TDA1004[56]_DEFAULT_FIRMWARE,NONFREE_FIRMWARE,g' drivers/media/dvb/frontends/tda1004x.c
+clean_blob drivers/media/dvb/frontends/tda1004x.c
+clean_kconfig drivers/media/dvb/frontends 'DVB_TDA1004X'
+clean_mk CONFIG_DVB_TDA1004X drivers/media/dvb/frontends/Makefile
+
 # dvb/ttpci
 
 announce DVB_AV7110 - AV7110 cards
@@ -389,62 +404,48 @@ 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
 
-# DVB_BUDGET_AV - Budget cards with analog video inputs
-clean_blob drivers/media/dvb/ttpci/budget-av.c
-clean_kconfig drivers/media/dvb/ttpci/Kconfig 'DVB_BUDGET_AV'
-clean_kconfig drivers/media/dvb/ttpci/Kconfig 'DVB_BUDGET_PATCH'
-clean_kconfig drivers/media/dvb/ttpci/Kconfig 'DVB_BUDGET'
-clean_mk CONFIG_DVB_BUDGET_AV drivers/media/dvb/ttpci/Makefile
-clean_mk CONFIG_DVB_BUDGET_PATCH drivers/media/dvb/ttpci/Makefile
-clean_mk CONFIG_DVB_BUDGET drivers/media/dvb/ttpci/Makefile
+announce DVB_BUDGET - Budget cards
+clean_sed '/^static int alps_tdhd1_204_request_firmware(/,/^}$/s, request_firmware(, maybe_reject_firmware(,' drivers/media/dvb/ttpci/budget.c
 
-# DVB_BUDGET_CI - Budget cards with onboard CI connector
-clean_blob drivers/media/dvb/ttpci/budget-ci.c
-clean_kconfig drivers/media/dvb/ttpci/Kconfig 'DVB_BUDGET_CI'
-clean_mk CONFIG_DVB_BUDGET_CI drivers/media/dvb/ttpci/Makefile
+announce DVB_BUDGET_AV - Budget cards with analog video inputs
+clean_sed '/^static int philips_tu1216_request_firmware(/,/^}$/s, request_firmware(, maybe_reject_firmware(,' drivers/media/dvb/ttpci/budget-av.c
+
+announce DVB_BUDGET_CI - Budget cards with onboard CI connector
+clean_sed '/^static int philips_tdm1316l_request_firmware(/,/^}$/s, request_firmware(, maybe_reject_firmware(,' drivers/media/dvb/ttpci/budget-ci.c
 
 # dvb/ttusb-budget
 
-# DVB_TTUSB_BUDGET - Technotrend/Hauppauge Nova-USB devices
+announce DVB_TTUSB_BUDGET - Technotrend/Hauppauge Nova-USB devices
 drop_fw_file firmware/ttusb-budget/dspbootcode.bin.ihex firmware/ttusb-budget/dspbootcode.bin
+clean_sed '/^static int philips_tdm1316l_request_firmware(/,/^}$/s, request_firmware(, maybe_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
 
 # video
 
-# USB_PWC - USB Philips Cameras
-clean_blob drivers/media/video/pwc/pwc-kiara.c
-clean_blob drivers/media/video/pwc/pwc-timon.c
-clean_kconfig drivers/media/video/pwc/Kconfig 'USB_PWC'
-clean_mk CONFIG_USB_PWC drivers/media/video/Makefile
-
-# VIDEO_CPIA - CPiA Video For Linux
+announce VIDEO_CPIA2 - CPiA2 Video For Linux
 clean_fw firmware/cpia2/stv0672_vp4.bin.ihex firmware/cpia2/stv0672_vp4.bin
-clean_kconfig drivers/media/video/Kconfig 'VIDEO_CPIA'
-clean_kconfig drivers/media/video/Kconfig 'VIDEO_CPIA_PP'
-clean_kconfig drivers/media/video/Kconfig 'VIDEO_CPIA_USB'
+reject_firmware drivers/media/video/cpia2/cpia2_core.c
+clean_blob drivers/media/video/cpia2/cpia2_core.c
 clean_kconfig drivers/media/video/cpia2/Kconfig 'VIDEO_CPIA2'
-clean_mk CONFIG_VIDEO_CPIA drivers/media/video/Makefile
-clean_mk CONFIG_VIDEO_CPIA_PP drivers/media/video/Makefile
-clean_mk CONFIG_VIDEO_CPIA_USB drivers/media/video/Makefile
-clean_mk CONFIG_VIDEO_CPIA2 drivers/media/video/Makefile
+clean_mk CONFIG_VIDEO_CPIA2 drivers/media/video/cpia2/Makefile
 
-# USB_DABUSB - DABUSB driver
+announce USB_DABUSB - DABUSB driver
 clean_fw firmware/dabusb/bitstream.bin.ihex firmware/dabusb/bitstream.bin
 clean_fw firmware/dabusb/firmware.HEX firmware/dabusb/firmware.fw
+reject_firmware drivers/media/video/dabusb.c
+clean_blob drivers/media/video/dabusb.c
 clean_kconfig drivers/media/Kconfig 'USB_DABUSB'
 clean_mk CONFIG_USB_DABUSB drivers/media/video/Makefile
 
 # video/usbvideo
 
-# USB_IBMCAM - USB IBM (Xirlink) C-it Camera support
-clean_blob drivers/media/video/usbvideo/ibmcam.c
-clean_kconfig drivers/media/video/usbvideo/Kconfig 'USB_IBMCAM'
-clean_mk CONFIG_USB_IBMCAM drivers/media/video/usbvideo/Makefile
-
-# USB_VICAM - USB 3com HomeConnect (aka vicam)
+announce USB_VICAM - USB 3com HomeConnect, AKA vicam
 drop_fw_file firmware/vicam/firmware.H16 firmware/vicam/firmware.fw
+reject_firmware drivers/media/video/vicam.c
+clean_blob drivers/media/video/vicam.c
 clean_kconfig drivers/media/video/usbvideo/Kconfig 'USB_VICAM'
 clean_mk CONFIG_USB_VICAM drivers/media/video/usbvideo/Makefile
 
index b9eb8becddb3a46c4d6f806c627e5993d4974374..d02b8c4a583c8aeadeb144cb5017b50f16a6f573 100644 (file)
@@ -43,31 +43,21 @@ drivers/media/dvb/frontends/or51211.h
 drivers/media/dvb/frontends/sp887x.c
 drivers/media/dvb/frontends/sp887x.h
 drivers/media/dvb/frontends/tda10048.c
-drivers/media/dvb/frontends/tda1004x.c
-drivers/media/dvb/frontends/tda1004x.h
 drivers/media/dvb/frontends/tdhd1.h
 drivers/media/dvb/pluto2/pluto2.c
 drivers/media/dvb/siano/smscoreapi.c
 drivers/media/dvb/siano/smsusb.c
-drivers/media/dvb/ttpci/av7110.c
-drivers/media/dvb/ttpci/budget-av.c
-drivers/media/dvb/ttpci/budget-ci.c
-drivers/media/dvb/ttpci/budget.c
-drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
 drivers/media/dvb/ttusb-dec/ttusb_dec.c
 drivers/media/video/bt8xx/bttv-cards.c
-drivers/media/video/cpia2/cpia2_core.c
 drivers/media/video/cx18/cx18-av-firmware.c
 drivers/media/video/cx18/cx18-firmware.c
 drivers/media/video/cx23885/cx23885-417.c
 drivers/media/video/cx25840/cx25840-firmware.c
 drivers/media/video/cx88/cx88-blackbird.c
-drivers/media/video/dabusb.c
 drivers/media/video/ivtv/ivtv-firmware.c
 drivers/media/video/pvrusb2/pvrusb2-hdw.c
 drivers/media/video/s2255drv.c
 drivers/media/video/saa7134/saa7134-dvb.c
-drivers/media/video/usbvideo/vicam.c
 drivers/net/cassini.c
 drivers/net/cxgb3/cxgb3_main.c
 drivers/net/irda/irda-usb.c
index a73da4c039b0f8c56e34c518da623c9bfa0f1e1f..65491719ced6ce59a57e2c84312d464b3b83e006 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# deblob-check version 2009-02-09
+# deblob-check version 2009-02-12
 # Inspired in gNewSense's find-firmware script.
 # Written by Alexandre Oliva <lxoliva@fsfla.org>
 
@@ -574,6 +574,7 @@ set_except () {
   blobna "request_firmware"
   blobna "request_ihex_firmware"
   blobna "MODULE_FIRMWARE([^;]*)[^;]*;"
+  blobna "DEFAULT_FIRMWARE"
 
   case $prefix$1 in
   */*linux*.tar* | */*kernel*.tar* | */*linux-*.*.*/*)
@@ -657,16 +658,6 @@ set_except () {
     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
 
@@ -858,6 +849,23 @@ set_except () {
     ocomment ' [/][*] request_firmware blocks until userspace finished' samples/firmware_class/firmware_sample_driver.c
     accept '           [ \t]*" request_firmware_nowait failed' samples/firmware_class/firmware_sample_driver.c
 
+    # We used to remove these in early versions of Linux-libre.
+    # They're now believed to be mere initialization data, rather than
+    # code disguised as such, and they're not long enough so as to
+    # render 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 saa7113_tab\[\] =' drivers/media/dvb/ttpci/budget-av.c
+    defsnc 'static u8 philips_sd1878_inittab\[\] =' drivers/media/dvb/ttpci/budget-av.c
+    defsnc 'const struct Kiara_table_entry Kiara_table\[PSZ_MAX\]\[6\]\[4\] =' drivers/media/video/pwc/pwc-kiara.c
+    defsnc 'const unsigned int KiaraRomTable \[8\]\[2\]\[16\]\[8\] =' drivers/media/video/pwc/pwc-kiara.c
+    defsnc 'const struct Timon_table_entry Timon_table\[PSZ_MAX\]\[PWC_FPS_MAX_TIMON\]\[4\] =' drivers/media/video/pwc/pwc-timon.c
+    defsnc 'const unsigned int TimonRomTable \[16\]\[2\]\[16\]\[8\] =' drivers/media/video/pwc/pwc-timon.c
+    defsnc '   static const struct struct_initData initData\[\] =' drivers/media/video/usbvideo/ibmcam.c
+    defsnc 'static const u8 rtl8187b_reg_table\[\]\[3\] =' drivers/net/wireless/rtl8187_dev.c
+
     # Hunting down non-Free firmware-loading code and instructions.
 
     blobna 'atmsar11\.fw' drivers/atm/ambassador.c
@@ -892,19 +900,39 @@ set_except () {
     blob '#include "af9005-script\.h"' 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
 
+    accept 'struct \(sp8870\|tda1004x\)_config[\n]{[^}]*(\*request_firmware)[^}]*[\n]};' 'drivers/media/dvb/frontends/\(sp8870\|tda1004x\)\.h'
+    blob '[/][*]\([^/]*\|[^*][/]\)*get_dvb_firmware\([^/]*\|[^*/][/]*\)*[*][/]\([\n]#define \(\([^\n   ]*_DEFAULT\|NONFREE\)_FIRMWARE\|"[^"]*"\) \([^\n]*\|[\\][\n]\)*\)*' 'drivers/media/dvb/frontends/\(sp8870\|tda1004x\)\.c'
+    accept '[^\n]*->request_firmware([^{;]*NONFREE_FIRMWARE' 'drivers/media/dvb/frontends/\(sp8870\|tda1004x\)\.c'
+    blobna 'dvb-fe-sp8870\.fw' drivers/media/dvb/frontends/sp8870.c
+    blobna 'dvb-fe-tda1004[56]\.fw' drivers/media/dvb/frontends/tda1004x.c
+    accept '   if (state->config->request_firmware != NULL) {' drivers/media/dvb/ttpci/tda1004x.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
+
+    accept '\(static int\|     \.request_firmware =\) alps_tdhd1_204_request_firmware[(,]' drivers/media/dvb/ttpci/budget.c
+
+    accept '\(static int\|     \.request_firmware =\) philips_tu1216_request_firmware[(,]' drivers/media/dvb/ttpci/budget-av.c
+
+    accept '\(static int\|     \.request_firmware =\) philips_tdm1316l_request_firmware[(,]' drivers/media/dvb/ttpci/budget-ci.c
+    defsnc 'static u8 philips_su1278_tt_inittab\[\] =' drivers/media/dvb/ttpci/budget-ci.c
+    defsnc 'static u8 dvbc_philips_tdm1316l_inittab\[\] =' drivers/media/dvb/ttpci/budget-ci.c
+    accept '\(static int\|     \.request_firmware =\) philips_tdm1316l_request_firmware[(,]' drivers/media/dvb/ttpci/budget-ci.c
+
+    blobna 'ttusb-budget\/dspbootcode\.bin' drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+
+    blobna 'cpia2\/stv0672_vp4\.bin' drivers/media/video/cpia2/cpia2_core.c
+
+    blobna 'dabusb\/\(firmware\.fw\|bitstream\.bin\)' drivers/media/video/dabusb.c
+
 
     blobna '\(agere\|prism\)_\(sta\|ap\)_fw\.bin' drivers/net/wireless/orinoco.c
     blobna 'symbol_sp24t_\(prim\|sec\)_fw' drivers/net/wireless/orinoco.c
 
-
     # This looks suspicious, but it pretty much just sets stuff to zero.
     initnc 'static __u8 mode8420\(pro\|con\)\[\] =' drivers/media/video/cs8420.h