From 2700d3e28cae574c1bb47bbc023b11633a1bf196 Mon Sep 17 00:00:00 2001 From: lxoliva Date: Fri, 6 Mar 2009 23:22:59 +0000 Subject: [PATCH] Revamped MyriCOM, Tehuti, Tigon3, Typhoon. git-svn-id: http://www.fsfla.org/svn/fsfla/software/linux-libre/scripts@4748 559672b5-ba27-0410-b829-e8f1faed8b1b --- deblob-2.6.28 | 70 +++++++++++++++++++++++++-------------------------- deblob-check | 16 +++++++++++- 2 files changed, 50 insertions(+), 36 deletions(-) diff --git a/deblob-2.6.28 b/deblob-2.6.28 index 4c6bff6a093..1e180583359 100755 --- a/deblob-2.6.28 +++ b/deblob-2.6.28 @@ -541,47 +541,47 @@ clean_blob drivers/net/e100.c 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 +announce MYRI_SBUS - MyriCOM Gigabit Ethernet +clean_file drivers/net/myri_code.h +clean_sed '/myri_load_lanai.*;/i\ + printk(KERN_ERR "Missing Free firmware\\n");\ + goto err_free_irq; +' drivers/net/myri_sbus.c +clean_blob drivers/net/myri_sbus.c clean_kconfig drivers/net/Kconfig 'MYRI_SBUS' clean_mk CONFIG_MYRI_SBUS drivers/net/Makefile -# TEHUTI - Tehuti Networks 10G Ethernet -clean_blob drivers/net/tehuti_fw.h -s 4 +announce TEHUTI - Tehuti Networks 10G Ethernet +clean_blob drivers/net/tehuti_fw.h +clean_sed '/bdx_tx_push_desc_safe.*s_firmLoad.*/i\ + ERR("%s: Missing Free firmware\\n", priv->ndev->name);\ + RET(-EINVAL); +' drivers/net/tehuti.c +clean_blob drivers/net/tehuti.c clean_kconfig drivers/net/Kconfig 'TEHUTI' clean_mk CONFIG_TEHUTI drivers/net/Makefile -# TIGON3 - Broadcom Tigon3 -patch --no-backup-if-mismatch --batch -p0 <<\EOF || \ - die failed to remove license comments from drivers/net/tg3.c \ - # patches/linux-2.6-tg3-clean.patch ---- drivers/net/tg3.c -+++ drivers/net/tg3.c -@@ -5,14 +5,6 @@ - * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com) - * Copyright (C) 2004 Sun Microsystems Inc. - * Copyright (C) 2005-2007 Broadcom Corporation. -- * -- * Firmware is: -- * Derived from proprietary unpublished source code, -- * Copyright (C) 2000-2003 Broadcom Corporation. -- * -- * Permission is hereby granted for the distribution of this firmware -- * data in hexadecimal or equivalent format, provided this copyright -- * notice is accompanying it. - */ - - -EOF -clean_blob drivers/net/tg3.c -s 9 -if $have_check; then - sed -i 's:\(\/\*(DEBLOBBED)\*\/\),:\1:' drivers/net/tg3.c -else - clean_kconfig drivers/net/Kconfig 'TIGON3' - clean_mk CONFIG_TIGON3 drivers/net/Makefile -fi - -# TYPHOON - 3cr990 series Typhoon +announce TIGON3 - Broadcom Tigon3 +clean_sed 's,\&tg3\(Tso5\?\)\?Fw\(Text\|Rodata\|Data\)\[0\],NULL,; +/^static int tg3_load_firmware_cpu(/,/^}/{ + /^ err = 0;/i\ + printk(KERN_ERR PFX "Missing Free firmware for %s, hoping it works anyway\\n",\ + tp->dev->name); +}' drivers/net/tg3.c +clean_blob drivers/net/tg3.c +clean_kconfig drivers/net/Kconfig 'TIGON3' +clean_mk CONFIG_TIGON3 drivers/net/Makefile + +announce TYPHOON - 3cr990 series Typhoon +clean_sed '/^typhoon_download_firmware(/,/^}/{ + /typhoon_firmware_image/{ + i\ + printk(KERN_ERR "%s: Missing Free firmware\\n", tp->name);\ + err = -EINVAL;\ + goto err_out; + d; + } +}' drivers/net/typhoon.c clean_blob drivers/net/typhoon-firmware.h clean_kconfig drivers/net/Kconfig 'TYPHOON' clean_mk CONFIG_TYPHOON drivers/net/Makefile diff --git a/deblob-check b/deblob-check index e333a0ca03b..fa1ba222525 100755 --- a/deblob-check +++ b/deblob-check @@ -1,6 +1,6 @@ #! /bin/sh -# deblob-check version 2009-02-19 +# deblob-check version 2009-03-06 # Inspired in gNewSense's find-firmware script. # Written by Alexandre Oliva @@ -953,6 +953,20 @@ set_except () { 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 + blob 'static unsigned char __devinitdata lanai4_\(code\|data\)\[[0-9]*\] = {[^;]*};' drivers/net/myri_code.h + blob '#include "myri_code\.h"' drivers/net/myri_sbus.c + blobna '\([/][*]\([^/]\|[^*][/]*\)*[*][/][\n ]*\)\?for ([^\n]*sizeof(lanai4_\(code\|data\)[^\n]*)[\n][^\n]*sbus_writeb[^;]*lanai4_\(code\|data\)[^;]*lanai4_code_off[^;]*;\([\n ]*\([/][*]\([^/]\|[^*][/]*\)*[*][/][\n ]*\)\?for ([^\n]*sizeof(lanai4_\(code\|data\)[^\n]*)[\n][^\n]*sbus_writeb[^;]*lanai4_\(code\|data\)[^;]*lanai4_\(code\|data\)_off[^;]*;\)*' drivers/net/myri_sbus.c + + blob 'static u32 s_firmLoad\[\] = {[^;]*};' drivers/net/tehuti_fw.h + blob 'bdx_tx_push_desc_safe[^;]*s_firmLoad[^;]*;' drivers/net/tehuti.c + blob 'for ([^\n]*ARRAY_SIZE(s_firmLoad)[^\n]*)[\n ]*s_firmLoad[^;]*=[^;]*s_firmLoad[^;]*;' drivers/net/tehuti.c + + blob ' [*] Firmware is:[\n] [*] Derived from proprietary[^/]*notice is accompanying it\.[\n] [*][/]' drivers/net/tg3.c + blob 'Derived from proprietary unpublished source code' drivers/net/tg3.c + blob '\(static const \)\?u32 tg3\(Tso5\?\)\?Fw\(Text\|Rodata\|Data\)\[[^{]*\] = {[^}]*};\([\n][\n]*\(static const u32 tg3\(Tso5\?\)\?Fw\(Text\|Rodata\|Data\)\[[^{]*\] = {[^}]*};\|#if 0\( [/][*]\([^/]\|[^*/][/]*\)*[*][/]\)\?[\n]\(static const \)\?u32 tg3\(Tso5\?\)\?Fw\(Text\|Rodata\|Data\)\[[^{]*\] = {[^}]*};[\n]#endif\)\)*' drivers/net/tg3.c + + blob 'static const u8 typhoon_firmware_image\[\] = {[^}]*};' drivers/net/typhoon-firmware.h + blobna '\(agere\|prism\)_\(sta\|ap\)_fw\.bin' drivers/net/wireless/orinoco.c blobna 'symbol_sp24t_\(prim\|sec\)_fw' drivers/net/wireless/orinoco.c -- 2.31.1