Revamped cassini, cxgb3 and e100.
authorlxoliva <lxoliva@559672b5-ba27-0410-b829-e8f1faed8b1b>
Thu, 19 Feb 2009 19:09:32 +0000 (19:09 +0000)
committerlxoliva <lxoliva@559672b5-ba27-0410-b829-e8f1faed8b1b>
Thu, 19 Feb 2009 19:09:32 +0000 (19:09 +0000)
git-svn-id: http://www.fsfla.org/svn/fsfla/software/linux-libre/scripts@4730 559672b5-ba27-0410-b829-e8f1faed8b1b

deblob-2.6.28
deblob-2.6.28-todo
deblob-check

index d560097abdd03930dc0be87ea3c07e42c95f4c27..4c6bff6a0931bf856038f1cada81ac7d5c6c3587 100755 (executable)
@@ -504,24 +504,42 @@ clean_sed '/^#include "bnx2x_init\.h"/,/^$/ {/^$/i\
 clean_kconfig drivers/net/Kconfig 'BNX2X'
 clean_mk CONFIG_BNX2X drivers/net/Makefile
 
-# CASSINI - Sun Cassini
+announce CASSINI - Sun Cassini
 drop_fw_file firmware/sun/cassini.bin.ihex firmware/sun/cassini.bin
+reject_firmware drivers/net/cassini.c
+clean_blob drivers/net/cassini.c
 clean_kconfig drivers/net/Kconfig 'CASSINI'
 clean_mk CONFIG_CASSINI drivers/net/Makefile
 
-# CHELSIO_T3 - Chelsio AEL 2005 support
+announce CHELSIO_T3 - Chelsio AEL 2005 support
+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
 clean_blob drivers/net/cxgb3/ael1002.c
 clean_kconfig drivers/net/Kconfig 'CHELSIO_T3'
 clean_mk CONFIG_CHELSIO_T3 drivers/net/cxgb3/Makefile
 
-# E100 - Intel(R) PRO/100+
+announce E100 - Intel PRO/100+
+clean_sed '/^static void e100_setup_ucode(/,/^}$/ {
+  /^   } ucode_opts\[\] = {$/,/^       }[,;]/ {
+    s,D[^,]*_RCVBUNDLE_UCODE,/*DEBLOBBED*/{0},g;
+    s,D[^,]*_CPUSAVER_\(TIMER\|BUNDLE\|MIN_SIZE\)_DWORD,/*DEBLOBBED*/0,g;
+  }
+  /^   for ([^;]*ucode_opts[^{]*) {$/,/^       }$/ {
+    /^ }$/ i\
+       }\
+               DPRINTK(DRV, ERR, "Missing Free firmware\\n");\
+               /* ??? We should error out somehow.  */\
+               goto noloaducode;
+  }
+}
+' drivers/net/e100.c
 clean_blob drivers/net/e100.c
-if $have_check; then
-  sed -i 's:\(\/\*(DEBLOBBED)\*\/\),:\1:' drivers/net/e100.c
-else
-  clean_kconfig drivers/net/Kconfig 'E100'
-  clean_mk CONFIG_E100 drivers/net/Makefile
-fi
+clean_kconfig drivers/net/Kconfig 'E100'
+clean_mk CONFIG_E100 drivers/net/Makefile
 
 # MYRI_SBUS - MyriCOM Gigabit Ethernet
 clean_blob drivers/net/myri_code.h
index d02b8c4a583c8aeadeb144cb5017b50f16a6f573..ff256da371e3c3bb497a8be8e4e2fa7d792a2783 100644 (file)
@@ -58,8 +58,6 @@ 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/net/cassini.c
-drivers/net/cxgb3/cxgb3_main.c
 drivers/net/irda/irda-usb.c
 drivers/net/myri10ge/myri10ge.c
 drivers/net/netx-eth.c
index af46bd2d82002c2480e0d3c11034661c57a23b6d..e333a0ca03bb64c17c17ce0597a8ada8af7688e3 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# deblob-check version 2009-02-15
+# deblob-check version 2009-02-19
 # Inspired in gNewSense's find-firmware script.
 # Written by Alexandre Oliva <lxoliva@fsfla.org>
 
@@ -936,9 +936,6 @@ set_except () {
     blob '#include "starfire_firmware\.h"' drivers/net/starfire.c
     blob '[/][*]\([^/]*\|[^*/][/]*\)*Load Rx\/Tx firmware\([^/]*\|[^*/][/]*\)*[*][/]\([\n]     for ([^)]*FIRMWARE_[RT]X_SIZE[^)]*)[\n]         writel[^;]*firmware_[rt]x[^;]*;\)\+' drivers/net/starfire.c
 
-    blobna '\(agere\|prism\)_\(sta\|ap\)_fw\.bin' drivers/net/wireless/orinoco.c
-    blobna 'symbol_sp24t_\(prim\|sec\)_fw' drivers/net/wireless/orinoco.c
-
     blob 'static \(u8\|const u32\|struct fw_info\) bnx2_\(\(COM\|CP\|[RT]XP\|TPAT\)_b0[69]Fw\(Text\|Data\|Rodata\)\|\(xi_\)\?rv2p_proc[12]\|\(com\|cp\|[rt]xp\|tpat\)_fw_0[69]\)\(\[[^]};]*\]\)* = {[^}]*};\([\n][\n]*static \(u8\|const u32\|struct fw_info\) bnx2_\(\(COM\|CP\|[RT]XP\|TPAT\)_b0[69]Fw\(Text\|Data\|Rodata\)\|\(xi_\)\?rv2p_proc[12]\|\(com\|cp\|[rt]xp\|tpat\)_fw_0[69]\)\(\[[^]};]*\]\)* = {[^}]*};\)*' 'drivers/net/bnx2_fw2\?.h'
     blob '#include "bnx2_fw2\?\.h"\([\n][\n]*#include "bnx2_fw2\?\.h"\)*' drivers/net/bnx2.c
     blob 'static int[\n]bnx2_init_cpus([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}' drivers/net/bnx2.c
@@ -948,6 +945,17 @@ set_except () {
     blob 'static const u32 \(init\?\|[tucx]sem_\(int_table\|pram\)\)_data_e1h\?\[\] = {[^}]*};\([\n][\n]*static const u32 \(init\?\|[tucx]sem_\(int_table\|pram\)\)_data_e1h\?\[\] = {[^}]*};\)*' drivers/net/bnx2x_init_values.h
     blob 'static \(void \|const u32 \*\)bnx2x_\(sel_blob\|init_wr_wb\|init_block\)([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}\([\n][\n]*static \(void \|const u32 \*\)bnx2x_\(sel_blob\|init_wr_wb\|init_block\)([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}\)*' drivers/net/bnx2x_init.h
 
+    blobna 'sun\/cassini\.bin' drivers/net/cassini.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
+
+    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
+
+    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