Promote ../fedora/current/*/scripts/deblob.sh to deblob-main.
[releases.git] / deblob-check
index c535ba8b108e5d0ac11cdbbad124c4cb2105eaf4..b65363e1e8ade5c78c8e2c636bc1d16df2c7fff9 100755 (executable)
 
 # Yeah, lots of stuff to do.  Want to help?
 
+# This makes it much faster, and mostly immune to non-ASCII stuff, as
+# long as a 8-bit-safe sed is used.  Probably a safe assumption these
+# days.
+case ${LANG+set} in set) LANG=C; export LANG;; esac
+
 rm="rm -f"
 case $1 in
 --save-scripts | -S)
@@ -499,6 +504,14 @@ set_except () {
   }
 
   case /$1 in
+  /drivers/net/tg3.c)
+    # This file contains firmwares that we deblob with high
+    # sensitivity, so make sure the sequences of numbers that are not
+    # blobs are not deblobbed.  FIXME: we should have patterns to
+    # recognize the blobs instead.
+    initnc '   static const u32 test_pat\[4\]\[6\] ='
+    initnc '   }, mem_tbl_5705\[\] ='
+    ;;
   */*linux*.tar* | */*kernel*.tar* | */*linux-*.*.*/*)
     # false alarms, contain source
     # drivers/net/wan/wanxlfw.inc_shipped -> wanxlfw.S
@@ -591,6 +604,18 @@ set_except () {
     # drivers/media/video/saa7114.c
     initc 'static const unsigned char init\[\] = {[^;]*MODE=0 ;.*SAA_7114_NTSC_HSYNC_START'
 
+    # in 2.6.23 only
+    accept " Psize    Ipps       Tput     Rxint     Txint    Done     Ndone[\\n] ---------------------------------------------------------------\\([\\n][ 0-9]\\+\\)\\+$eol"
+    initnc 'static u_short ataplain_map\[NR_KEYS\] __initdata ='
+    initnc 'static RegInitializer initData\[\] __initdata ='
+    initnc '   static const unsigned char invert5\[\] ='
+    initnc 'static unsigned char alpa2target\[\] ='
+    initnc 'static unsigned char target2alpa\[\] ='
+    oprepline '#define INIT_THREAD [{0},]\+[   ]*\\[   ]*[{0},]\+'
+    initnc 'static uint tas300\(1c\|4\)_\(master\|mixer\|treble\|bass\)_tab\[\]='
+    initnc 'static short dmasound_[au]law2dma16\[\] ='
+    initnc 'static const unsigned short DACVolTable\[101\] ='
+
     # new in 2.6.25
     accept "%canned_values = ([\\n]    \\([0-9]\\+ => \\[[     \\n]\\+\\(\\([0-9]\\+\\|'0x[0-9a-f]\\+'\\),[    \\n]*\\)*\\]\\(, \\|[\\n]\\)\\)*);"
 
@@ -629,7 +654,7 @@ set_except () {
 
     # too lax?
     initnc 'static yyconst flex_int\(16\|32\)_t yy_[^[]*\[[][0-9]*\] ='
-    initnc 'static const yytype_u\?int\(8\|16\) yy[^[]*\[\] ='
+    initnc 'static const \(yytype_u\?int\(8\|16\)\|unsigned \(short\( int\)\?\|char\)\) yy[^[]*\[\] ='
     initnc '\(\|       \)static \(const \|\)\(unsigned \(short\|char\)\|struct SiS_[^ ]*\) SiS[^[]*\(\[[] [*0-9]*\]\)\+ *='
 
     initnc 'static const a3d_Hrtf_t A3dHrirZeros = {'
@@ -833,13 +858,13 @@ set_except () {
     initnc 'static const unsigned char blue\[256\] ='
     initnc 'static const unsigned char chktab[hl]\[256\] ='
     initnc 'static const unsigned char comet_miireg2offset\[32\] ='
-    initnc 'static const unsigned char euc2sjisibm_g3upper_map\[\]\[2\] ='
+    initnc 'static \(const \)\?unsigned char euc2sjisibm_g3upper_map\[\]\[2\] ='
     initnc 'static const unsigned char green\[256\] ='
     initnc 'static const unsigned char hash_table_ops\[64\*4\] ='
     initnc 'static const unsigned char hid_keyboard\[256\] ='
     initnc 'static const unsigned char mts_direction\[256\/8\] ='
     initnc 'static const unsigned char red\[256\] ='
-    initnc 'static const unsigned char sjisibm2euc_map\[\]\[2\] ='
+    initnc 'static \(const \)\?unsigned char sjisibm2euc_map\[\]\[2\] ='
     initnc 'static const unsigned char vol_cvt_datt\[128\] ='
     initnc 'static const unsigned char wm_vol\[256\] ='
     initnc 'static const unsigned int MulIdx\[16\]\[16\] ='
@@ -936,6 +961,9 @@ set_except () {
     initnc 'static u8 w1_crc8_table\[\] ='
     initnc 'static u_char const data_sizes_32\[32\] ='
     initnc 'static u_long ident_map\[32\] ='
+    initnc 'static u_short alt_map\[NR_KEYS\] ='
+    initnc 'static u_short altgr_map\[NR_KEYS\] ='
+    initnc 'static u_short ctrl_alt_map\[NR_KEYS\] ='
     initnc 'static u_short ctrl_map\[NR_KEYS\] *='
     initnc 'static u_short shift_ctrl_map\[NR_KEYS\] ='
     initnc 'static u_short shift_map\[NR_KEYS\] *='
@@ -1144,7 +1172,7 @@ set_except () {
     oprepline '#define AR5K_RATES_TURBO '
     oprepline '#define AR5K_RATES_XR '
     initnc 'static const struct ath5k_ini ar5212_ini\[\] ='
-    initnc 'static const struct ath5k_ini_mode rf\(5413\|24\(13|25\)\)_ini_mode_end\[\] ='
+    initnc 'static const struct ath5k_ini_mode rf\(5413\|24\(13\|25\)\)_ini_mode_end\[\] ='
     initnc '           } blinkrates\[\] ='
 
     # git logs