Backported cosmetic changes.
[releases.git] / deblob-2.6.37
index da7eefa8f00f1a3772f847dd0e2d8ae65d3d92e8..56ea6a69da0bf8ee4ac0a1bba5188baf842ccec1 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-#    Copyright (C) 2008, 2009, 2010 Alexandre Oliva <lxoliva@fsfla.org>
+#    Copyright (C) 2008, 2009, 2010, 2011 Alexandre Oliva <lxoliva@fsfla.org>
 #    Copyright (C) 2008 Jeff Moe
 #    Copyright (C) 2009 Rubén Rodríguez <ruben@gnu.org>
 #
 # See also:
 # http://wiki.debian.org/KernelFirmwareLicensing
 # svn://svn.debian.org/kernel/dists/trunk/linux-2.6/debian/patches/debian/dfsg/files-1
-# ?http://svn.gnewsense.svnhopper.net/gnewsense/builder/trunk/firmware/firmware-removed
-# ?http://svn.gnewsense.svnhopper.net/gnewsense/builder/trunk/gen-kernel
+# http://wiki.gnewsense.org/Builder gen-kernel
 
 # Thanks to Brian Brazil @ gnewsense
 
 
 # For each kver release, start extra with an empty string, then count
 # from 1 if changes are needed that require rebuilding the tarball.
-kver=2.6.37 extra=--
+kver=2.6.37 extra=0++
 
 case $1 in
 --force)
@@ -278,6 +277,44 @@ grep -q 'EXTRAVERSION.*-libre' Makefile ||
 clean_sed "s,^EXTRAVERSION.*,&-libre$extra,
 " Makefile 'added -libre to EXTRAVERSION'
 
+grep -q Linux-libre README ||
+clean_sed '
+1,3 s,Linux kernel release.*kernel\.org.*,Linux-libre <http://linux-libre.fsfla.org>,
+2,5 s,Linux version 2.6,Linux-libre,
+1,20 s,\(operating system \)\?Unix,Unix kernel,
+/WHAT IS LINUX/i\
+WHAT IS Linux-libre?\
+\
+  Linux-libre is a Free version of the kernel Linux (see below),\
+  suitable for use with the GNU Operating System in 100% Free\
+  GNU/Linux-libre System Distributions.\
+  http://www.gnu.org/distros/\
+\
+  It removes non-Free components from Linux, that are disguised as\
+  source code or distributed in separate files.  It also disables\
+  run-time requests for non-Free components, shipped separately or as\
+  part of Linux, and documentation pointing to them, so as to avoid\
+  (Free-)baiting users into the trap of non-Free Software.\
+  http://www.fsfla.org/anuncio/2010-11-Linux-2.6.36-libre-debait\
+\
+  Linux-libre started within the gNewSense GNU/Linux distribution.\
+  It was later adopted by Jeff Moe, who coined its name, and in 2008\
+  it became a project maintained by FSF Latin America.\
+\
+  The Linux-libre project takes a minimal-changes approach to cleaning\
+  up Linux, making no effort to substitute components that need to be\
+  removed with functionally equivalent Free ones.  Nevertheless, we\
+  encourage and support efforts towards doing so.\
+  http://libreplanet.org/wiki/LinuxLibre:Devices_that_require_non-free_firmware\
+\
+  Our mascot is Freedo, a light-blue penguin that has just come out\
+  of the the shower.  Although we like penguins, GNU is a much\
+  greater contribution to the entire system, so its mascot deserves\
+  more promotion.  See our web page for their images.\
+  http://linux-libre.fsfla.org/\
+
+' README 'added blurb about Linux-libre'
+
 # Add reject_firmware and maybe_reject_firmware
 grep -q _LINUX_LIBRE_FIRMWARE_H include/linux/firmware.h ||
 clean_sed '$i\
@@ -862,11 +899,11 @@ clean_blob drivers/media/video/cx18/cx18-firmware.c
 clean_kconfig drivers/media/video/cx18/Kconfig 'VIDEO_CX18'
 clean_mk CONFIG_VIDEO_CX18 drivers/media/video/cx18/Makefile
 
-announce VIDEO_CX231xx - "Conexant cx231xx USB video capture support"
-reject_firmware drivers/media/video/cx231xx/cx23885-417.c
-clean_blob drivers/media/video/cx231xx/cx23885-417.c
-clean_kconfig drivers/media/video/cx231xx/Kconfig 'VIDEO_CX231xx'
-clean_mk CONFIG_VIDEO_CX231xx drivers/media/video/cx231xx/Makefile
+announce VIDEO_CX231XX - "Conexant cx231xx USB video capture support"
+reject_firmware drivers/media/video/cx231xx/cx231xx-417.c
+clean_blob drivers/media/video/cx231xx/cx231xx-417.c
+clean_kconfig drivers/media/video/cx231xx/Kconfig 'VIDEO_CX231XX'
+clean_mk CONFIG_VIDEO_CX231XX drivers/media/video/cx231xx/Makefile
 
 announce VIDEO_CX23885 - "Conexant cx23885 (2388x successor) support"
 reject_firmware drivers/media/video/cx23885/cx23885-417.c
@@ -974,7 +1011,7 @@ clean_blob drivers/net/starfire.c
 clean_kconfig drivers/net/Kconfig 'ADAPTEC_STARFIRE'
 clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/Makefile
 
-announce CONFIG_BNA - "Brocade 1010/1020 10Gb Ethernet Driver support"
+announce BNA - "Brocade 1010/1020 10Gb Ethernet Driver support"
 clean_blob drivers/net/bna/bnad.c
 clean_blob drivers/net/bna/cna.h
 reject_firmware drivers/net/bna/cna_fwimg.c
@@ -1066,8 +1103,8 @@ clean_mk CONFIG_FT1000_PCMCIA drivers/staging/ft1000/Makefile
 
 announce FT1000_USB - "Driver for ft1000 USB devices."
 clean_file drivers/staging/ft1000/ft1000-usb/ft3000.img
-reject_firmware drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
-clean_blob drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+reject_firmware drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
+clean_blob drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
 clean_kconfig drivers/staging/ft1000/Kconfig 'FT1000_USB'
 clean_mk CONFIG_FT1000_USB drivers/staging/ft1000/Makefile
 
@@ -1195,24 +1232,28 @@ clean_blob drivers/net/pcmcia/smc91c92_cs.c
 clean_kconfig drivers/net/pcmcia/Kconfig 'PCMCIA_SMC91C92'
 clean_mk CONFIG_PCMCIA_SMC91C92 drivers/net/pcmcia/Makefile
 
-announce PCCARD - "PCCard (PCMCIA/CardBus) support"
-reject_firmware drivers/pcmcia/ds.c
-clean_kconfig drivers/pcmcia/Kconfig 'PCCARD'
-clean_mk CONFIG_PCCARD drivers/pcmcia/Makefile
+# CIS files are not software.
+# announce PCCARD - "PCCard (PCMCIA/CardBus) support"
+# reject_firmware drivers/pcmcia/ds.c
+# clean_kconfig drivers/pcmcia/Kconfig 'PCCARD'
+# clean_mk CONFIG_PCCARD drivers/pcmcia/Makefile
 
 announce PCMCIA_3C574 - "3Com 3c574 PCMCIA support"
+# This is not software; it's Free, but GPLed without in-tree sources.
 drop_fw_file firmware/cis/3CCFEM556.cis.ihex firmware/cis/3CCFEM556.cis
-clean_blob drivers/net/pcmcia/3c574_cs.c
-clean_kconfig drivers/net/pcmcia/Kconfig 'PCMCIA_3C574'
-clean_mk CONFIG_PCMCIA_3C574 drivers/net/pcmcia/Makefile
+clean_blob drivers/net/pcmcia/3c574_cs.c
+clean_kconfig drivers/net/pcmcia/Kconfig 'PCMCIA_3C574'
+clean_mk CONFIG_PCMCIA_3C574 drivers/net/pcmcia/Makefile
 
 announce PCMCIA_3C589 - "3Com 3c589 PCMCIA support"
+# This is not software; it's Free, but GPLed without in-tree sources.
 drop_fw_file firmware/cis/3CXEM556.cis.ihex firmware/cis/3CXEM556.cis
-clean_blob drivers/net/pcmcia/3c589_cs.c
-clean_kconfig drivers/net/pcmcia/Kconfig 'PCMCIA_3C589'
-clean_mk CONFIG_PCMCIA_3C589 drivers/net/pcmcia/Makefile
+clean_blob drivers/net/pcmcia/3c589_cs.c
+clean_kconfig drivers/net/pcmcia/Kconfig 'PCMCIA_3C589'
+clean_mk CONFIG_PCMCIA_3C589 drivers/net/pcmcia/Makefile
 
 announce PCMCIA_PCNET - "NE2000 compatible PCMCIA support"
+# These are not software; they're Free, but GPLed without in-tree sources.
 drop_fw_file firmware/cis/LA-PCM.cis.ihex firmware/cis/LA-PCM.cis
 drop_fw_file firmware/cis/PCMLM28.cis.ihex firmware/cis/PCMLM28.cis
 drop_fw_file firmware/cis/DP83903.cis.ihex firmware/cis/DP83903.cis
@@ -1220,14 +1261,15 @@ drop_fw_file firmware/cis/NE2K.cis.ihex firmware/cis/NE2K.cis
 drop_fw_file firmware/cis/tamarack.cis.ihex firmware/cis/tamarack.cis
 drop_fw_file firmware/cis/PE-200.cis.ihex firmware/cis/PE-200.cis
 drop_fw_file firmware/cis/PE520.cis.ihex firmware/cis/PE520.cis
-clean_blob drivers/net/pcmcia/pcnet_cs.c
-clean_kconfig drivers/net/pcmcia/Kconfig 'PCMCIA_PCNET'
-clean_mk CONFIG_PCMCIA_PCNET drivers/net/pcmcia/Makefile
+clean_blob drivers/net/pcmcia/pcnet_cs.c
+clean_kconfig drivers/net/pcmcia/Kconfig 'PCMCIA_PCNET'
+clean_mk CONFIG_PCMCIA_PCNET drivers/net/pcmcia/Makefile
 
 # tokenring
 
 announce 3C359 - "3Com 3C359 Token Link Velocity XL adapter"
 drop_fw_file firmware/3com/3C359.bin.ihex firmware/3com/3C359.bin
+reject_firmware drivers/net/tokenring/3c359.c
 clean_blob drivers/net/tokenring/3c359.c
 clean_kconfig drivers/net/tokenring/Kconfig '3C359'
 clean_mk CONFIG_3C359 drivers/net/tokenring/Makefile
@@ -1320,18 +1362,27 @@ clean_blob drivers/net/wireless/orinoco/orinoco_usb.c
 clean_kconfig drivers/net/wireless/orinoco/Kconfig 'ORINOCO_USB'
 clean_mk CONFIG_ORINOCO_USB drivers/net/wireless/orinoco/Makefile
 
-announce WLAGS49_H2 - 'Agere Systems HERMES II Wireless PC Card Model 0110'
+announce WLAGS49_H2 - "Agere Systems HERMES II Wireless PC Card Model 0110"
 # Some pieces of the firmware images are most definitely data, but
 # others seem to be code.
-clean_file drivers/staging/wlags49_h2/ap_h2.c
-clean_file drivers/staging/wlags49_h2/sta_h2.c
+clean_blob drivers/staging/wlags49_h2/ap_h2.c
+clean_blob drivers/staging/wlags49_h2/sta_h2.c
+echo 'extern int deblobbed; /*(DEBLOBBED)*/' > drivers/staging/wlags49_h2/ap_h2.c
+echo 'extern int deblobbed; /*(DEBLOBBED)*/' > drivers/staging/wlags49_h2/sta_h2.c
 clean_blob drivers/staging/wlags49_h2/wl_profile.c
+clean_sed '
+  s,\(.*hcf_status = \)dhf_download_fw(.*&fw_image );,//& /*(DEBLOBBED)*/\n\1HCF_ERR_INCOMP_FW;,
+' drivers/staging/wlags49_h2/wl_main.c 'reject built-in non-Free firmware'
 clean_kconfig drivers/staging/wlags49_h2/Kconfig 'WLAGS49_H2'
 clean_mk CONFIG_WLAGS49_H2 drivers/staging/Makefile
 
-announce WLAGS49_H25 - 'Linksys Systems HERMES II.5 Wireless-G_CompactFlash_Card'
-clean_file drivers/staging/wlags49_h2/ap_h25.c
-clean_file drivers/staging/wlags49_h2/sta_h25.c
+announce WLAGS49_H25 - "Linksys Systems HERMES II.5 Wireless-G_CompactFlash_Card"
+# Some pieces of the firmware images are most definitely data, but
+# others seem to be code.
+clean_blob drivers/staging/wlags49_h2/ap_h25.c
+clean_blob drivers/staging/wlags49_h2/sta_h25.c
+echo 'extern int deblobbed; /*(DEBLOBBED)*/' > drivers/staging/wlags49_h2/ap_h25.c
+echo 'extern int deblobbed; /*(DEBLOBBED)*/' > drivers/staging/wlags49_h2/sta_h25.c
 clean_kconfig drivers/staging/wlags49_h25/Kconfig 'WLAGS49_H25'
 clean_mk CONFIG_WLAGS49_H25 drivers/staging/Makefile
 
@@ -1390,10 +1441,12 @@ announce LIBERTAS - "Marvell 8xxx Libertas WLAN driver support"
 reject_firmware drivers/net/wireless/libertas/main.c '
 /Try user-specified firmware first/{
   :end1
-  /request_firmware/! {N; b end1;};
+  /request_firmware(helper, user_helper/! {N; b end1;};
   :end2
-  /request_firmware.*request_firmware/! {N; b end2;};
-  /request_firmware(helper, user_helper.*request_firmware(nfw, user_mainfw/{p; d;};
+  /request_firmware(helper, user_helper.*request_firmware(mainfw, user_mainfw/! {N; b end2;};
+  /request_firmware(helper, user_helper.*request_firmware(mainfw, user_mainfw/{
+    /request_firmware.*request_firmware.*request_firmware/!{p; d;};
+  }
 }
 '
 clean_kconfig drivers/net/wireless/Kconfig 'LIBERTAS'
@@ -1433,7 +1486,7 @@ clean_blob drivers/net/wireless/libertas_tf/if_usb.c
 clean_kconfig drivers/net/wireless/Kconfig 'LIBERTAS_THINFIRM_USB'
 clean_mk CONFIG_LIBERTAS_THINFIRM_USB drivers/net/wireless/libertas_tf/Makefile
 
-announce MWL8K - 'Marvell 88W8xxx PCI/PCIe Wireless support'
+announce MWL8K - "Marvell 88W8xxx PCI/PCIe Wireless support"
 reject_firmware drivers/net/wireless/mwl8k.c
 clean_blob drivers/net/wireless/mwl8k.c
 clean_kconfig drivers/net/wireless/Kconfig 'MWL8K'
@@ -1486,7 +1539,7 @@ clean_blob drivers/net/wireless/p54/p54usb.h
 clean_kconfig drivers/net/wireless/p54/Kconfig 'P54_USB'
 clean_mk CONFIG_P54_USB drivers/net/wireless/p54/Makefile
 
-announce PRISM54 - 'Intersil Prism GT/Duette/Indigo PCI/Cardbus'
+announce PRISM54 - "Intersil Prism GT/Duette/Indigo PCI/Cardbus"
 reject_firmware drivers/net/wireless/prism54/islpci_dev.c
 clean_blob drivers/net/wireless/prism54/islpci_dev.c
 clean_kconfig drivers/net/wireless/Kconfig 'PRISM54'
@@ -1555,7 +1608,7 @@ clean_sed '
   'disabling non-Free firmware loading machinery'
 clean_blob drivers/staging/rtl8712/hal_init.c
 clean_kconfig drivers/staging/rtl8712/Kconfig 'R8712U'
-clean_mk CONFIG_R8712U drivers/staging/rtl8712/Maekfile
+clean_mk CONFIG_R8712U drivers/staging/rtl8712/Makefile
 
 announce VT6656 - "VIA Technologies VT6656 support"
 clean_sed '
@@ -1696,16 +1749,21 @@ clean_mk CONFIG_MISDN_SPEEDFAX drivers/isdn/hardware/mISDN/Makefile
 ##########
 
 announce SERIAL_8250_CS - "8250/16550 PCMCIA device support"
+# These are not software; they're Free, but GPLed without in-tree sources.
 drop_fw_file firmware/cis/MT5634ZLX.cis.ihex firmware/cis/MT5634ZLX.cis
 drop_fw_file firmware/cis/RS-COM-2P.cis.ihex firmware/cis/RS-COM-2P.cis
 drop_fw_file firmware/cis/COMpad2.cis.ihex firmware/cis/COMpad2.cis
 drop_fw_file firmware/cis/COMpad4.cis.ihex firmware/cis/COMpad4.cis
+# These are not software; they're Free, but GPLed without textual sources.
+# It could be assumed that these binaries *are* sources, since they
+# can be trivially converted back to a textual form, without loss,
+# but we're better off safe than sorry, so remove them from our tree.
 drop_fw_file firmware/cis/SW_555_SER.cis.ihex firmware/cis/SW_555_SER.cis
 drop_fw_file firmware/cis/SW_7xx_SER.cis.ihex firmware/cis/SW_7xx_SER.cis
 drop_fw_file firmware/cis/SW_8xx_SER.cis.ihex firmware/cis/SW_8xx_SER.cis
-clean_blob drivers/serial/serial_cs.c
-clean_kconfig drivers/serial/Kconfig 'SERIAL_8250_CS'
-clean_mk CONFIG_SERIAL_8250_CS drivers/serial/Makefile
+clean_blob drivers/serial/serial_cs.c
+clean_kconfig drivers/serial/Kconfig 'SERIAL_8250_CS'
+clean_mk CONFIG_SERIAL_8250_CS drivers/serial/Makefile
 
 announce SERIAL_ICOM - "IBM Multiport Serial Adapter"
 reject_firmware drivers/serial/icom.c
@@ -1726,7 +1784,7 @@ clean_mk CONFIG_SERIAL_QE drivers/serial/Makefile
 announce TOUCHSCREEN_QT602240 - "QT602240 I2C Touchscreen"
 reject_firmware drivers/input/touchscreen/qt602240_ts.c
 clean_blob drivers/input/touchscreen/qt602240_ts.c
-clean_kconfig drivers/net/Kconfig 'TOUCHSCREEN_QT602240'
+clean_kconfig drivers/input/touchscreen/Kconfig 'TOUCHSCREEN_QT602240'
 clean_mk CONFIG_TOUCHSCREEN_QT602240 drivers/input/touchscreen/Makefile
 
 announce LIRC_ZILOG - "Zilog/Hauppauge IR Transmitter"
@@ -1796,6 +1854,7 @@ clean_kconfig drivers/scsi/aic94xx/Kconfig 'SCSI_AIC94XX'
 clean_mk CONFIG_SCSI_AIC94XX drivers/scsi/aic94xx/Makefile
 
 announce SCSI_BFA_FC - "Brocade BFA Fibre Channel Support"
+clean_blob drivers/scsi/bfa/bfad_im.h
 reject_firmware drivers/scsi/bfa/bfad.c
 clean_blob drivers/scsi/bfa/bfad.c
 clean_kconfig drivers/scsi/Kconfig 'SCSI_BFA_FC'