clean_kconfig () {
#$1 = filename $2 = things to remove
+ case $1 in
+ -f)
+ shift
+ ;;
+ *)
+ if $have_check; then
+ return
+ fi
+ ;;
+ esac
echo Marking config $2 as depending on NONFREE in $1
sed "/^config \\($2\\)\$/{p;i\
depends on NONFREE
reject_firmware drivers/atm/ambassador.c
clean_blob drivers/atm/ambassador.c
clean_fw firmware/atmsar11.HEX firmware/atmsar11.fw
-$have_check || clean_kconfig drivers/atm/Kconfig 'ATM_AMBASSADOR'
+clean_kconfig drivers/atm/Kconfig 'ATM_AMBASSADOR'
clean_mk CONFIG_ATM_AMBASSADOR drivers/atm/Makefile
announce ATM_FORE200E_PCA, ATM_FORE200E_SBA - SBA-200E
reject_firmware drivers/atm/fore200e.c
clean_blob drivers/atm/fore200e.c
clean_blob Documentation/networking/fore200e.txt
-$have_check || clean_kconfig drivers/atm/Kconfig 'ATM_FORE.*'
+clean_kconfig drivers/atm/Kconfig 'ATM_FORE.*'
clean_mk CONFIG_ATM_FORE200E drivers/atm/Makefile
drop_fw_file firmware/intelliport2.bin.ihex firmware/intelliport2.bin
reject_firmware drivers/char/ip2/ip2main.c
clean_blob drivers/char/ip2/ip2main.c
-$have_check || clean_kconfig drivers/char/Kconfig 'COMPUTONE'
+clean_kconfig drivers/char/Kconfig 'COMPUTONE'
clean_mk CONFIG_COMPUTONE drivers/char/Makefile
# gpu drm
# DRM_MGA - Matrox g200/g400
clean_blob drivers/gpu/drm/mga/mga_ucode.h
+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
# DRM_R128 - ATI Rage 128
+clean_sed '/^static int r128_do_init_cce(/,/^}$/{
+ /^ r128_cce_load_microcode(dev_priv);$/{
+ i\
+ DRM_ERROR("Missing Free microcode!\\n");\
+ dev->dev_private = (void *)dev_priv;\
+ r128_do_cleanup_cce(dev);\
+ return -EINVAL;
+ }
+}' 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
# DRM_RADEON - ATI Radeon
+clean_sed '/^static int radeon_do_init_cce(/,/^}$/{
+ /^ radeon_cp_load_microcode(dev_priv);$/{
+ i\
+ DRM_ERROR("Missing Free microcode!\\n");\
+ radeon_do_cleanup_cp(dev);\
+ return -EINVAL;
+ }
+}
+/^static int radeon_do_resume_cp(/,/^}$/{
+ /^ radeon_cp_load_microcode(dev_priv);$/{
+ i\
+ DRM_ERROR("Missing Free microcode!\\n");\
+ return -EINVAL;
+ }
+}' drivers/gpu/drm/radeon/radeon_cp.c
clean_blob drivers/gpu/drm/radeon/radeon_microcode.h
clean_kconfig drivers/gpu/drm/Kconfig 'DRM_RADEON'
clean_mk CONFIG_DRM_RADEON drivers/gpu/drm/Makefile
blobna 'intelliport2\.bin' drivers/char/ip2/ip2main.c
+ blob 'static unsigned char warp_g[24]00_t2\?gzs\?a\?f\?\[\] = {[^{};]*};\([\n][\n]*static unsigned char warp_g[24]00_t2\?gzs\?a\?f\?\[\] = {[^{};]*};\)*' drivers/gpu/drm/mga/mga_ucode.h
+ blob '#define \(MGA_WARP_CODE_ALIGN\|WARP_UCODE_\(SIZE\|INSTALL\)\)\([^\n]*\\[ ]*[\n]\)*[^\n]*' drivers/gpu/drm/mga/mga_warp.c
+ blob 'static const unsigned int mga_warp_g[24]00_microcode_size =[^;]*;' drivers/gpu/drm/mga/mga_warp.c
+ blob 'static int mga_warp_install_g[24]00_microcode([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}[\n]' drivers/gpu/drm/mga/mga_warp.c
+ blobna '\(case MGA_CARD_TYPE_G[^:]*:[ \n]*\)\+return [^;]*mga_warp[^;]*microcode[^;]*;\([ \n]*\(case MGA_CARD_TYPE_G[^:]*:[ \n]*\)\+return [^;]*mga_warp[^;]*microcode[^;]*;[ ]*\)*' drivers/gpu/drm/mga/mga_warp.c
+
+ blob 'static u32 r128_cce_microcode\[\] = {[^{};]*};' drivers/gpu/drm/r128/r128_cce.c
+ blob 'static void r128_cce_load_microcode([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}[\n]' drivers/gpu/drm/r128/r128_cce.c
+ blob ' r128_cce_load_microcode([^;]*);' drivers/gpu/drm/r128/r128_cce.c
+
+ blob 'static const u32 R[S0-9]*0_cp_microcode\[\]\[2\] = {[^{};]*};\([\n][\n]*static const u32 R[S0-9]*0_cp_microcode\[\]\[2\] = {[^{};]*};\)*' drivers/gpu/drm/radeon/radeon_microcode.h
+ blob 'static void radeon_cp_load_microcode([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}[\n]' drivers/gpu/drm/radeon/radeon_cp.c
+ blob ' radeon_cp_load_microcode([^;]*);' drivers/gpu/drm/radeon/radeon_cp.c
+
blobna '\(agere\|prism\)_\(sta\|ap\)_fw\.bin' drivers/net/wireless/orinoco.c
blobna 'symbol_sp24t_\(prim\|sec\)_fw' drivers/net/wireless/orinoco.c