Skip to content
Snippets Groups Projects
deblob-4.8 140 KiB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000
#! /bin/sh

#    Copyright (C) 2008-2016 Alexandre Oliva <lxoliva@fsfla.org>
#    Copyright (C) 2008 Jeff Moe
#    Copyright (C) 2009 Rubén Rodríguez <ruben@gnu.org>
#
#    This program is part of GNU Linux-libre, a GNU project that
#    publishes scripts to clean up Linux so as to make it suitable for
#    use in the GNU Project and in Free System Distributions.
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA


# deblob - remove non-free blobs from the vanilla linux kernel

# http://www.fsfla.org/svn/fsfla/software/linux-libre


# This script, suited for the kernel version named below, in kver,
# attempts to remove only non-Free Software bits, without removing
# Free Software that happens to be in the same file.

# Drivers that currently require non-Free firmware are retained, but
# firmware included in GPLed sources is replaced with /*(DEBLOBBED)*/
# if the deblob-check script, that knows how to do this, is present.
# -lxoliva


# See also:
# http://wiki.debian.org/KernelFirmwareLicensing
# svn://svn.debian.org/kernel/dists/trunk/linux-2.6/debian/patches/debian/dfsg/files-1
# 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=4.8 extra=

case $1 in
--force)
  echo "WARNING: Using the force, ignored errors will be" >&2
  die () {
    echo ERROR: "$@" >&2
    errors=:
  }
  forced=: errors=false
  shift
  ;;
*)
  set -e
  die () {
    echo ERROR: "$@" >&2
    echo Use --force to ignore
    exit 1
  }
  forced=false errors=false
  ;;
esac

check=`echo "$0" | sed 's,[^/]*$,,;s,^$,.,;s,/*$,,'`/deblob-check
if [ ! -f $check ] ; then
  if $forced; then
    die deblob-check script missing, will remove entire files
  else
    die deblob-check script missing
  fi
  have_check=false
else
  have_check=:
  [ -x $check ] || check="/bin/sh $check"
fi

filetest () {
  if [ ! -f $1 ]; then
    die $1 does not exist, something is wrong && return 1
  fi
}

announce () {
  echo
  echo "$@"
}

clean_file () {
  #$1 = filename
  filetest $1 || return 0
  rm $1
  echo $1: removed
}

check_changed () {
  #$1 = filename
  if cmp $1.deblob $1 > /dev/null; then
    rm $1.deblob
    die $1 did not change, something is wrong && return 1
  fi
  mv $1.deblob $1
}

clean_blob () {
  #$1 = filename
  filetest $1 || return 0
  if $have_check; then
    name=$1
    set fnord "$@" -d
    shift 2
    if $check "$@" -i linux-$kver $name > $name.deblob; then
      if [ ! -s $name.deblob ]; then
	die got an empty file after removing blobs from $name
      fi
    else
      die failed removing blobs from $name
    fi
    check_changed $name && echo $name: removed blobs
  else
    clean_file $1
  fi
}

dummy_blob () {
  #$1 = filename
  if test -f $1; then
    die $1 exists, something is wrong && return 0
  elif test ! -f firmware/Makefile; then
    die firmware/Makefile does not exist, something is wrong && return 0
  fi

  clean_sed "s,`echo $1 | sed s,^firmware/,,`,\$(DEBLOBBED),g" \
    firmware/Makefile "dropped $1"
}

clean_fw () {
  #$1 = firmware text input, $2 = firmware output
  filetest $1 || return 0
  if test -f $2; then
    die $2 exists, something is wrong && return 0
  fi
  clean_blob $1 -s 4
  dummy_blob $2
}

drop_fw_file () {
  #$1 = firmware text input, $2 = firmware output
  filetest $1 || return 0
  if test -f $2; then
    die $2 exists, something is wrong && return 0
  fi
  clean_file $1
  dummy_blob $2
}

clean_kconfig () {
  #$1 = filename $2 = things to remove
  case $1 in
  -f)
    shift
    ;;
  *)
    if $have_check; then
      filetest $1 || return 0
      if sed -n "/^\(menu\)\?config $2$/p" $1 | grep . > /dev/null; then
	:
      else
	die $1 does not contain matches for $2
      fi      
      return 0
    fi
    ;;
  esac
  filetest $1 || return 0
  sed "/^config \\($2\\)\$/{p;i\
	depends on NONFREE
d;}" $1 > $1.deblob
  check_changed $1 && echo $1: marked config $2 as depending on NONFREE
}

clean_mk () {
  #$1 = config $2 = Makefile name
  # We don't clean up Makefiles any more --lxoliva
  # sed -i "/\\($1\\)/d" $2
  # echo $2: removed $1 support
  # check_changed $2
  filetest $2 || return 0
  if sed -n "/\\($1\\)/p" $2 | grep . > /dev/null; then
    :
  else
    die $2 does not contain matches for $1
  fi
}

clean_sed () {
  #$1 = sed-script $2 = file $3 = comment
  filetest $2 || return 0
  sed -e "$1" "$2" > "$2".deblob || {
    die $2: failed: ${3-applied sed script $1} && return 0; }
  check_changed $2 && echo $2: ${3-applied sed script $1}
}

reject_firmware () {
  #$1 = file $2 = pre sed pattern
  filetest $1 || return 0
  clean_sed "$2"'
s,\(^\|[^>.0-9a-zA-Z_$]\)request\(_ihex\)\?_firmware\(_nowait\|_direct\)\?\($\|[^-.0-9a-zA-Z_$),; ]\),\1reject_firmware\3\4,g
' "$1" 'disabled non-Free firmware-loading machinery'
}

maybe_reject_firmware () {
  #$1 = file $2 = pre sed pattern
  filetest $1 || return 0
  clean_sed "$2"'
s,\(^\|[^>.0-9a-zA-Z_$]\)request_\(ihex_\)\?firmware\(_nowait\|_direct\)\?\($\|[^-.0-9a-zA-Z_$),; ]\),\1maybe_reject_\2firmware\3\4,g
' "$1" 'retain Free firmware-loading machinery, disabling non-Free one'
}

undefine_macro () {
  #$1 - macro name
  #$2 - substitution
  #$3 - message
  #rest - file names
  macro=$1 repl=$2 msg=$3; shift 3
  for f in "$@"; do
    clean_sed "
s,^#define $macro .*\$,/*(DEBLOBBED)*/,;
s,$macro,$repl,g;
" "$f" "$msg"
  done
}

undefault_firmware () {
  #$1 - pattern such that $1_DEFAULT_FIRMWARE is #defined to non-Free firmware
  #$@ other than $1 - file names
  macro="$1"_DEFAULT_FIRMWARE; shift
  undefine_macro "$macro" "\"/*(DEBLOBBED)*/\"" \
    "disabled non-Free firmware" "$@"
}

# First, check that files that contain firmwares and their
# corresponding sources are present.

for f in \
    drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/com.fuc \
    drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/gf100.fuc3 \
  drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/gf100.fuc3.h \
    drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/gt215.fuc3 \
  drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/gt215.fuc3.h \
\
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/macros.fuc \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/com.fuc \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf100.fuc3 \
  drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf100.fuc3.h \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf117.fuc3 \
  drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf117.fuc3.h \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk104.fuc3 \
  drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk104.fuc3.h \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk110.fuc3 \
  drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk110.fuc3.h \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk208.fuc5 \
  drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk208.fuc5.h \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5 \
  drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hub.fuc \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgf100.fuc3 \
  drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgf100.fuc3.h \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgf117.fuc3 \
  drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgf117.fuc3.h \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk104.fuc3 \
  drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk104.fuc3.h \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk110.fuc3 \
  drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk110.fuc3.h \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk208.fuc5 \
  drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk208.fuc5.h \
    drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5 \
  drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5.h \
\
    drivers/gpu/drm/nouveau/nvkm/engine/sec/fuc/g98.fuc0s \
  drivers/gpu/drm/nouveau/nvkm/engine/sec/fuc/g98.fuc0s.h \
\
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc \
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/kernel.fuc \
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/arith.fuc \
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/host.fuc \
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/memx.fuc \
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc \
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/i2c_.fuc \
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/test.fuc \
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/idle.fuc \
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3 \
  drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h \
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4 \
  drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h \
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5 \
  drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h \
    drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3 \
  drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h \
\
  drivers/net/wan/wanxlfw.inc_shipped \
    drivers/net/wan/wanxlfw.S \
  drivers/net/wireless/atmel/atmel.c \
    drivers/net/wireless/atmel/atmel.c \
  drivers/scsi/aic7xxx/aic79xx_seq.h_shipped \
    drivers/scsi/aic7xxx/aic79xx.seq \
  drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped \
    drivers/scsi/aic7xxx/aic7xxx.seq \
  drivers/scsi/53c700_d.h_shipped \
    drivers/scsi/53c700.scr \
  drivers/scsi/sym53c8xx_2/sym_fw1.h \
    drivers/scsi/sym53c8xx_2/sym_fw1.h \
  drivers/scsi/sym53c8xx_2/sym_fw2.h \
    drivers/scsi/sym53c8xx_2/sym_fw2.h \
  firmware/dsp56k/bootstrap.bin.ihex \
    firmware/dsp56k/bootstrap.asm \
  firmware/keyspan_pda/keyspan_pda.HEX \
    firmware/keyspan_pda/keyspan_pda.S \
  firmware/keyspan_pda/xircom_pgs.HEX \
    firmware/keyspan_pda/xircom_pgs.S \
; do
  filetest $f || :
done

# Identify the tarball.
grep -q 'EXTRAVERSION.*-gnu' Makefile ||
clean_sed "/^EXTRAVERSION *=/ { s,=$,& ,; s,$,&-gnu$extra,; }
" Makefile 'added -gnu to EXTRAVERSION'

grep -q Linux-libre README ||
clean_sed '
1,3 s,Linux kernel release.*kernel\.org.*,GNU Linux-libre <http://linux-libre.fsfla.org>,
2,5 s,Linux version [0-9.]*[0-9],GNU Linux-libre,
1,20 s,\(operating system \)\?Unix,Unix kernel,
/WHAT IS LINUX/i\
WHAT IS GNU Linux-libre?\
\
  GNU 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.  In 2012, it\
  became part of the GNU Project.\
\
  The GNU 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 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 GNU Linux-libre'

# Add reject_firmware and maybe_reject_firmware
grep -q _LINUX_LIBRE_FIRMWARE_H include/linux/firmware.h ||
clean_sed '$i\
#ifndef _LINUX_LIBRE_FIRMWARE_H\
#define _LINUX_LIBRE_FIRMWARE_H\
\
#include <linux/device.h>\
\
#define NONFREE_FIRMWARE "/*(DEBLOBBED)*/"\
\
static inline int\
is_nonfree_firmware(const char *name)\
{\
  return strstr(name, NONFREE_FIRMWARE) != 0;\
}\
\
static inline int\
report_missing_free_firmware(const char *name, const char *what)\
{\
	printk(KERN_ERR "%s: Missing Free %s (non-Free firmware loading is disabled)\\n", name,\
	       what ? what : "firmware");\
	return -EINVAL;\
}\
static inline int\
reject_firmware(const struct firmware **fw,\
		const char *name, struct device *device)\
{\
	const struct firmware *xfw = NULL;\
	int retval;\
	report_missing_free_firmware(dev_name(device), NULL);\
	retval = request_firmware(&xfw, NONFREE_FIRMWARE, device);\
	if (!retval)\
		release_firmware(xfw);\
	return -EINVAL;\
}\
static inline int\
maybe_reject_firmware(const struct firmware **fw,\
		      const char *name, struct device *device)\
{\
	if (is_nonfree_firmware(name))\
		return reject_firmware(fw, name, device);\
	else\
		return request_firmware(fw, name, device);\
}\
static inline int\
reject_firmware_direct(const struct firmware **fw,\
		const char *name, struct device *device)\
{\
	const struct firmware *xfw = NULL;\
	int retval;\
	report_missing_free_firmware(dev_name(device), NULL);\
	retval = request_firmware_direct(&xfw, NONFREE_FIRMWARE, device);\
	if (!retval)\
		release_firmware(xfw);\
	return -EINVAL;\
}\
static inline void\
discard_rejected_firmware(const struct firmware *fw, void *context)\
{\
	release_firmware(fw);\
}\
static inline int\
reject_firmware_nowait(struct module *module, int uevent,\
		       const char *name, struct device *device,\
		       gfp_t gfp, void *context,\
		       void (*cont)(const struct firmware *fw,\
				    void *context))\
{\
	int retval;\
	report_missing_free_firmware(dev_name(device), NULL);\
	retval = request_firmware_nowait(module, uevent, NONFREE_FIRMWARE,\
					 device, gfp, NULL,\
					 discard_rejected_firmware);\
	if (retval)\
		return retval;\
	return -EINVAL;\
}\
static inline int\
maybe_reject_firmware_nowait(struct module *module, int uevent,\
			     const char *name, struct device *device,\
			     gfp_t gfp, void *context,\
			     void (*cont)(const struct firmware *fw,\
					  void *context))\
{\
	if (is_nonfree_firmware(name))\
		return reject_firmware_nowait(module, uevent, name,\
					      device, gfp, context, cont);\
	else\
		return request_firmware_nowait(module, uevent, name,\
					       device, gfp, context, cont);\
}\
\
#endif /* _LINUX_LIBRE_FIRMWARE_H */\
' include/linux/firmware.h 'added non-Free firmware notification support'

grep -q _LINUX_LIBRE_IHEX_FIRMWARE_H include/linux/ihex.h ||
clean_sed '$i\
#ifndef _LINUX_LIBRE_IHEX_H\
#define _LINUX_LIBRE_IHEX_H\
\
static inline int\
maybe_reject_ihex_firmware(const struct firmware **fw,\
			   const char *name, struct device *device)\
{\
	if (strstr (name, NONFREE_FIRMWARE))\
		return reject_firmware(fw, name, device);\
	else\
		return request_ihex_firmware(fw, name, device);\
}\
\
#endif /* _LINUX_LIBRE_IHEX_H */\
' include/linux/ihex.h 'added non-Free ihex firmware notification support'

clean_sed '
s,\(timeout = \)\(firmware_loading_timeout()\),\1is_nonfree_firmware(name) ? 1 : \2,
' drivers/base/firmware_class.c 'shorten non-Free firmware fail-to-load timeout'


########
# Arch #
########

# x86

announce MICROCODE_AMD - "AMD microcode patch loading support"
reject_firmware arch/x86/kernel/cpu/microcode/amd.c
clean_blob arch/x86/kernel/cpu/microcode/amd.c
clean_kconfig arch/x86/Kconfig MICROCODE_AMD
clean_mk CONFIG_MICROCODE_AMD arch/x86/kernel/cpu/microcode/Makefile

announce MICROCODE_INTEL - "Intel microcode patch loading support"
reject_firmware arch/x86/kernel/cpu/microcode/intel.c
clean_blob arch/x86/kernel/cpu/microcode/intel.c
clean_kconfig arch/x86/Kconfig MICROCODE_INTEL
clean_mk CONFIG_MICROCODE_INTEL arch/x86/kernel/cpu/microcode/Makefile

announce MICROCODE_EARLY - "Early load microcode"
clean_blob Documentation/x86/early-microcode.txt

# arm

announce IXP4XX_NPE - "IXP4xx Network Processor Engine support"
reject_firmware arch/arm/mach-ixp4xx/ixp4xx_npe.c
clean_blob arch/arm/mach-ixp4xx/ixp4xx_npe.c
clean_blob Documentation/arm/IXP4xx
clean_kconfig arch/arm/mach-ixp4xx/Kconfig IXP4XX_NPE
clean_mk CONFIG_IXP4XX_NPE arch/arm/mach-ixp4xx/Makefile

announce ARCH_NETX - "Hilscher NetX based"
clean_sed '
s,\([" ]\)request_firmware(,\1reject_firmware(,
' arch/arm/mach-netx/xc.c 'disabled non-Free firmware-loading machinery'
clean_blob arch/arm/mach-netx/xc.c
clean_blob drivers/net/ethernet/netx-eth.c
clean_kconfig arch/arm/Kconfig ARCH_NETX
clean_mk CONFIG_ARCH_NETX arch/arm/Makefile

# mips

# I couldn't figure out where the firmware name actually comes from.
# If it's from some user-set property, we could reenable it.  -lxo
announce XRX200_PHY_FW - "XRX200 PHY firmware loader"
reject_firmware arch/mips/lantiq/xway/xrx200_phy_fw.c
clean_kconfig arch/mips/lantiq/Kconfig XRX200_PHY_FW
clean_mk CONFIG_XRX200_PHY_FW arch/mips/lantiq/xway/Makefile

#######
# ATM #
#######

announce ATM_AMBASSADOR - "Madge Ambassador, Collage PCI 155 Server"
reject_firmware drivers/atm/ambassador.c
clean_blob drivers/atm/ambassador.c
clean_fw firmware/atmsar11.HEX firmware/atmsar11.fw
clean_kconfig drivers/atm/Kconfig ATM_AMBASSADOR
clean_mk CONFIG_ATM_AMBASSADOR drivers/atm/Makefile

announce ATM_FORE200E - "FORE Systems 200E-series"
reject_firmware drivers/atm/fore200e.c
clean_blob drivers/atm/fore200e.c
clean_blob Documentation/networking/fore200e.txt
clean_blob drivers/atm/.gitignore
clean_blob Documentation/dontdiff
clean_kconfig drivers/atm/Kconfig ATM_FORE200E
clean_mk CONFIG_ATM_FORE200E drivers/atm/Makefile

announce ATM_SOLOS - "Solos ADSL2+ PCI Multiport card driver"
reject_firmware drivers/atm/solos-pci.c
clean_blob drivers/atm/solos-pci.c
clean_kconfig drivers/atm/Kconfig ATM_SOLOS
clean_mk CONFIG_ATM_SOLOS drivers/atm/Makefile

##########
# Crypto #
##########

announce CRYPTO_DEV_QAT_DH895xCC - "Support for Intel(R) DH895xCC"
clean_blob drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h
clean_blob drivers/crypto/qat/qat_dh895xcc/adf_drv.c
clean_kconfig drivers/crypto/qat/Kconfig CRYPTO_DEV_QAT_DH895xCC
clean_mk CONFIG_CRYPTO_DEV_QAT_DH895xCC drivers/crypto/qat/Makefile

announce CRYPTO_DEV_QAT - "Common bits for Intel(R) QuickAssist Technology"
reject_firmware drivers/crypto/qat/qat_common/adf_accel_engine.c
clean_kconfig drivers/crypto/qat/Kconfig CRYPTO_DEV_QAT
clean_mk CONFIG_CRYPTO_DEV_QAT drivers/crypto/qat/Makefile

announce CRYPTO_DEV_QAT_C3XXX - "Support for Intel(R) C3XXX"
clean_blob drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.h
clean_kconfig drivers/crypto/qat/Kconfig CRYPTO_DEV_QAT_C3XXX
clean_mk CONFIG_CRYPTO_DEV_QAT_C3XXX drivers/crypto/qat/Makefile

announce CRYPTO_DEV_QAT_C62X - "Support for Intel(R) C62X"
clean_blob drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.h
clean_kconfig drivers/crypto/qat/Kconfig CRYPTO_DEV_QAT_C62X
clean_mk CONFIG_CRYPTO_DEV_QAT_C62X drivers/crypto/qat/Makefile

########
# tty #
########

announce CYCLADES - "Cyclades async mux support"
reject_firmware drivers/tty/cyclades.c
clean_blob drivers/tty/cyclades.c
clean_kconfig drivers/tty/Kconfig CYCLADES
clean_mk CONFIG_CYCLADES drivers/tty/Makefile

announce ISI - "Multi-Tech multiport card support"
reject_firmware drivers/tty/isicom.c
clean_blob drivers/tty/isicom.c
clean_kconfig drivers/tty/Kconfig ISI
clean_mk CONFIG_ISI drivers/tty/Makefile

announce MOXA_INTELLIO - "Moxa Intellio support"
reject_firmware drivers/tty/moxa.c
clean_blob drivers/tty/moxa.c
clean_kconfig drivers/tty/Kconfig MOXA_INTELLIO
clean_mk CONFIG_MOXA_INTELLIO drivers/tty/Makefile

# gpu drm

announce DRM_AMDGPU - "AMD GPU"
reject_firmware drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
clean_blob drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
reject_firmware drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
clean_blob drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
reject_firmware drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
clean_blob drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
reject_firmware drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
clean_blob drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
reject_firmware drivers/gpu/drm/amd/amdgpu/iceland_dpm.c
clean_blob drivers/gpu/drm/amd/amdgpu/iceland_dpm.c
reject_firmware drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
clean_blob drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
reject_firmware drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
clean_blob drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
reject_firmware drivers/gpu/drm/amd/amdgpu/fiji_dpm.c
clean_blob drivers/gpu/drm/amd/amdgpu/fiji_dpm.c
reject_firmware drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
clean_blob drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
reject_firmware drivers/gpu/drm/amd/amdgpu/tonga_dpm.c
clean_blob drivers/gpu/drm/amd/amdgpu/tonga_dpm.c
clean_blob drivers/gpu/drm/amd/amdgpu/vi.c
clean_kconfig drivers/gpu/drm/Kconfig DRM_AMDGPU
clean_mk CONFIG_DRM_AMDGPU drivers/gpu/drm/amd/amdgpu/Makefile

announce DRM_AMDGPU_CIK - "Enable amdgpu support for CIK parts"
reject_firmware drivers/gpu/drm/amd/amdgpu/ci_dpm.c
clean_blob drivers/gpu/drm/amd/amdgpu/ci_dpm.c
reject_firmware drivers/gpu/drm/amd/amdgpu/cik_sdma.c
clean_blob drivers/gpu/drm/amd/amdgpu/cik_sdma.c
reject_firmware drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
clean_blob drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
reject_firmware drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
clean_blob drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
clean_kconfig drivers/gpu/drm/amd/amdgpu/Kconfig DRM_AMDGPU_CIK
clean_mk CONFIG_DRM_AMDGPU_CIK drivers/gpu/drm/amd/amdgpu/Makefile

announce DRM_AST - "AST server chips"
reject_firmware drivers/gpu/drm/ast/ast_dp501.c
clean_blob drivers/gpu/drm/ast/ast_dp501.c
clean_kconfig drivers/gpu/drm/ast/Kconfig DRM_AST
clean_mk CONFIG_DRM_AST drivers/gpu/drm/ast/Makefile

announce DRM_I915 - "Intel 8xx/9xx/G3x/G4x/HD Graphics"
reject_firmware drivers/gpu/drm/i915/intel_csr.c
reject_firmware drivers/gpu/drm/i915/intel_guc_loader.c
clean_blob drivers/gpu/drm/i915/intel_csr.c
clean_blob drivers/gpu/drm/i915/intel_guc_loader.c
clean_kconfig drivers/gpu/drm/i915/Kconfig DRM_I915
clean_mk CONFIG_DRM_I915 drivers/gpu/drm/i915/Makefile

announce DRM_NOUVEAU - "Nouveau (nVidia) cards"
reject_firmware drivers/gpu/drm/nouveau/nvkm/core/firmware.c
clean_blob drivers/gpu/drm/nouveau/nvkm/core/firmware.c
reject_firmware drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
clean_blob drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
reject_firmware drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c
clean_blob drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c
clean_blob drivers/gpu/drm/nouveau/nouveau_platform.c
clean_blob drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c
clean_blob drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c
clean_kconfig drivers/gpu/drm/nouveau/Kconfig DRM_NOUVEAU
clean_mk CONFIG_DRM_NOUVEAU drivers/gpu/drm/Makefile

announce DRM_MGA - "Matrox g200/g400"
drop_fw_file firmware/matrox/g200_warp.H16 firmware/matrox/g200_warp.fw
drop_fw_file firmware/matrox/g400_warp.H16 firmware/matrox/g400_warp.fw
reject_firmware drivers/gpu/drm/mga/mga_warp.c
clean_blob drivers/gpu/drm/mga/mga_warp.c
clean_kconfig drivers/gpu/drm/Kconfig DRM_MGA
clean_mk CONFIG_DRM_MGA drivers/gpu/drm/Makefile

announce DRM_MSM - "MSM DRM"
reject_firmware drivers/gpu/drm/msm/adreno/adreno_gpu.c
clean_blob drivers/gpu/drm/msm/adreno/adreno_device.c
clean_kconfig drivers/gpu/drm/msm/Kconfig DRM_MSM
clean_mk CONFIG_DRM_MSM drivers/gpu/drm/msm/Makefile

announce DRM_R128 - "ATI Rage 128"
drop_fw_file firmware/r128/r128_cce.bin.ihex firmware/r128/r128_cce.bin
reject_firmware drivers/gpu/drm/r128/r128_cce.c
clean_blob drivers/gpu/drm/r128/r128_cce.c
clean_kconfig drivers/gpu/drm/Kconfig DRM_R128
clean_mk CONFIG_DRM_R128 drivers/gpu/drm/Makefile

announce DRM_RADEON - "ATI Radeon"
drop_fw_file firmware/radeon/R100_cp.bin.ihex firmware/radeon/R100_cp.bin
drop_fw_file firmware/radeon/R200_cp.bin.ihex firmware/radeon/R200_cp.bin
drop_fw_file firmware/radeon/R300_cp.bin.ihex firmware/radeon/R300_cp.bin
drop_fw_file firmware/radeon/R420_cp.bin.ihex firmware/radeon/R420_cp.bin
drop_fw_file firmware/radeon/R520_cp.bin.ihex firmware/radeon/R520_cp.bin
drop_fw_file firmware/radeon/R600_me.bin.ihex firmware/radeon/R600_me.bin
drop_fw_file firmware/radeon/R600_pfp.bin.ihex firmware/radeon/R600_pfp.bin
drop_fw_file firmware/radeon/RS600_cp.bin.ihex firmware/radeon/RS600_cp.bin
drop_fw_file firmware/radeon/RS690_cp.bin.ihex firmware/radeon/RS690_cp.bin
drop_fw_file firmware/radeon/RS780_me.bin.ihex firmware/radeon/RS780_me.bin
drop_fw_file firmware/radeon/RS780_pfp.bin.ihex firmware/radeon/RS780_pfp.bin
drop_fw_file firmware/radeon/RV610_me.bin.ihex firmware/radeon/RV610_me.bin
drop_fw_file firmware/radeon/RV610_pfp.bin.ihex firmware/radeon/RV610_pfp.bin
drop_fw_file firmware/radeon/RV620_me.bin.ihex firmware/radeon/RV620_me.bin
drop_fw_file firmware/radeon/RV620_pfp.bin.ihex firmware/radeon/RV620_pfp.bin
drop_fw_file firmware/radeon/RV630_me.bin.ihex firmware/radeon/RV630_me.bin
drop_fw_file firmware/radeon/RV630_pfp.bin.ihex firmware/radeon/RV630_pfp.bin
drop_fw_file firmware/radeon/RV635_me.bin.ihex firmware/radeon/RV635_me.bin
drop_fw_file firmware/radeon/RV635_pfp.bin.ihex firmware/radeon/RV635_pfp.bin
drop_fw_file firmware/radeon/RV670_me.bin.ihex firmware/radeon/RV670_me.bin
drop_fw_file firmware/radeon/RV670_pfp.bin.ihex firmware/radeon/RV670_pfp.bin
drop_fw_file firmware/radeon/RV710_me.bin.ihex firmware/radeon/RV710_me.bin
drop_fw_file firmware/radeon/RV710_pfp.bin.ihex firmware/radeon/RV710_pfp.bin
drop_fw_file firmware/radeon/RV730_me.bin.ihex firmware/radeon/RV730_me.bin
drop_fw_file firmware/radeon/RV730_pfp.bin.ihex firmware/radeon/RV730_pfp.bin
drop_fw_file firmware/radeon/RV770_me.bin.ihex firmware/radeon/RV770_me.bin
drop_fw_file firmware/radeon/RV770_pfp.bin.ihex firmware/radeon/RV770_pfp.bin
reject_firmware drivers/gpu/drm/radeon/r100.c
clean_blob drivers/gpu/drm/radeon/r100.c
reject_firmware drivers/gpu/drm/radeon/r600.c
clean_blob drivers/gpu/drm/radeon/r600.c
# Something like this might work on other radeon cards too.  If you
# have such cards, please give it a try, and report back either way,
# so that we can make more cards work, or at least add comments so
# that others don't waste their time trying them again.
clean_sed '
/r = r600_init_microcode(rdev);/,/}/ s,return r;,/*(DEBLOBBED)*/,
' drivers/gpu/drm/radeon/r600.c 'enable blobless activation'
clean_sed '
/r = r600_init_microcode(rdev);/,/}/ s,return r;,/*(DEBLOBBED)*/,
' drivers/gpu/drm/radeon/evergreen.c 'enable blobless activation'
reject_firmware drivers/gpu/drm/radeon/ni.c
clean_blob drivers/gpu/drm/radeon/ni.c
reject_firmware drivers/gpu/drm/radeon/si.c
clean_blob drivers/gpu/drm/radeon/si.c
reject_firmware drivers/gpu/drm/radeon/cik.c
clean_blob drivers/gpu/drm/radeon/cik.c
reject_firmware drivers/gpu/drm/radeon/radeon_uvd.c
clean_blob drivers/gpu/drm/radeon/radeon_uvd.c
reject_firmware drivers/gpu/drm/radeon/radeon_vce.c
clean_blob drivers/gpu/drm/radeon/radeon_vce.c
clean_kconfig drivers/gpu/drm/Kconfig DRM_RADEON
clean_mk CONFIG_DRM_RADEON drivers/gpu/drm/Makefile

announce DRM_STI - "DRM Support for STMicroelectronics SoC stiH41x Series"
reject_firmware drivers/gpu/drm/sti/sti_hqvdp.c
clean_blob drivers/gpu/drm/sti/sti_hqvdp.c
clean_kconfig drivers/gpu/drm/sti/Kconfig DRM_STI
clean_mk CONFIG_DRM_STI drivers/gpu/drm/sti/Makefile

#######
# dma #
#######

announce IMX_SDMA - "i.MX SDMA support"
reject_firmware drivers/dma/imx-sdma.c
clean_blob arch/arm/mach-imx/mm-imx3.c
clean_blob arch/arm/boot/dts/imx25.dtsi
clean_blob arch/arm/boot/dts/imx35.dtsi
clean_blob arch/arm/boot/dts/imx50.dtsi
clean_blob arch/arm/boot/dts/imx51.dtsi
clean_blob arch/arm/boot/dts/imx53.dtsi
clean_blob arch/arm/boot/dts/imx53-tx53.dtsi
clean_blob arch/arm/boot/dts/imx6qdl.dtsi
clean_blob arch/arm/boot/dts/imx6sl.dtsi
clean_blob arch/arm/boot/dts/imx6sx.dtsi
clean_blob arch/arm/boot/dts/imx6ul.dtsi
clean_blob Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
clean_kconfig drivers/dma/Kconfig IMX_SDMA
clean_mk CONFIG_IMX_SDMA drivers/dma/Makefile

#########
# Media #
#########

# media/tuner

announce MEDIA_TUNER_SI2157 - "Silicon Labs Si2157 silicon tuner"
reject_firmware drivers/media/tuners/si2157.c
clean_blob drivers/media/tuners/si2157.c
clean_blob drivers/media/tuners/si2157_priv.h
clean_kconfig drivers/media/tuners/Kconfig MEDIA_TUNER_SI2157
clean_mk CONFIG_MEDIA_TUNER_SI2157 drivers/media/tuners/Makefile

announce MEDIA_TUNER_XC2028 - "XCeive xc2028/xc3028 tuners"
undefault_firmware 'XC\(2028\|3028L\)' \
  drivers/media/tuners/tuner-xc2028.h \
  drivers/media/pci/saa7134/saa7134-cards.c \
  drivers/media/pci/ivtv/ivtv-driver.c \
  drivers/media/pci/cx18/cx18-driver.c \
  drivers/media/pci/cx18/cx18-dvb.c \
  drivers/media/pci/cx23885/cx23885-dvb.c \
  drivers/media/pci/cx23885/cx23885-video.c \
  drivers/media/pci/cx88/cx88-dvb.c \
  drivers/media/pci/cx88/cx88-cards.c \
  drivers/media/usb/em28xx/em28xx-cards.c \
  drivers/media/usb/dvb-usb/dib0700_devices.c \
  drivers/media/usb/dvb-usb/cxusb.c
reject_firmware drivers/media/tuners/tuner-xc2028.c
clean_blob drivers/media/tuners/tuner-xc2028.c
clean_kconfig drivers/media/tuners/Kconfig MEDIA_TUNER_XC2028
clean_mk CONFIG_MEDIA_TUNER_XC2028 drivers/media/tuners/Makefile

announce VIDEO_TM6000_DVB - "DVB Support for tm6000 based TV cards"
clean_blob drivers/media/usb/tm6000/tm6000-cards.c
clean_kconfig drivers/media/usb/tm6000/Kconfig VIDEO_TM6000_DVB
clean_mk CONFIG_VIDEO_TM6000_DVB drivers/media/usb/tm6000/Makefile

announce MEDIA_TUNER_XC4000 - "Xceive XC4000 silicon tuner"
undefine_macro "XC4000_DEFAULT_FIRMWARE\(\|_NEW\)" "\"/*(DEBLOBBED)*/\"" \
  "disabled non-Free firmware" drivers/media/tuners/xc4000.c
maybe_reject_firmware drivers/media/tuners/xc4000.c
clean_blob drivers/media/tuners/xc4000.c
clean_kconfig drivers/media/tuners/Kconfig MEDIA_TUNER_XC4000
clean_mk CONFIG_MEDIA_TUNER_XC4000 drivers/media/tuners/Makefile

announce MEDIA_TUNER_XC5000 - "Xceive XC5000 silicon tuner"
undefault_firmware 'XC5000' \
  drivers/media/usb/cx231xx/cx231xx-cards.c
reject_firmware drivers/media/tuners/xc5000.c
clean_blob drivers/media/tuners/xc5000.c
clean_kconfig drivers/media/tuners/Kconfig MEDIA_TUNER_XC5000
clean_mk CONFIG_MEDIA_TUNER_XC5000 drivers/media/tuners/Makefile

announce DVB_USB - "Support for various USB DVB devices"
reject_firmware drivers/media/usb/dvb-usb/dvb-usb-firmware.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB
clean_mk CONFIG_DVB_USB drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_V2 - "Support for various USB DVB devices v2"
reject_firmware drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
clean_kconfig drivers/media/usb/dvb-usb-v2/Kconfig DVB_USB_V2
clean_mk CONFIG_DVB_USB_V2 drivers/media/usb/dvb-usb-v2/Makefile

announce DVB_B2C2_FLEXCOP - "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters"
reject_firmware drivers/media/common/b2c2/flexcop-fe-tuner.c

announce DVB_BT8XX - "BT8xx based PCI cards"
reject_firmware drivers/media/pci/bt8xx/dvb-bt8xx.c

announce DVB_USB_A800 - "AVerMedia AverTV DVB-T USB 2.0 (A800)"
clean_blob drivers/media/usb/dvb-usb/a800.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_A800
clean_mk CONFIG_DVB_USB_A800 drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_AF9005 - "Afatech AF9005 DVB-T USB1.1 support"
clean_file drivers/media/usb/dvb-usb/af9005-script.h
clean_sed '
s,^	deb_info("load init script\\n");$,	{\n		err("Missing Free init script\\n");\n		return scriptlen = ret = -EINVAL;\n		,;
' drivers/media/usb/dvb-usb/af9005-fe.c 'report missing Free init script'
clean_blob drivers/media/usb/dvb-usb/af9005-fe.c
clean_blob drivers/media/usb/dvb-usb/af9005.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_AF9005
clean_mk CONFIG_DVB_USB_AF9005 drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_AF9015 - "Afatech AF9015 DVB-T USB2.0 support"
clean_blob drivers/media/usb/dvb-usb-v2/af9015.h
clean_blob drivers/media/usb/dvb-usb-v2/af9015.c
clean_kconfig drivers/media/usb/dvb-usb-v2/Kconfig DVB_USB_AF9015
clean_mk CONFIG_DVB_USB_AF9015 drivers/media/usb/dvb-usb-v2/Makefile

announce DVB_USB_AF9035 - "Afatech AF9035 DVB-T USB2.0 support"
clean_blob drivers/media/usb/dvb-usb-v2/af9035.h
clean_blob drivers/media/usb/dvb-usb-v2/af9035.c
clean_kconfig drivers/media/usb/dvb-usb-v2/Kconfig DVB_USB_AF9035
clean_mk CONFIG_DVB_USB_AF9035 drivers/media/usb/dvb-usb-v2/Makefile

announce DVB_USB_AZ6007 - "Azurewave 6007 and clones DVB-T/C USB2.0 support"
clean_blob drivers/media/usb/dvb-usb-v2/az6007.c
clean_kconfig drivers/media/usb/dvb-usb-v2/Kconfig DVB_USB_AZ6007
clean_mk CONFIG_DVB_USB_AZ6007 drivers/media/usb/dvb-usb-v2/Makefile

announce DVB_USB_AZ6027 - "Azurewave DVB-S/S2 USB2.0 AZ6027 support"
clean_blob drivers/media/usb/dvb-usb/az6027.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_AZ6027
clean_mk CONFIG_DVB_USB_AZ6027 drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_CXUSB - "Conexant USB2.0 hybrid reference design support"
clean_blob drivers/media/usb/dvb-usb/cxusb.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_CXUSB
clean_mk CONFIG_DVB_USB_CXUSB drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_DIB0700 - "DiBcom DiB0700 USB DVB devices"
reject_firmware drivers/media/usb/dvb-usb/dib0700_devices.c
clean_blob drivers/media/usb/dvb-usb/dib0700_devices.c
clean_blob drivers/media/usb/dvb-usb/dib0700_core.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_DIB0700
clean_mk CONFIG_DVB_USB_DIB0700 drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_DIBUSB_MB - "DiBcom USB DVB-T devices (based on the DiB3000M-B)"
clean_blob drivers/media/usb/dvb-usb/dibusb-mb.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_DIBUSB_MB
clean_mk CONFIG_DVB_USB_DIBUSB_MB drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_DIBUSB_MC - "DiBcom USB DVB-T devices (based on the DiB3000M-C/P)"
clean_blob drivers/media/usb/dvb-usb/dibusb-mc.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_DIBUSB_MC
clean_mk CONFIG_DVB_USB_DIBUSB_MC drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_DIGITV - "Nebula Electronics uDigiTV DVB-T USB2.0 support"
clean_blob drivers/media/usb/dvb-usb/digitv.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_DIGITV
clean_mk CONFIG_DVB_USB_DIGITV drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_DTT200U - "WideView WT-200U and WT-220U (pen) DVB-T USB2.0 support (Yakumo/Hama/Typhoon/Yuan)"
clean_blob drivers/media/usb/dvb-usb/dtt200u.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_DTT200U
clean_mk CONFIG_DVB_USB_DTT200U drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_DW2102 - "DvbWorld DVB-S/S2 USB2.0 support"
reject_firmware drivers/media/usb/dvb-usb/dw2102.c
clean_blob drivers/media/usb/dvb-usb/dw2102.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_DW2102
clean_mk CONFIG_DVB_USB_DW2102 drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_EC168 - "E3C EC168 DVB-T USB2.0 support"
clean_blob drivers/media/usb/dvb-usb-v2/ec168.h
clean_blob drivers/media/usb/dvb-usb-v2/ec168.c
clean_kconfig drivers/media/usb/dvb-usb-v2/Kconfig DVB_USB_EC168
clean_mk CONFIG_DVB_USB_EC168 drivers/media/usb/dvb-usb-v2/Makefile

announce DVB_USB_GP8PSK - "GENPIX 8PSK->USB module support"
reject_firmware drivers/media/usb/dvb-usb/gp8psk.c
clean_blob drivers/media/usb/dvb-usb/gp8psk.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_GP8PSK
clean_mk CONFIG_DVB_USB_GP8PSK drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_LME2510 - "LME DM04/QQBOX DVB-S USB2.0 support"
reject_firmware drivers/media/usb/dvb-usb-v2/lmedm04.c
clean_blob drivers/media/usb/dvb-usb-v2/lmedm04.c
clean_file Documentation/media/dvb-drivers/lmedm04.rst
clean_kconfig drivers/media/usb/dvb-usb-v2/Kconfig DVB_USB_LME2510
clean_mk CONFIG_DVB_USB_LME2510 drivers/media/usb/dvb-usb-v2/Makefile

announce DVB_USB_M920X - "Uli m920x DVB-T USB2.0 support"
clean_blob drivers/media/usb/dvb-usb/m920x.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_M920X
clean_mk CONFIG_DVB_USB_M920X drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_NOVA_T_USB2 - "Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 support"
clean_blob drivers/media/usb/dvb-usb/nova-t-usb2.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_NOVA_T_USB2
clean_mk CONFIG_DVB_USB_NOVA_T_USB2 drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_OPERA1 - "Opera1 DVB-S USB2.0 receiver"
reject_firmware drivers/media/usb/dvb-usb/opera1.c
clean_blob drivers/media/usb/dvb-usb/opera1.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_OPERA1
clean_mk CONFIG_DVB_USB_OPERA1 drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_TECHNISAT_USB2 - "Technisat DVB-S/S2 USB2.0 support"
clean_blob drivers/media/usb/dvb-usb/technisat-usb2.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_TECHNISAT_USB2
clean_mk CONFIG_DVB_USB_TECHNISAT_USB2 drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_TTUSB2 - "Pinnacle 400e DVB-S USB2.0 support"
clean_blob drivers/media/usb/dvb-usb/ttusb2.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_TTUSB2
clean_mk CONFIG_DVB_USB_TTUSB2 drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_UMT_010 - "HanfTek UMT-010 DVB-T USB2.0 support"
clean_blob drivers/media/usb/dvb-usb/umt-010.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_UMT_010
clean_mk CONFIG_DVB_USB_UMT_010 drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_VP702X - "TwinhanDTV StarBox and clones DVB-S USB2.0 support"
clean_blob drivers/media/usb/dvb-usb/vp702x.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_VP702X
clean_mk CONFIG_DVB_USB_VP702X drivers/media/usb/dvb-usb/Makefile

announce DVB_USB_VP7045 - "TwinhanDTV Alpha/MagicBoxII, DNTV tinyUSB2, Beetle USB2.0 support"
clean_blob drivers/media/usb/dvb-usb/vp7045.c
clean_kconfig drivers/media/usb/dvb-usb/Kconfig DVB_USB_VP7045
clean_mk CONFIG_DVB_USB_VP7045 drivers/media/usb/dvb-usb/Makefile

# dvb/frontends

announce DVB_AF9013 - "Afatech AF9013 demodulator"
reject_firmware drivers/media/dvb-frontends/af9013.c
clean_blob drivers/media/dvb-frontends/af9013.c
clean_blob drivers/media/dvb-frontends/af9013_priv.h
clean_kconfig drivers/media/dvb-frontends/Kconfig DVB_AF9013
clean_mk CONFIG_DVB_AF9013 drivers/media/dvb-frontends/Makefile

announce DVB_BCM3510 - "Broadcom BCM3510"