summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2013-03-29 20:11:23 +0100
committerJohannes Berg <johannes@sipsolutions.net>2013-03-29 22:09:32 +0100
commit3db1c153fbbb9d34d281604eb854e70367167695 (patch)
treebdf12908edba1eec32bf89eca849ad4f49672a25
parent0da76ef8674d0b04cf23dae2c98ed1625f7f64ac (diff)
clean up
Clean up all the things this won't use/need. I'm going to add things back bit by bit instead of trying to base it on the current version. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
-rw-r--r--.gitignore25
-rw-r--r--Kconfig25
-rw-r--r--Kconfig.env19
-rw-r--r--Makefile272
-rw-r--r--README (renamed from README.md)4
-rw-r--r--compat/.gitignore16
-rw-r--r--compat/COPYRIGHT356
-rw-r--r--compat/Makefile84
-rw-r--r--compat/README8
-rwxr-xr-xcompat/bin/ckmake393
-rwxr-xr-xcompat/bin/get-compat-kernels265
-rwxr-xr-xcompat/bin/get-compat-trees87
-rwxr-xr-xcompat/scripts/compat_firmware_install21
-rwxr-xr-xcompat/scripts/gen-compat-autoconf.sh105
-rwxr-xr-xcompat/scripts/gen-compat-config.sh81
-rwxr-xr-xcompat/scripts/skip-colors2
-rw-r--r--compat/udev/50-compat_firmware.rules4
-rwxr-xr-xcompat/udev/compat_firmware.sh35
-rwxr-xr-xcompat/udev/ubuntu/compat_firmware.sh29
-rw-r--r--config.mk751
-rw-r--r--enable-older-kernels/README12
-rw-r--r--enable-older-kernels/enable-2.6.21.patch26
-rw-r--r--enable-older-kernels/enable-2.6.22.patch26
-rw-r--r--enable-older-kernels/enable-2.6.23.patch26
-rw-r--r--kconfig/Makefile (renamed from scripts/kconfig/Makefile)6
-rw-r--r--kconfig/conf.c (renamed from scripts/kconfig/conf.c)0
-rw-r--r--kconfig/confdata.c (renamed from scripts/kconfig/confdata.c)0
-rw-r--r--kconfig/expr.c (renamed from scripts/kconfig/expr.c)0
-rw-r--r--kconfig/expr.h (renamed from scripts/kconfig/expr.h)0
-rw-r--r--kconfig/list.h (renamed from scripts/kconfig/list.h)0
-rw-r--r--kconfig/lkc.h (renamed from scripts/kconfig/lkc.h)0
-rw-r--r--kconfig/lkc_proto.h (renamed from scripts/kconfig/lkc_proto.h)0
-rw-r--r--kconfig/lxdialog/check-lxdialog.sh (renamed from scripts/kconfig/lxdialog/check-lxdialog.sh)0
-rw-r--r--kconfig/lxdialog/checklist.c (renamed from scripts/kconfig/lxdialog/checklist.c)0
-rw-r--r--kconfig/lxdialog/dialog.h (renamed from scripts/kconfig/lxdialog/dialog.h)0
-rw-r--r--kconfig/lxdialog/inputbox.c (renamed from scripts/kconfig/lxdialog/inputbox.c)0
-rw-r--r--kconfig/lxdialog/menubox.c (renamed from scripts/kconfig/lxdialog/menubox.c)0
-rw-r--r--kconfig/lxdialog/textbox.c (renamed from scripts/kconfig/lxdialog/textbox.c)0
-rw-r--r--kconfig/lxdialog/util.c (renamed from scripts/kconfig/lxdialog/util.c)0
-rw-r--r--kconfig/lxdialog/yesno.c (renamed from scripts/kconfig/lxdialog/yesno.c)0
-rw-r--r--kconfig/mconf.c (renamed from scripts/kconfig/mconf.c)0
-rw-r--r--kconfig/menu.c (renamed from scripts/kconfig/menu.c)0
-rw-r--r--kconfig/symbol.c (renamed from scripts/kconfig/symbol.c)0
-rw-r--r--kconfig/util.c (renamed from scripts/kconfig/util.c)0
-rw-r--r--kconfig/zconf.hash.c (renamed from scripts/kconfig/zconf.hash.c)0
-rw-r--r--kconfig/zconf.lex.c (renamed from scripts/kconfig/zconf.lex.c)0
-rw-r--r--kconfig/zconf.tab.c (renamed from scripts/kconfig/zconf.tab.c)0
-rw-r--r--patches/crap/README17
-rw-r--r--patches/linux-next-cherry-picks/README20
-rw-r--r--patches/linux-next-cherry-picks/network/.gitignore0
-rw-r--r--patches/linux-next-pending/README18
-rw-r--r--patches/linux-next-pending/network/.gitignore0
-rw-r--r--patches/pending-stable/.ignore1
-rw-r--r--patches/pending-stable/README23
-rw-r--r--patches/pending-stable/drm/.ignore1
-rw-r--r--patches/pending-stable/network/.gitignore0
-rw-r--r--patches/unified-drivers/README.md17
-rw-r--r--patches/unified-drivers/network/0001-backport-alx.patch125
-rw-r--r--patches/unified-drivers/network/0002-enable-alx.patch9
-rw-r--r--patches/unified-drivers/network/0004-alx-deactivate-loopback-test.patch25
-rw-r--r--patches/unified-drivers/network/0005-alx-intx-msi-workaround.patch16
-rwxr-xr-xscripts/admin-clean.sh14
-rwxr-xr-xscripts/admin-refresh.sh3
-rwxr-xr-xscripts/admin-update.sh999
-rwxr-xr-xscripts/athenable46
-rwxr-xr-xscripts/athload57
-rwxr-xr-xscripts/b43enable59
-rwxr-xr-xscripts/b43load65
-rwxr-xr-xscripts/btunload.sh14
-rwxr-xr-xscripts/check_config.sh35
-rwxr-xr-xscripts/check_depmod83
-rwxr-xr-xscripts/compress_modules40
-rwxr-xr-xscripts/driver-select565
-rwxr-xr-xscripts/gen-compat-autoconf.sh210
-rwxr-xr-xscripts/gen-release.sh311
-rwxr-xr-xscripts/genlog-3.7116
-rwxr-xr-xscripts/genlog-3.8116
-rwxr-xr-xscripts/genlog-3.9116
-rwxr-xr-xscripts/git-paranoia129
-rwxr-xr-xscripts/iwl-enable56
-rwxr-xr-xscripts/iwl-load58
-rwxr-xr-xscripts/madwifi-unload58
-rwxr-xr-xscripts/modlib.sh87
-rwxr-xr-xscripts/refresh-compat118
-rwxr-xr-xscripts/refresh-compat-local34
-rwxr-xr-xscripts/skip-colors2
-rwxr-xr-xscripts/unload.sh67
-rwxr-xr-xscripts/update-initramfs62
-rwxr-xr-xscripts/wlunload.sh59
89 files changed, 2 insertions, 6527 deletions
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 11c698ee..00000000
--- a/.gitignore
+++ /dev/null
@@ -1,25 +0,0 @@
-drivers
-include
-net
-udev
-*~
-git-describe
-compat-release
-Module.symvers
-module.order
-.pc
-code-metrics.txt
-.compat_base
-.compat_base_tree
-.compat_base_tree_version
-.compat_version
-.compat_autoconf_compat-*
-.config
-.config.mk_md5sum.txt
-.tmp_versions/
-MAINTAINERS
-modules
-modules.order
-*.o.d
-*.o
-scripts/kconfig/mconf
diff --git a/Kconfig b/Kconfig
deleted file mode 100644
index 8dd684a9..00000000
--- a/Kconfig
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/kconfig-language.txt.
-#
-
-mainmenu "$VERSION $BASE $BASE_TREE $BASE_TREE_VERSION"
-
-comment "Linux kernel backport configuration"
-
-source Kconfig.env
-
-config COMPAT_VIDEO_MODULES
- bool "Video drivers"
- help
- This enables compilation of Video DRM drivers.
-
-config COMPAT_WIRELESS
- bool "Wireless drivers"
- help
- This enables compilation of Wireless drivers.
-
-config COMPAT_BLUETOOTH
- bool "Bluetooth drivers"
- help
- This enables compilation of Bluetooth drivers.
diff --git a/Kconfig.env b/Kconfig.env
deleted file mode 100644
index 89d4935e..00000000
--- a/Kconfig.env
+++ /dev/null
@@ -1,19 +0,0 @@
-config BASE
- string
- option env="COMPAT_BASE"
-
-config BASE_TREE
- string
- option env="COMPAT_BASE_TREE"
-
-config BASE_TREE_VERSION
- string
- option env="COMPAT_BASE_TREE_VERSION"
-
-config PROJECT
- string
- option env="COMPAT_PROJECT"
-
-config VERSION
- string
- option env="COMPAT_VERSION"
diff --git a/Makefile b/Makefile
deleted file mode 100644
index e53c8896..00000000
--- a/Makefile
+++ /dev/null
@@ -1,272 +0,0 @@
-#
-
-# Copyright (c) 2007-2012 Luis R. Rodriguez <mcgrof@frijolero.org>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-export KMODDIR?= updates
-KMODDIR_ARG:= "INSTALL_MOD_DIR=$(KMODDIR)"
-ifneq ($(origin KLIB), undefined)
-KMODPATH_ARG:= "INSTALL_MOD_PATH=$(KLIB)"
-else
-export KLIB:= /lib/modules/$(shell uname -r)
-endif
-export KLIB_BUILD ?= $(KLIB)/build
-export MAKE
-
-DESTDIR?=
-
-ifneq ($(KERNELRELEASE),)
-
--include $(COMPAT_CONFIG)
-include $(COMPAT_CONFIG_CW)
-
-NOSTDINC_FLAGS := \
- -I$(M)/include/ \
- -I$(M)/include/uapi \
- -I$(M)/include/drm \
- -include $(M)/include/linux/compat-2.6.h \
- $(CFLAGS)
-
-obj-y := compat/
-
-obj-$(CONFIG_COMPAT_RFKILL) += net/rfkill/
-obj-$(CONFIG_COMPAT_VIDEO_MODULES) += drivers/gpu/drm/
-obj-$(CONFIG_COMPAT_VIDEO_MODULES) += drivers/video/
-
-ifeq ($(BT),)
-obj-$(CONFIG_COMPAT_WIRELESS) += net/wireless/ net/mac80211/
-obj-$(CONFIG_COMPAT_WIRELESS_MODULES) += drivers/net/wireless/
-
-obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/
-
-obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/ethernet/atheros/
-obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/ethernet/broadcom/
-
-obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/ssb/
-obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/bcma/
-obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/misc/eeprom/
-
-ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
-endif
-
-endif
-
-obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
-obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/
-
-else
-
-export PWD := $(shell pwd)
-
-# The build will fail if there is any space in PWD.
-ifneq (,$(findstring $() ,$(PWD)))
-$(error "The path to this compat-drivers directory has spaces in it." \
- "Please put it somewhere where there is no space")
-endif
-
-# For C code
-export CFLAGS += \
- -DCOMPAT_BASE="\"$(shell cat $(PWD)/.compat_base)\"" \
- -DCOMPAT_BASE_TREE="\"$(shell cat $(PWD)/.compat_base_tree)\"" \
- -DCOMPAT_BASE_TREE_VERSION="\"$(shell cat $(PWD)/.compat_base_tree_version)\"" \
- -DCOMPAT_PROJECT="\"compat-drivers\"" \
- -DCOMPAT_VERSION="\"$(shell cat $(PWD)/.compat_version)\""
-
-# These exported as they are used by the scripts
-# to check config and compat autoconf
-export COMPAT_CONFIG_CW=$(PWD)/config.mk
-export COMPAT_CONFIG=$(PWD)/.config
-export CONFIG_CHECK=$(PWD)/.config.mk_md5sum.txt
-export COMPAT_AUTOCONF=include/linux/compat_autoconf.h
-export CREL=$(shell cat $(PWD)/.compat_version)
-export CREL_PRE:=.compat_autoconf_
-export CREL_CHECK:=$(PWD)/$(CREL_PRE)$(CREL)
-
-all: modules
-
-$(COMPAT_CONFIG): ;
-
-menuconfig:
- @echo "Not yet supported, still under development"
- @echo "If you want to hack on this start testing with:"
- @echo " make -f scripts/kconfig/Makefile menuconfig "
- @exit 1
- make -f scripts/kconfig/Makefile menuconfig
-
-modules: $(CREL_CHECK)
- +@./scripts/check_config.sh
- $(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules
- @touch $@
-
-bt: $(CREL_CHECK)
- +@./scripts/check_config.sh
- $(MAKE) -C $(KLIB_BUILD) M=$(PWD) BT=TRUE modules
- @touch $@
-
-# We use a CREL_CHECK variable which will depend on the environment used to
-# build. If the environment requirements change it forces a reconfiguration
-# check. This means we force a new reconfiguration check if a the user gets a
-# new updates of compat-drivers or when the user updates the $(COMPAT_CONFIG)
-# file.
-# XXX: add kernel target to the CREL_CHECK mix, this would ensure we also
-# reconfigure and build again fresh if we detect a new target kernel is
-# being used.
-$(CREL_CHECK):
- @# Force to regenerate compat autoconf
- +@./compat/scripts/gen-compat-config.sh > $(COMPAT_CONFIG)
- @rm -f $(CONFIG_CHECK)
- +@./scripts/check_config.sh
- @md5sum $(COMPAT_CONFIG_CW) > $(CONFIG_CHECK)
- @touch $@
-
-btinstall: btuninstall bt-install-modules
-
-bt-install-modules: bt
- $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) BT=TRUE \
- modules_install
- @/sbin/depmod -ae
- @echo
- @echo Now run:
- @echo
- @echo sudo make btunload:
- @echo
- @echo And then load the needed bluetooth modules. If unsure reboot.
- @echo
-
-btuninstall:
- @# New location, matches upstream
- @rm -rf $(KLIB)/$(KMODDIR)/net/bluetooth/
- @rm -rf $(KLIB)/$(KMODDIR)/drivers/bluetooth/
- @# Lets only remove the stuff we are sure we are providing
- @# on the misc directory.
- @/sbin/depmod -ae
- @echo
-
-btclean:
- $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) BT=TRUE clean
- @rm -f $(CREL_PRE)*
-
-install: uninstall install-modules install-scripts
-
-install-modules: modules
- $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \
- modules_install
- @./scripts/update-initramfs
-
-install-scripts:
- @# All the scripts we can use
- @mkdir -p $(DESTDIR)/usr/lib/compat-drivers/
- @install scripts/modlib.sh $(DESTDIR)/usr/lib/compat-drivers/
- @install scripts/git-paranoia $(DESTDIR)/usr/sbin/
- @install scripts/madwifi-unload $(DESTDIR)/usr/sbin/
- @# This is to allow switching between drivers without blacklisting
- @install scripts/athenable $(DESTDIR)/usr/sbin/
- @install scripts/b43enable $(DESTDIR)/usr/sbin/
- @install scripts/iwl-enable $(DESTDIR)/usr/sbin/
- @install scripts/athload $(DESTDIR)/usr/sbin/
- @install scripts/b43load $(DESTDIR)/usr/sbin/
- @install scripts/iwl-load $(DESTDIR)/usr/sbin/
- @if [ $(shell modinfo ath_pci > /dev/null 2>&1 && echo 1) ]; then \
- echo -n "Note: madwifi detected, we're going to disable it. " ;\
- echo "If you would like to enable it later you can run:" ;\
- echo " sudo athenable madwifi" ;\
- echo ;\
- echo Running athenable ath5k...;\
- $(DESTDIR)/usr/sbin/athenable ath5k ;\
- fi
- @if [ $(shell modinfo iwl4965 > /dev/null 2>&1 && echo 1) ]; then \
- echo ;\
- echo -n "Note: iwl4965 detected, we're going to disable it. " ;\
- echo "If you would like to enable it later you can run:" ;\
- echo " sudo iwl-load iwl4965" ;\
- echo ;\
- echo Running iwl-enable iwlagn...;\
- $(DESTDIR)/usr/sbin/iwl-enable iwlagn ;\
- fi
- @if [ $(shell modinfo iwlagn > /dev/null 2>&1 && echo 1) ] \
- && [ $(shell modinfo iwlwifi > /dev/null 2>&1 && echo 1) ]; then \
- echo ;\
- echo -n "Note: iwlagn detected, we're going to disable it. " ;\
- echo "If you would like to enable it later you can run:" ;\
- echo " sudo iwl-load iwlagn" ;\
- echo ;\
- echo Running iwl-enable iwlwifi...;\
- $(DESTDIR)/usr/sbin/iwl-enable iwlwifi ;\
- fi
- @# If on distributions like Mandriva which like to
- @# compress their modules this will find out and do
- @# it for you. Reason is some old version of modutils
- @# won't know mac80211.ko should be used instead of
- @# mac80211.ko.gz
- @./scripts/compress_modules
- @# Mandrake doesn't have a depmod.d/ conf file to prefer
- @# the updates/ dir which is what we use so we add one for it
- @# (or any other distribution that doens't have this).
- @./scripts/check_depmod
- @# Udev stuff needed for the new compat_firmware_class.
- @./compat/scripts/compat_firmware_install
- @/sbin/depmod -a
- @echo
- @echo Now run:
- @echo
- @echo sudo make unload to unload all: wireless, bluetooth and ethernet modules
- @echo sudo make wlunload to unload wireless modules
- @echo sudo make btunload to unload bluetooth modules
- @echo
- @echo Run sudo modprobe 'driver-name' to load your desired driver.
- @echo If unsure reboot.
- @echo
-
-uninstall:
- @# New location, matches upstream
- @rm -rf $(KLIB)/$(KMODDIR)/compat/
- @rm -rf $(KLIB)/$(KMODDIR)/net/mac80211/
- @rm -rf $(KLIB)/$(KMODDIR)/net/rfkill/
- @rm -rf $(KLIB)/$(KMODDIR)/net/wireless/
- @rm -rf $(KLIB)/$(KMODDIR)/drivers/ssb/
- @rm -rf $(KLIB)/$(KMODDIR)/drivers/net/usb/
- @rm -rf $(KLIB)/$(KMODDIR)/drivers/net/wireless/
- @rm -rf $(KLIB)/$(KMODDIR)/drivers/staging/
- @rm -rf $(KLIB)/$(KMODDIR)/drivers/net/atl*
- @find $(KLIB)/$(KMODDIR)/drivers/net/ -name "alx*.ko" -o -name "atl*.ko" 2>/dev/null |xargs rm -f
- @# Lets only remove the stuff we are sure we are providing
- @# on the misc directory.
- @rm -f $(KLIB)/$(KMODDIR)/drivers/misc/eeprom/eeprom_93cx6.ko*
- @rm -f $(KLIB)/$(KMODDIR)/drivers/misc/eeprom_93cx6.ko*
- @rm -f $(KLIB)/$(KMODDIR)/drivers/net/b44.ko*
- @/sbin/depmod -a
- @./scripts/update-initramfs
- @echo
-
-clean:
- @if [ -d net -a -d $(KLIB_BUILD) ]; then \
- $(MAKE) -C $(KLIB_BUILD) M=$(PWD) clean ;\
- fi
- @rm -f $(CREL_PRE)*
-unload:
- @./scripts/unload.sh
-
-btunload:
- @./scripts/btunload.sh
-
-wlunload:
- @./scripts/wlunload.sh
-
-
-.PHONY: all clean install uninstall unload btunload wlunload modules bt Makefile
-
-endif
-
-clean-files += Module.symvers Module.markers modules modules.order
-clean-files += $(CREL_CHECK) $(CONFIG_CHECK) $(COMPAT_CONFIG)
diff --git a/README.md b/README
index b647eb29..66e135fc 100644
--- a/README.md
+++ b/README
@@ -1,7 +1,7 @@
-# Linux compat drivers compatibility package
+# Linux driver backports package
This package provides backport support for drivers from newer kernels
-down to older kernels. It currently backports 3 subsystems:
+down to older kernels. It currently backports 4 subsystems:
* Ethernet
* Wireless
diff --git a/compat/.gitignore b/compat/.gitignore
deleted file mode 100644
index 13317962..00000000
--- a/compat/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-*~
-Module.symvers
-module.order
-.pc
-ckmake.log
-.config
-include/linux/compat_autoconf.h
-.tmp_versions/
-compat/*.cmd
-compat/*.o
-compat/*.mod.c
-compat/*.ko
-modules.order
-modules
-*.patch
-debs/
diff --git a/compat/COPYRIGHT b/compat/COPYRIGHT
deleted file mode 100644
index ca442d31..00000000
--- a/compat/COPYRIGHT
+++ /dev/null
@@ -1,356 +0,0 @@
-
- NOTE! This copyright does *not* cover user programs that use kernel
- services by normal system calls - this is merely considered normal use
- of the kernel, and does *not* fall under the heading of "derived work".
- Also note that the GPL below is copyrighted by the Free Software
- Foundation, but the instance of code that it refers to (the Linux
- kernel) is copyrighted by me and others who actually wrote it.
-
- Also note that the only valid version of the GPL as far as the kernel
- is concerned is _this_ particular version of the license (ie v2, not
- v2.2 or v3.x or whatever), unless explicitly otherwise stated.
-
- Linus Torvalds
-
-----------------------------------------
-
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- 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
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/compat/Makefile b/compat/Makefile
deleted file mode 100644
index cd4fc213..00000000
--- a/compat/Makefile
+++ /dev/null
@@ -1,84 +0,0 @@
-export KMODDIR?= updates/
-KMODDIR_ARG:= "INSTALL_MOD_DIR=$(KMODDIR)"
-ifneq ($(origin $(KLIB)), undefined)
-KMODPATH_ARG:= "INSTALL_MOD_PATH=$(KLIB)"
-else
-export KLIB:= /lib/modules/$(shell uname -r)
-endif
-export KLIB_BUILD ?= $(KLIB)/build
-
-DESTDIR?=
-
-ifeq ($(KERNELRELEASE),)
-export PWD := $(shell pwd)
-export COMPAT_BASE_TREE := "linux-next.git"
-# For this specific tree this is only relevant in
-# terms of the last time we synched code up with upstream
-# for internal stuff. For other compatability projects this
-# would be the git describe of the base tree you are
-# working with.
-export COMPAT_BASE_TREE_VERSION := "next-20100517"
-export COMPAT_VERSION := $(shell git describe)
-
-# This is used to annotate what version of
-# compat.git was used.
-export COMPAT_BASE := $(shell git describe)
-
-# to check config and compat autoconf
-export COMPAT_CONFIG=$(PWD)/.config
-export COMPAT_AUTOCONF=$(PWD)/include/linux/compat_autoconf.h
-export MAKE
-
-else
-# By stuffing this hear we avoid using
-# this hackery on modpost, the 2nd section of module building.
-#
-# This hack lets us put our include path first than the kernel's
-# when building our compat modules. Your own makefile would look
-# the same.
-NOSTDINC_FLAGS := -I$(M)/include/ \
- -include $(M)/include/linux/compat-2.6.h \
- $(CFLAGS) \
- -DCOMPAT_BASE="\"$(COMPAT_BASE)\"" \
- -DCOMPAT_BASE_TREE="\"$(COMPAT_BASE_TREE)\"" \
- -DCOMPAT_BASE_TREE_VERSION="\"$(COMPAT_BASE_TREE_VERSION)\"" \
- -DCOMPAT_PROJECT="\"Generic kernel\"" \
- -DCOMPAT_VERSION="\"$(COMPAT_VERSION)\""
-
-# Technicallay we can require the inclusion of COMPAT_CONFIG for
-# all targets except clean, so avoid the warnings at clean time.
--include $(COMPAT_CONFIG)
-endif
-
-obj-y += compat/
-
-all: modules
-
-modules: $(COMPAT_CONFIG) $(COMPAT_AUTOCONF)
- $(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules
- @touch modules
-
-install: modules
- $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \
- modules_install
- depmod -a
-
-$(COMPAT_AUTOCONF): $(COMPAT_CONFIG)
- +@$(PWD)/scripts/gen-compat-autoconf.sh $(COMPAT_CONFIG) > $(COMPAT_AUTOCONF)
-
-$(COMPAT_CONFIG):
- +@$(PWD)/scripts/gen-compat-config.sh > $(COMPAT_CONFIG)
-
-install: modules
-
-install-ckmake:
- @mkdir -p $(DESTDIR)/usr/bin/
- @install bin/ckmake $(DESTDIR)/usr/bin/
-
-clean:
- $(MAKE) -C $(KLIB_BUILD) M=$(PWD) clean
-
-clean-files := Module.symvers modules.order Module.markers compat/modules.order
-clean-files += modules $(COMPAT_CONFIG) $(COMPAT_AUTOCONF)
-
-.PHONY: all install clean modules Makefile
diff --git a/compat/README b/compat/README
deleted file mode 100644
index c9ff2c83..00000000
--- a/compat/README
+++ /dev/null
@@ -1,8 +0,0 @@
-compat
-=======
-
-This is the Linux kernel backport compatibility module.
-
-For more details please visit:
-
-http://mcgrof.github.com/compat/
diff --git a/compat/bin/ckmake b/compat/bin/ckmake
deleted file mode 100755
index cd9741ae..00000000
--- a/compat/bin/ckmake
+++ /dev/null
@@ -1,393 +0,0 @@
-#!/usr/bin/env python
-
-# ncurses Linux kernel cross kernel compilation utility
-
-# Copyright (C) 2012 Luis R. Rodriguez <mcgrof@do-not-panic.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-
-import locale
-import curses
-import time
-import os
-import re
-import random
-import tempfile
-import subprocess
-import sys
-import signal
-
-from Queue import *
-from threading import Thread, Lock
-from shutil import copytree, ignore_patterns, rmtree, copyfileobj
-from time import sleep
-
-releases_processed = []
-releases_baking = []
-processed_lock = Lock()
-baking_lock = Lock()
-my_cwd = os.getcwd()
-ckmake_return = 0
-
-tmp_path = my_cwd + "/.tmp.ckmake"
-ckmake_log = my_cwd + "/ckmake.log"
-ckmake_report = my_cwd + "/ckmake-report.log"
-
-home = os.getenv("HOME")
-ksrc = home + "/" + "compat-ksrc"
-modules = ksrc + "/lib/modules"
-
-def clean():
- if os.path.exists(tmp_path):
- rmtree(tmp_path)
-
-def get_processed_rel(i):
- "Because... list.pop(i) didn't work to keep order..."
- processed_lock.acquire()
- for rel in releases_processed:
- if (rel['idx'] == i):
- processed_lock.release()
- return rel
- processed_lock.release()
-
- baking_lock.acquire()
- for rel in releases_baking:
- if (rel['idx'] == i):
- releases_baking.remove(rel)
- baking_lock.release()
- return rel
- baking_lock.release()
-
-def get_status_name(status):
- if (status == 0):
- return 'OK'
- elif (status == 130):
- return 'TERM'
- elif (status == 1234):
- return 'INIT'
- elif (status == -2):
- return 'TERM'
- else:
- return 'FAIL'
-
-def get_stat_pos(status):
- if (status == 0):
- return 34
- elif (status == 130):
- return 33
- elif (status == 1234):
- return 33
- elif (status == -2):
- return 33
- else:
- return 33
-
-def get_status_color(status):
- if (status == 0):
- return curses.color_pair(1)
- elif (status == 130):
- return curses.color_pair(2)
- elif (status == 1234):
- return curses.color_pair(2)
- elif (status == -2):
- return curses.color_pair(2)
- else:
- return curses.color_pair(3)
-
-def print_report():
- os.system("clear")
- sys.stdout.write("\n\n\n")
- sys.stdout.write("== ckmake-report.log ==\n\n")
- report = open(ckmake_report, 'r+')
- copyfileobj(report, sys.stdout)
- report.close()
-
-def process_logs():
- os.system('clear')
- log = open(ckmake_log, 'w+')
- report = open(ckmake_report, 'w+')
- for i in range(0, len(releases_processed)):
- rel = get_processed_rel(i)
- rel_log = open(rel['log'], 'r+')
- log.write(rel_log.read())
- status = get_status_name(rel['status'])
- rel_report = "%-4s%-20s[ %s ]\n" % \
- ( rel['idx']+1, rel['version'], status)
- report.write(rel_report)
- if (rel['status'] != 0 and
- rel['status'] != 2):
- ckmake_return = -1
- report.close()
- log.close()
- print_report()
-
-def process_kernel(num, kset):
- while True:
- rel = kset.queue.get()
- work_dir = tmp_path + '/' + rel['version']
- copytree(my_cwd, \
- work_dir, \
- ignore=ignore_patterns('\.git*', '.tmp*', ".git"))
- build = '%s/build/' % rel['full_path']
- jobs = ' -j%d ' % kset.build_jobs
- make_args = 'KLIB=%(build)s KLIB_BUILD=%(build)s' % \
- { "build": build }
- log_file = work_dir + '/' + 'ckmake.n.log'
- rel['log'] = log_file
- # XXX: figure out how to properly address logging
- # without this nasty ass hack.
- log = ' > %(log)s 2>&1' % { "log": log_file }
- nice = 'ionice -c 3 nice -n 20 '
- cmd = nice + 'make ' + jobs + make_args + log
-
- my_env = os.environ.copy()
- my_env["KCFLAGS"] = "-Wno-unused-but-set-variable"
-
- kset.baking(rel)
-
- p = subprocess.Popen([cmd],
- env = my_env,
- cwd = work_dir,
- stdout=None,
- stderr=None,
- shell=True)
- p.wait()
-
- kset.update_status(rel, p.returncode)
- kset.queue.task_done()
- kset.completed(rel)
-
-def cpu_info_build_jobs():
- if not os.path.exists('/proc/cpuinfo'):
- return 1
- f = open('/proc/cpuinfo', 'r')
- max_cpus = 1
- for line in f:
- m = re.match(r"(?P<PROC>processor\s*:)\s*" \
- "(?P<NUM>\d+)",
- line)
- if not m:
- continue
- proc_specs = m.groupdict()
- if (proc_specs['NUM'] > max_cpus):
- max_cpus = proc_specs['NUM']
- return int(max_cpus) + 1
-
-def kill_curses():
- curses.endwin()
- sys.stdout = os.fdopen(0, 'w', 0)
-
-def sig_handler(signal, frame):
- kill_curses()
- process_logs()
- clean()
- sys.exit(-2)
-
-def get_rel_spec(rel):
- if ("rc" in rel):
- m = re.match(r"v*(?P<VERSION>\d+)\.+" \
- "(?P<PATCHLEVEL>\d+)[.]+" \
- "(?P<SUBLEVEL>\d+)[-]+" \
- "\d+rc(?P<EXTRAVERSION>\d+)\-*",
- rel)
- else:
- m = re.match(r"v*(?P<VERSION>\d+)\.+" \
- "(?P<PATCHLEVEL>\d+)[.]+" \
- "(?P<SUBLEVEL>\d+)[-]+" \
- "(?P<EXTRAVERSION>\d+)\-*",
- rel)
- if (not m):
- return m
- rel_specs = m.groupdict()
- return rel_specs
-
-def krel_same_base(new_rel, rel):
- if (int(new_rel['ver']) != int(rel['ver'])):
- return False
- if (int(new_rel['pat']) != int(rel['pat'])):
- return False
- if (int(new_rel['ver']) == 3):
- return True
- if (int(new_rel['ver']) != 2):
- return False
- if (int(new_rel['sub']) == int(rel['sub'])):
- return True
- return False
-
-def krel_base_update(new_rel, rel):
- if (not krel_same_base(new_rel, rel)):
- return False
- if (int(new_rel['sub']) > int(rel['sub'])):
- return True
- if (int(new_rel['sub']) < int(rel['sub'])):
- return False
-
- # Too lazy to deal with 2.x kernels,
- if (not new_rel['is_rc']):
- return False
-
- if (int(new_rel['ext']) <= int(rel['ext'])):
- return False
- return True
-
-def krel_base_smaller(new_rel, rel):
- if (not krel_same_base(new_rel, rel)):
- return False
- if (int(new_rel['sub']) > int(rel['sub'])):
- return False
- if (int(new_rel['sub']) < int(rel['sub'])):
- return True
- return False
-
-class kernel_set():
- def __init__(self, stdscr):
- self.queue = Queue()
- self.releases = []
- self.stdscr = stdscr
- self.lock = Lock()
- signal.signal(signal.SIGINT, sig_handler)
- self.build_jobs = cpu_info_build_jobs()
- if (curses.has_colors()):
- curses.init_pair(1,
- curses.COLOR_GREEN,
- curses.COLOR_BLACK)
- curses.init_pair(2,
- curses.COLOR_CYAN,
- curses.COLOR_BLACK)
- curses.init_pair(3,
- curses.COLOR_RED,
- curses.COLOR_BLACK)
- curses.init_pair(4,
- curses.COLOR_BLUE,
- curses.COLOR_BLACK)
- def baking(self, rel):
- baking_lock.acquire()
- releases_baking.append(rel)
- baking_lock.release()
- def completed(self, rel):
- processed_lock.acquire()
- releases_processed.insert(rel['idx'], rel)
- processed_lock.release()
- def set_locale(self):
- locale.setlocale(locale.LC_ALL, '')
- code = locale.getpreferredencoding()
- def refresh(self):
- self.lock.acquire()
- self.stdscr.refresh()
- self.lock.release()
- def evaluate_new_rel(self, new_rel):
- for rel in self.releases:
- if (krel_base_update(new_rel, rel)):
- new_rel['idx'] = rel['idx']
- self.releases.remove(rel)
- break
- if (krel_base_smaller(new_rel, rel)):
- return
- self.releases.insert(new_rel['idx'], new_rel)
- def parse_releases(self):
- for dirname, dirnames, filenames in os.walk(modules):
- dirnames.sort()
- for subdirname in dirnames:
- specifics = get_rel_spec(subdirname)
- if (not specifics):
- continue
- rc = False
-
- ver = specifics['VERSION'] + '.' + \
- specifics['PATCHLEVEL']
-
- if ("rc" in subdirname):
- rc = True
- ver = ver + '-rc' + specifics['EXTRAVERSION']
- else:
- ver = ver + '.' + specifics['SUBLEVEL']
-
- rel = dict(idx=len(self.releases),
- name=subdirname,
- full_path=dirname + '/' +
- subdirname,
- version=ver,
- is_rc = rc,
- ver=specifics['VERSION'],
- pat=specifics['PATCHLEVEL'],
- sub=specifics['SUBLEVEL'],
- ext=specifics['EXTRAVERSION'],
- processed=False,
- log='',
- status=1234)
- self.evaluate_new_rel(rel)
- self.refresh()
- def setup_screen(self):
- for i in range(0, len(self.releases)):
- rel = self.releases[i]
- self.lock.acquire()
- self.stdscr.addstr(rel['idx'], 0,
- "%-4d" % (rel['idx']+1))
- if (curses.has_colors()):
- self.stdscr.addstr(rel['idx'], 5,
- "%-20s" % (rel['version']),
- curses.color_pair(4))
- else:
- self.stdscr.addstr(rel['idx'], 0,
- "%-20s" % (rel['version']))
- self.stdscr.addstr(rel['idx'], 30, "[ ]")
- self.stdscr.refresh()
- self.lock.release()
- def create_threads(self):
- for rel in self.releases:
- th = Thread(target=process_kernel, args=(0, self))
- th.setDaemon(True)
- th.start()
- def kick_threads(self):
- for rel in self.releases:
- self.queue.put(rel)
- sleep(1)
- def wait_threads(self):
- self.queue.join()
- def update_status(self, rel, status):
- self.lock.acquire()
- stat_name = get_status_name(status)
- stat_pos = get_stat_pos(status)
- if (curses.has_colors()):
- stat_color = get_status_color(status)
- self.stdscr.addstr(rel['idx'], stat_pos, stat_name,
- get_status_color(status))
- else:
- self.stdscr.addstr(rel['idx'], stat_pos, stat_name)
- rel['processed'] = True
- rel['status'] = status
- self.stdscr.refresh()
- self.lock.release()
-
-def main(stdscr):
- kset = kernel_set(stdscr)
-
- kset.set_locale()
- kset.parse_releases()
- kset.setup_screen()
- kset.create_threads()
- kset.kick_threads()
- kset.wait_threads()
- kset.refresh()
-
-if __name__ == "__main__":
- if not os.path.exists(modules):
- print "%s does not exist" % (modules)
- sys.exit(1)
- if not os.path.exists(my_cwd + '/Makefile'):
- print "%s does not exist" % (my_cwd + '/Makefile')
- sys.exit(1)
- if os.path.exists(ckmake_log):
- os.remove(ckmake_log)
- if os.path.exists(ckmake_report):
- os.remove(ckmake_report)
- if os.path.exists(tmp_path):
- rmtree(tmp_path)
- os.makedirs(tmp_path)
- curses.wrapper(main)
- kill_curses()
- process_logs()
- clean()
- sys.exit(ckmake_return)
diff --git a/compat/bin/get-compat-kernels b/compat/bin/get-compat-kernels
deleted file mode 100755
index 269dfd26..00000000
--- a/compat/bin/get-compat-kernels
+++ /dev/null
@@ -1,265 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2012, Luis R. Rodriguez <mcgrof@frijolero.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# You can use this script to install all mainline kernels used
-# to test compile the Linux kernel compatibility module. You can
-# then use ckmake to cross compile against all supported kernels.
-
-# Pretty colors
-GREEN="\033[01;32m"
-YELLOW="\033[01;33m"
-NORMAL="\033[00m"
-BLUE="\033[34m"
-RED="\033[31m"
-PURPLE="\033[35m"
-CYAN="\033[36m"
-UNDERLINE="\033[02m"
-
-KERNELS=""
-KPATH="http://kernel.ubuntu.com/~kernel-ppa/mainline/"
-
-FORCE="0"
-KSRC_PREFIX=
-# Check whether we're running as root or not
-# If we're root stuff things into /usr/src and /lib/modules
-# else, use $HOME/compat-ksrc for enabling user-mode builds.
-if [[ "$EUID" != "0" ]]; then
- KSRC_PREFIX="$HOME/compat-ksrc"
-else
- KSRC_PREFIX="${PWD}/compat-ksrc"
-fi
-
-
-# Create target directories if they doesn't exist
-mkdir -p $KSRC_PREFIX/{usr/src,lib/modules}
-
-# List of currently supported kernels that will be downloaded
-KERNELS="$KERNELS ${KPATH}/v2.6.24/linux-headers-2.6.24-020624_2.6.24-020624_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.25/linux-headers-2.6.25-020625_2.6.25-020625_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.26/linux-headers-2.6.26-020626_2.6.26-020626_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.27/linux-headers-2.6.27-020627_2.6.27-020627_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.28.10/linux-headers-2.6.28-02062810_2.6.28-02062810_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.29.6/linux-headers-2.6.29-02062906_2.6.29-02062906_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.30.10/linux-headers-2.6.30-02063010_2.6.30-02063010_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.31.13-karmic/linux-headers-2.6.31-02063113_2.6.31-02063113_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.32.60-lucid/linux-headers-2.6.32-02063260_2.6.32-02063260.201210082135_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.33.20-maverick/linux-headers-2.6.33-02063320_2.6.33-02063320.201111071735_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.34.14-maverick/linux-headers-2.6.34-02063414_2.6.34-02063414.201301162135_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.35.13-original-maverick/linux-headers-2.6.35-02063513_2.6.35-02063513.201107261012_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.36.4-natty/linux-headers-2.6.36-02063604_2.6.36-02063604.201102180911_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.37.6-natty/linux-headers-2.6.37-02063706_2.6.37-02063706.201103281005_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.38.8-natty/linux-headers-2.6.38-02063808_2.6.38-02063808.201106040910_all.deb"
-KERNELS="$KERNELS ${KPATH}/v2.6.39.4-oneiric/linux-headers-2.6.39-02063904_2.6.39-02063904.201108040905_all.deb"
-KERNELS="$KERNELS ${KPATH}/v3.0.65-oneiric/linux-headers-3.0.65-030065_3.0.65-030065.201302171435_all.deb"
-KERNELS="$KERNELS ${KPATH}/v3.1.10-precise/linux-headers-3.1.10-030110_3.1.10-030110.201201181135_all.deb"
-KERNELS="$KERNELS ${KPATH}/v3.2.38-precise/linux-headers-3.2.38-030238_3.2.38-030238.201302060135_all.deb"
-KERNELS="$KERNELS ${KPATH}/v3.3.8-quantal/linux-headers-3.3.8-030308_3.3.8-030308.201206041356_all.deb"
-KERNELS="$KERNELS ${KPATH}/v3.4.32-quantal/linux-headers-3.4.32-030432_3.4.32-030432.201302171531_all.deb"
-KERNELS="$KERNELS ${KPATH}/v3.5.7-quantal/linux-headers-3.5.7-030507_3.5.7-030507.201210130556_all.deb"
-KERNELS="$KERNELS ${KPATH}/v3.6.11-raring/linux-headers-3.6.11-030611_3.6.11-030611.201212171335_all.deb"
-KERNELS="$KERNELS ${KPATH}/v3.7.9-raring/linux-headers-3.7.9-030709_3.7.9-030709.201302171607_all.deb"
-KERNELS="$KERNELS ${KPATH}/v3.8-raring/linux-headers-3.8.0-030800_3.8.0-030800.201302181935_all.deb"
-KERNELS="$KERNELS ${KPATH}/v3.9-rc1-raring/linux-headers-3.9.0-030900rc1_3.9.0-030900rc1.201303060659_all.deb"
-
-# Number of kernels
-NUM_KERNELS=$(echo $KERNELS | wc -w)
-
-# ~ 101 MiB for installed space on $KSRC_PREFIX/usr/src/ and $KSRC_PREFIX/lib/modules/
-SPACE_PER_KERNEL="101"
-
-# ~13 MiB of both deb files
-SPACE_PER_KERNEL_DEB="13"
-
-function get_ubuntu_kernels() {
-
- ARCH=$(uname -m)
- TARGET=""
-
- case $ARCH in
- "x86_64")
- TARGET="amd64"
- ;;
- "i686")
- TARGET="i386"
- ;;
- *)
- echo -e "Unsupported architecture"
- exit
- ;;
- esac
-
- mkdir -p debs
- cd debs
-
- for i in $KERNELS; do
- FILE=$(basename $i)
- PKG=$(echo $FILE | awk -F"_" '{print $1}')
-
- # Do not download if installed or deb exists
- if [[ ! -d $KSRC_PREFIX/usr/src/$PKG && ! -f $FILE ]]; then
- # Download the _all.deb
- wget -c $i
-
- # Download the generic-ARCH headers
- GENERIC_DEB=`echo $i | sed -e "s:\(.*\)_\(.*\)_all.deb:\1-generic_\2_$TARGET.deb:"`
- wget -c $GENERIC_DEB
- fi
- done
-
- # List of downloaded debs
- DEB_LIST=`ls linux-*.deb 2>/dev/null`
-
- if [[ -z $DEB_LIST ]]; then
- echo "All kernel sources are found in $KSRC_PREFIX/usr/src."
- exit
- fi
-
- # Create a temporary directory first
- TEMP_DIR=`mktemp -d`
-
- for deb in $DEB_LIST; do
- DIR_NAME=$(echo $deb | awk -F"_" '{print $1}')
- if [[ ! -d $KSRC_PREFIX/usr/src/$DIR_NAME ]]; then
- echo "Extracting $deb..."
- ar p $deb data.tar.gz | tar xz --exclude=usr/share -C $TEMP_DIR
- fi
- done
-
- # Move the extracted folders into the system
- if [[ -d $TEMP_DIR/lib/modules ]]; then
-
- # Relink lib/modules/*/build/ directories relatively to make it work
- # for regular user based workflows
- if [[ -n $KSRC_PREFIX ]]; then
- echo "Adjusting build/ symlinks for non-root installation..."
-
- for kernel in $(ls -d $TEMP_DIR/lib/modules/*generic); do
- unlink $kernel/build
- ln -s ../../../usr/src/linux-headers-`basename $kernel` $kernel/build
- done
- fi
-
- mv $TEMP_DIR/lib/modules/* $KSRC_PREFIX/lib/modules
- fi
- if [[ -d $TEMP_DIR/usr/src ]]; then
- # Because of a bug in make < 3.82, mixed implicit and normal
- # rules do not cause harm. Since the bug is fixed in the new make
- # we have to adjust older kernel's Makefiles to fix the bug.
- sed -i 's#^/ %/:#%/:#' $TEMP_DIR/usr/src/linux-headers-2.6.2[45678]-0*/Makefile &>/dev/null
-
- mv $TEMP_DIR/usr/src/* $KSRC_PREFIX/usr/src
- fi
-
- # Remove the temporary directory
- rm -rf $TEMP_DIR
-}
-
-function rebuild_header_binary_deps() {
- if [[ ! -d ${KSRC_PREFIX}/lib/modules/ ]]; then
- echo "You do not seem to have any vanilla kernels available to fix"
- exit 1
- fi
-
- COUNT=$(ls -d ${KSRC_PREFIX}/lib/modules/*generic | wc -l)
- if [[ $COUNT -le 0 ]]; then
- echo "You do not seem to have any vanilla kernels available to fix"
- exit 1
- fi
-
- for kernel in $(ls -d ${KSRC_PREFIX}/lib/modules/*generic | grep -E "/3.[2-9]|/[4-9]"); do
- echo $kernel
-
- count=0
- while [[ $count -ne 4 ]]; do
- for i in basic mod genksyms; do
- if [[ $count -eq 0 ]]; then
- make -C ${kernel}/build/ M=scripts/${i}/ clean > /dev/null 2>&1
- fi
- make -C ${kernel}/build/ M=scripts/${i}/ > /dev/null 2>&1
- done
- let count=$count+1
- done
- done
-}
-
-function usage() {
- echo -e "Usage: $0 [ -r ] [ -f ] "
- echo -e "-r Rebuilds binaries required in kernel headers. Use"
- echo -e " this option if you've already ran this script and"
- echo -e " just need to fix the libc versions against which"
- echo -e " the binaries in the headers files are linked against. "
- echo -e " This was added since kernels >= 3.4 require"
- echo -e " a glibc >= 2.14 for memcpy(), and not all Linux"
- echo -e " distributions have such versions of glibc."
- echo -e ""
- echo -e "-f Force running, do not ask"
-}
-
-if [[ $# -gt 3 ]]; then
- usage
- exit 1
-fi
-
-if [[ $1 == "-r" ]]; then
- rebuild_header_binary_deps
- exit
-fi
-
-if [[ $1 == "-f" ]]; then
- FORCE="1"
- shift
-fi
-
-# Check for the availability of 'ar' before continuing
-which ar 2>&1 > /dev/null
-if [[ $? -ne 0 ]]; then
- echo -e "${GREEN}ar${NORMAL} is not avilable, typically this is available through a package called binutils"
- echo -e "Install binutils and run this script again..."
- exit 1
-fi
-
-echo -e ""
-
-if [[ ! -n $KSRC_PREFIX ]]; then
- echo -e "** Running as a privileged user!"
- echo -e "** You are trying to force using ${BLUE}${KSRC_PREFIX}/lib/modules${NORMAL} and ${BLUE}${KSRC_PREFIX}/usr/src${NORMAL} ..."
- echo -e "** This is a terrible idea. Consider running as a regular user."
- echo -e ""
- read -p "Do you still want to continue (y/N)? "
- if [[ "${REPLY}" != "y" ]]; then
- echo -e "Bailing out !"
- exit 1
- fi
-fi
-
-echo -e "This will download ${YELLOW}${NUM_KERNELS}${NORMAL} kernel headers to allow you to"
-echo -e "cross compile any module over these kernels with ${GREEN}ckmake${NORMAL}."
-echo -e "The download payload is about ${YELLOW}~ $((${SPACE_PER_KERNEL_DEB} * ${NUM_KERNELS})) ${CYAN}MiB${NORMAL}, once uncompressed"
-echo -e "it will stash kernel header files under ${BLUE}$KSRC_PREFIX/usr/src/${NORMAL}"
-echo -e "and ${BLUE}$KSRC_PREFIX/lib/modules/${NORMAL} and consume about ~ ${YELLOW}$((${NUM_KERNELS} * ${SPACE_PER_KERNEL})) ${RED}MiB${NORMAL} of space."
-echo -e ""
-echo -e "The kernel headers used are from ${PURPLE}${UNDERLINE}Vanilla${NORMAL} kernels"
-echo -e "from the Ubuntu mainline / vanilla kernel PPA and are extracted"
-echo -e "using ${GREEN}ar${NORMAL} and ${GREEN}tar${NORMAL}:"
-echo -e ""
-echo -e "${BLUE}http://kernel.ubuntu.com/~kernel-ppa/mainline/${NORMAL}"
-echo -e ""
-
-if [[ "$FORCE" != "1" ]]; then
- read -p "Do you still want to continue (y/N)? "
- if [[ "${REPLY}" != "y" ]]; then
- echo -e "Bailing out !"
- exit 1
- fi
-fi
-
-get_ubuntu_kernels
-echo -e "Vanilla kernels headers ${BLUE}installed${NORMAL}, "
-echo -e "now going to ${GREEN}rebuild${NORMAL} some binary dependencies..."
-sleep 1
-rebuild_header_binary_deps
diff --git a/compat/bin/get-compat-trees b/compat/bin/get-compat-trees
deleted file mode 100755
index d7812457..00000000
--- a/compat/bin/get-compat-trees
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2012, Luis R. Rodriguez <mcgrof@frijolero.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# You can use this script to install all mainline kernels used
-# to test compile the Linux kernel compatibility module. You can
-# then use ckmake to cross compile against all supported kernels.
-
-# Pretty colors
-GREEN="\033[01;32m"
-YELLOW="\033[01;33m"
-NORMAL="\033[00m"
-BLUE="\033[34m"
-RED="\033[31m"
-PURPLE="\033[35m"
-CYAN="\033[36m"
-UNDERLINE="\033[02m"
-
-PREFIX=$HOME/
-
-GIT_TREES="git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"
-GIT_TREES="$GIT_TREES git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git"
-GIT_TREES="$GIT_TREES git://github.com/mcgrof/compat.git"
-GIT_TREES="$GIT_TREES git://github.com/mcgrof/compat-drivers.git"
-
-LINUX_GIT="git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
-
-which git 2>&1 > /dev/null
-if [[ $? -ne 0 ]]; then
- echo -e "You need to install ${PURPLE}git${NORMAL}"
- exit 1
-fi
-
-echo -e "This will typically take ~ ${YELLOW}10 ${CYAN}minutes${NORMAL}, download about "
-echo -e "~ ${YELLOW}1 ${CYAN}GiB${NORMAL} of data over your network, and then consume about "
-echo -e "~ ${YELLOW}2 ${CYAN}GiB${NORMAL} of hard drive space."
-
-read -p "Do you still want to continue (y/N)? "
-if [[ "${REPLY}" != "y" ]]; then
- echo -e "Bailing out !"
- exit 1
-fi
-
-mkdir -p $PREFIX
-cd $PREFIX
-
-for i in $GIT_TREES; do
- TREE=$(echo ${i} | awk -F"/" '{print $NF}')
-
- if [[ -d $PREFIX/$TREE ]]; then
- echo "${GREEN}${TREE}${NORMAL} is already present, skipping..."
- continue
- fi
-
- echo -e "Cloning ${GREEN}${TREE}${NORMAL}..."
-
- case $TREE in
- "linux-stable.git")
- cd $PREFIX/
- git clone $i
-
- cd $PREFIX/linux-stable
- # This lets us bake releases off of Linus' RC releases by
- # simply git fetch'ing "linus" and reseting the tree afterwards.
- git remote add linus $LINUX_GIT
- ;;
- "linux-next.git")
- cd $PREFIX
- git clone $i --reference $PREFIX/linux-stable/.git/
- ;;
- "compat-drivers.git")
- # This is just what scripts are tested for. Probably best to
- # unify all into one place but this will do for now.
- mkdir -p $PREFIX/devel/
- cd $PREFIX/devel/
- git clone $i
- ;;
- *)
- cd $PREFIX
- git clone $i
- ;;
- esac
-done
diff --git a/compat/scripts/compat_firmware_install b/compat/scripts/compat_firmware_install
deleted file mode 100755
index e4b9fb03..00000000
--- a/compat/scripts/compat_firmware_install
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-if [ -f /usr/bin/lsb_release ]; then
- LSB_RED_ID=$(/usr/bin/lsb_release -i -s)
-else
- LSB_RED_ID="Unknown"
-fi
-
-case $LSB_RED_ID in
-"Ubuntu")
- mkdir -p /lib/udev/ /lib/udev/rules.d/
- cp udev/ubuntu/compat_firmware.sh /lib/udev/
- cp udev/50-compat_firmware.rules /lib/udev/rules.d/
- ;;
-*)
- mkdir -p /lib/udev/ /lib/udev/rules.d/
- cp udev/compat_firmware.sh /lib/udev/
- cp udev/50-compat_firmware.rules /lib/udev/rules.d/
- ;;
-esac
-
diff --git a/compat/scripts/gen-compat-autoconf.sh b/compat/scripts/gen-compat-autoconf.sh
deleted file mode 100755
index e52cc5aa..00000000
--- a/compat/scripts/gen-compat-autoconf.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2012 Luis R. Rodriguez <mcgrof@frijolero.org>
-# Copyright 2011 Hauke Mehrtens <hauke@hauke-m.de>
-# Copyright 2011 John W. Linville <linville@tuxdriver.com>
-#
-# Use this to parse a small .config equivalent looking file to generate
-# our own autoconf.h. This file has defines for each config option
-# just like the kernels include/linux/autoconf.h
-#
-# XXX: consider using scripts/kconfig/confdata.c instead.
-# On the downside this would require the user to have libc though.
-
-# This indicates which is the oldest kernel we support
-# Update this if you are adding support for older kernels.
-OLDEST_KERNEL_SUPPORTED="2.6.24"
-
-if [ $# -ne 1 ]; then
- echo "Usage $0 config-file"
- exit
-fi
-
-COMPAT_CONFIG="$1"
-
-if [ ! -f $COMPAT_CONFIG ]; then
- echo "File $1 is not a file"
- exit
-fi
-
-# Defines a CONFIG_ option if not defined yet, this helps respect
-# linux/autoconf.h
-function define_config {
- VAR=$1
- VALUE=$2
- case $VALUE in
- n) # Try to undefine it
- echo "#undef $VAR"
- ;;
- y)
- echo "#ifndef $VAR"
- echo "#define $VAR 1"
- echo "#endif /* $VAR */"
- ;;
- m)
- echo "#ifndef $VAR"
- echo "#define $VAR 1"
- echo "#endif /* $VAR */"
- ;;
- *) # Assume string
- # XXX: add better checks to make sure what was on
- # the right was indeed a string
- echo "#ifndef $VAR"
- echo "#define $VAR \"$VALUE\""
- echo "#endif /* $VAR */"
- ;;
- esac
-}
-
-function kernel_version_req {
- VERSION=$(echo $1 | sed -e 's/\./,/g')
- echo "#if (LINUX_VERSION_CODE < KERNEL_VERSION($VERSION))"
- echo "#error compat requirement: Linux >= $VERSION"
- echo "#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION($VERSION) */"
-}
-
-cat <<EOF
-#ifndef COMPAT_AUTOCONF_INCLUDED
-#define COMPAT_AUTOCONF_INCLUDED
-/*
- * Automatically generated C config: don't edit
- */
-EOF
-
-# Checks user is compiling against a kernel we support
-kernel_version_req $OLDEST_KERNEL_SUPPORTED
-
-# For each CONFIG_FOO=x option
-for i in $(egrep '^CONFIG_|^ifdef CONFIG_|^ifndef CONFIG_|^endif #CONFIG_|^else #CONFIG_' $COMPAT_CONFIG | sed 's/ /+/'); do
- case $i in
- 'ifdef+CONFIG_'* )
- echo "#$i" | sed -e 's/+/ /' -e 's/\(ifdef CONFIG_COMPAT_KERNEL_3_\)\([0-9]*\)/if (LINUX_VERSION_CODE < KERNEL_VERSION(3,\2,0))/' -e 's/\(ifdef CONFIG_COMPAT_KERNEL_2_6_\)\([0-9]*\)/if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,\2))/' -e 's/\(ifdef CONFIG_COMPAT_RHEL_\)\([0-9]*\)_\([0-9]*\)/if (defined(RHEL_MAJOR) \&\& RHEL_MAJOR == \2 \&\& RHEL_MINOR >= \3)/' -e 's/\(#ifdef \)\(CONFIG_[^:space:]*\)/#if defined(\2) || defined(\2_MODULE)/'
- continue
- ;;
- 'ifndef+CONFIG_'* )
- echo "#$i" | sed -e 's/+/ /' -e 's/\(ifndef CONFIG_COMPAT_KERNEL_3_\)\([0-9]*\)/if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,\2,0))/' -e 's/\(ifndef CONFIG_COMPAT_KERNEL_2_6_\)\([0-9]*\)/if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,\2))/' -e 's/\(ifndef CONFIG_COMPAT_RHEL_\)\([0-9]*\)_\([0-9]*\)/if (!defined(RHEL_MAJOR) || RHEL_MAJOR != \2 || RHEL_MINOR < \3)/' -e 's/\(#ifndef \)\(CONFIG_[^:space:]*\)/#if !defined(\2) \&\& !defined(\2_MODULE)/'
- continue
- ;;
- 'else+#CONFIG_'* | 'endif+#CONFIG_'* )
- echo "#$i */" |sed -e 's/+#/ \/* /g'
- continue
- ;;
- CONFIG_* )
- # Get the element on the left of the "="
- VAR=$(echo $i | cut -d"=" -f 1)
- # Get the element on the right of the "="
- VALUE=$(echo $i | cut -d"=" -f 2)
-
- # Any other module which can *definitely* be built as a module goes here
- define_config $VAR $VALUE
- continue
- ;;
- esac
-done
-
-echo "#endif /* COMPAT_AUTOCONF_INCLUDED */"
diff --git a/compat/scripts/gen-compat-config.sh b/compat/scripts/gen-compat-config.sh
deleted file mode 100755
index 8dd6f4c4..00000000
--- a/compat/scripts/gen-compat-config.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/bash
-# Copyright 2012 Luis R. Rodriguez <mcgrof@frijolero.org>
-# Copyright 2012 Hauke Mehrtens <hauke@hauke-m.de>
-#
-# This generates a bunch of CONFIG_COMPAT_KERNEL_2_6_22
-# CONFIG_COMPAT_KERNEL_3_0 .. etc for each kernel release you need an object
-# for.
-#
-# Note: this is part of the compat.git project, not compat-drivers,
-# send patches against compat.git.
-
-if [[ ! -f ${KLIB_BUILD}/Makefile ]]; then
- exit
-fi
-
-# Actual kernel version
-KERNEL_VERSION=$(${MAKE} -C ${KLIB_BUILD} kernelversion | sed -n 's/^\([0-9]\)\..*/\1/p')
-
-# 3.0 kernel stuff
-COMPAT_LATEST_VERSION="9"
-KERNEL_SUBLEVEL="-1"
-
-# Note that this script will export all variables explicitly,
-# trying to export all with a blanket "export" statement at
-# the top of the generated file causes the build to slow down
-# by an order of magnitude.
-
-if [[ ${KERNEL_VERSION} -eq "3" ]]; then
- KERNEL_SUBLEVEL=$(${MAKE} -C ${KLIB_BUILD} kernelversion | sed -n 's/^3\.\([0-9]\+\).*/\1/p')
-else
- COMPAT_26LATEST_VERSION="39"
- KERNEL_26SUBLEVEL=$(${MAKE} -C ${KLIB_BUILD} kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
- let KERNEL_26SUBLEVEL=${KERNEL_26SUBLEVEL}+1
-
- for i in $(seq ${KERNEL_26SUBLEVEL} ${COMPAT_26LATEST_VERSION}); do
- eval CONFIG_COMPAT_KERNEL_2_6_${i}=y
- echo "export CONFIG_COMPAT_KERNEL_2_6_${i}=y"
- done
-fi
-
-let KERNEL_SUBLEVEL=${KERNEL_SUBLEVEL}+1
-for i in $(seq ${KERNEL_SUBLEVEL} ${COMPAT_LATEST_VERSION}); do
- eval CONFIG_COMPAT_KERNEL_3_${i}=y
- echo "export CONFIG_COMPAT_KERNEL_3_${i}=y"
-done
-
-# The purpose of these seem to be the inverse of the above other varibales.
-# The RHEL checks seem to annotate the existance of RHEL minor versions.
-RHEL_MAJOR=$(grep ^RHEL_MAJOR ${KLIB_BUILD}/Makefile | sed -n 's/.*= *\(.*\)/\1/p')
-if [[ ! -z ${RHEL_MAJOR} ]]; then
- RHEL_MINOR=$(grep ^RHEL_MINOR ${KLIB_BUILD}/Makefile | sed -n 's/.*= *\(.*\)/\1/p')
- for i in $(seq 0 ${RHEL_MINOR}); do
- eval CONFIG_COMPAT_RHEL_${RHEL_MAJOR}_${i}=y
- echo "export CONFIG_COMPAT_RHEL_${RHEL_MAJOR}_${i}=y"
- done
-fi
-
-if [[ ${CONFIG_COMPAT_KERNEL_2_6_33} = "y" ]]; then
- if [[ ! ${CONFIG_COMPAT_RHEL_6_0} = "y" ]]; then
- echo "export CONFIG_COMPAT_FIRMWARE_CLASS=m"
- fi
-fi
-
-if [[ ${CONFIG_COMPAT_KERNEL_2_6_36} = "y" ]]; then
- if [[ ! ${CONFIG_COMPAT_RHEL_6_1} = "y" ]]; then
- echo "export CONFIG_COMPAT_KFIFO=y"
- fi
-fi
-
-if [[ ${CONFIG_COMPAT_KERNEL_3_5} = "y" ]]; then
- # We don't have 2.6.24 backport support yet for Codel / FQ CoDel
- # For those who want to try this is what is required that I can tell
- # so far:
- # * struct Qdisc_ops
- # - init and change callback ops use a different argument dataype
- # - you need to parse data received from userspace differently
- if [[ ${CONFIG_COMPAT_KERNEL_2_6_25} != "y" ]]; then
- echo "export CONFIG_COMPAT_NET_SCH_CODEL=m"
- echo "export CONFIG_COMPAT_NET_SCH_FQ_CODEL=m"
- fi
-fi
diff --git a/compat/scripts/skip-colors b/compat/scripts/skip-colors
deleted file mode 100755
index 121626fb..00000000
--- a/compat/scripts/skip-colors
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-perl -pe 's|(\e)\[(\d+)(;*)(\d*)(\w)||g'
diff --git a/compat/udev/50-compat_firmware.rules b/compat/udev/50-compat_firmware.rules
deleted file mode 100644
index 6473788e..00000000
--- a/compat/udev/50-compat_firmware.rules
+++ /dev/null
@@ -1,4 +0,0 @@
-# do not edit this file, it will be overwritten on update
-
-# compat_firmware-class requests, copies files into the kernel
-SUBSYSTEM=="compat_firmware", ACTION=="add", RUN+="compat_firmware.sh"
diff --git a/compat/udev/compat_firmware.sh b/compat/udev/compat_firmware.sh
deleted file mode 100755
index ef609e71..00000000
--- a/compat/udev/compat_firmware.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh -e
-
-# This is ported from Ubuntu but ubuntu uses these directories which
-# other distributions don't care about:
-# FIRMWARE_DIRS="/lib/firmware/updates/$(uname -r) /lib/firmware/updates \
-# /lib/firmware/$(uname -r) /lib/firmware"
-# If your distribution looks for firmware in other directories
-# feel free to extend this and add your own directory here.
-#
-FIRMWARE_DIRS="/lib/firmware"
-
-err() {
- echo "$@" >&2
- logger -t "${0##*/}[$$]" "$@" 2>/dev/null || true
-}
-
-if [ ! -e /sys$DEVPATH/loading ]; then
- err "udev firmware loader misses sysfs directory"
- exit 1
-fi
-
-for DIR in $FIRMWARE_DIRS; do
- [ -e "$DIR/$FIRMWARE" ] || continue
- echo 1 > /sys$DEVPATH/loading
- cat "$DIR/$FIRMWARE" > /sys$DEVPATH/data
- echo 0 > /sys$DEVPATH/loading
- exit 0
-done
-
-echo -1 > /sys$DEVPATH/loading
-err "Cannot find firmware file '$FIRMWARE'"
-mkdir -p /dev/.udev/firmware-missing
-file=$(echo "$FIRMWARE" | sed 's:/:\\x2f:g')
-ln -s -f "$DEVPATH" /dev/.udev/firmware-missing/$file
-exit 1
diff --git a/compat/udev/ubuntu/compat_firmware.sh b/compat/udev/ubuntu/compat_firmware.sh
deleted file mode 100755
index 9d4659a3..00000000
--- a/compat/udev/ubuntu/compat_firmware.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh -e
-
-FIRMWARE_DIRS="/lib/firmware/updates/$(uname -r) /lib/firmware/updates \
- /lib/firmware/$(uname -r) /lib/firmware"
-
-err() {
- echo "$@" >&2
- logger -t "${0##*/}[$$]" "$@" 2>/dev/null || true
-}
-
-if [ ! -e /sys$DEVPATH/loading ]; then
- err "udev firmware loader misses sysfs directory"
- exit 1
-fi
-
-for DIR in $FIRMWARE_DIRS; do
- [ -e "$DIR/$FIRMWARE" ] || continue
- echo 1 > /sys$DEVPATH/loading
- cat "$DIR/$FIRMWARE" > /sys$DEVPATH/data
- echo 0 > /sys$DEVPATH/loading
- exit 0
-done
-
-echo -1 > /sys$DEVPATH/loading
-err "Cannot find firmware file '$FIRMWARE'"
-mkdir -p /dev/.udev/firmware-missing
-file=$(echo "$FIRMWARE" | sed 's:/:\\x2f:g')
-ln -s -f "$DEVPATH" /dev/.udev/firmware-missing/$file
-exit 1
diff --git a/config.mk b/config.mk
deleted file mode 100644
index c21b9b15..00000000
--- a/config.mk
+++ /dev/null
@@ -1,751 +0,0 @@
-ifeq ($(wildcard $(KLIB_BUILD)/.config),)
-# These will be ignored by compat autoconf
- export CONFIG_PCI=y
- export CONFIG_USB=y
- export CONFIG_PCMCIA=y
- export CONFIG_SSB=m
-else
-include $(KLIB_BUILD)/.config
-endif
-
-ifneq ($(wildcard $(KLIB_BUILD)/Makefile),)
-
-KERNEL_VERSION := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^\([0-9]\)\..*/\1/p')
-
-ifneq ($(KERNEL_VERSION),2)
-else
-KERNEL_26SUBLEVEL := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
-endif
-
-ifdef CONFIG_COMPAT_KERNEL_2_6_24
-$(error "ERROR: compat-drivers by default supports kernels >= 2.6.24, try enabling only one driver though")
-endif #CONFIG_COMPAT_KERNEL_2_6_24
-
-ifeq ($(CONFIG_CFG80211),y)
-$(error "ERROR: your kernel has CONFIG_CFG80211=y, you should have it CONFIG_CFG80211=m if you want to use this thing.")
-endif
-
-
-# 2.6.27 has FTRACE_DYNAMIC borked, so we will complain if
-# you have it enabled, otherwise you will very likely run into
-# a kernel panic.
-# XXX: move this to compat_autoconf.h script generation
-ifeq ($(KERNEL_VERSION),2)
-ifeq ($(shell test $(KERNEL_VERSION) -eq 2 -a $(KERNEL_26SUBLEVEL) -eq 27 && echo yes),yes)
-ifeq ($(CONFIG_DYNAMIC_FTRACE),y)
-$(error "ERROR: Your 2.6.27 kernel has CONFIG_DYNAMIC_FTRACE, please upgrade your distribution kernel as newer ones should not have this enabled (and if so report a bug) or remove this warning if you know what you are doing")
-endif
-endif
-endif
-
-# This is because with CONFIG_MAC80211 include/linux/skbuff.h will
-# enable on 2.6.27 a new attribute:
-#
-# skb->do_not_encrypt
-#
-# and on 2.6.28 another new attribute:
-#
-# skb->requeue
-#
-# In kernel 2.6.32 both attributes were removed.
-#
-# XXX: move this to compat_autoconf.h script generation
-ifeq ($(KERNEL_VERSION),2)
-ifeq ($(shell test $(KERNEL_VERSION) -eq 2 -a $(KERNEL_26SUBLEVEL) -ge 27 -a $(KERNEL_26SUBLEVEL) -le 31 && echo yes),yes)
-ifeq ($(CONFIG_MAC80211),)
-$(error "ERROR: Your >=2.6.27 and <= 2.6.31 kernel has CONFIG_MAC80211 disabled, you should have it CONFIG_MAC80211=m if you want to use this thing.")
-endif
-endif
-endif
-
-ifneq ($(KERNELRELEASE),) # This prevents a warning
-
-# We will warn when you don't have MQ support or NET_SCHED enabled.
-#
-# We could consider just quiting if MQ and NET_SCHED is disabled
-# as I suspect all users of this package want 802.11e (WME) and
-# 802.11n (HT) support.
-ifeq ($(CONFIG_NET_SCHED),)
- QOS_REQS_MISSING+=CONFIG_NET_SCHED
-endif
-
-ifneq ($(QOS_REQS_MISSING),) # Complain about our missing dependencies
-$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable in it $(QOS_REQS_MISSING) for 802.11[ne] support")
-endif
-
-endif # build check
-endif # kernel Makefile check
-
-# These both are needed by 802.11 and bluetooth so enable
- export CONFIG_COMPAT_RFKILL=y
-
-ifeq ($(CONFIG_MAC80211),y)
-$(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
-else
- export CONFIG_COMPAT_WIRELESS=y
- export CONFIG_COMPAT_WIRELESS_MODULES=m
- export CONFIG_COMPAT_VAR_MODULES=m
-# We could technically separate these but not yet, we only have b44
-# Note that we don't intend on backporting network drivers that
-# use Multiqueue as that was a pain to backport to kernels older than
-# 2.6.27. But -- we could just disable those drivers from kernels
-# older than 2.6.27
- export CONFIG_COMPAT_NETWORK_MODULES=m
- export CONFIG_COMPAT_NET_USB_MODULES=m
-endif
-
-# The Bluetooth compatibility only builds on kernels >= 2.6.27 for now
-ifndef CONFIG_COMPAT_KERNEL_2_6_27
-ifeq ($(CONFIG_BT),y)
-# we'll ignore compiling bluetooth
-else
- export CONFIG_COMPAT_BLUETOOTH=y
- export CONFIG_COMPAT_BLUETOOTH_MODULES=m
- export CONFIG_HID_GENERIC=m
-endif
-endif #CONFIG_COMPAT_KERNEL_2_6_27
-
-#
-# CONFIG_COMPAT_FIRMWARE_CLASS definition has no leading whitespace,
-# because it gets passed-on through compat_autoconf.h.
-#
-ifdef CONFIG_COMPAT_KERNEL_2_6_33
-ifndef CONFIG_COMPAT_RHEL_6_1
-ifdef CONFIG_FW_LOADER
-export CONFIG_COMPAT_FIRMWARE_CLASS=m
-endif #CONFIG_FW_LOADER
-endif #CONFIG_COMPAT_RHEL_6_1
-endif #CONFIG_COMPAT_KERNEL_2_6_33
-
-ifdef CONFIG_COMPAT_KERNEL_2_6_36
-ifndef CONFIG_COMPAT_RHEL_6_1
- export CONFIG_COMPAT_KFIFO=y
-endif #CONFIG_COMPAT_RHEL_6_1
-endif #CONFIG_COMPAT_KERNEL_2_6_36
-
-#
-# CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN definitions have no leading
-# whitespace, because they get passed-on through compat_autoconf.h.
-#
-ifndef CONFIG_COMPAT_KERNEL_2_6_33
-export CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN=y
-endif #CONFIG_COMPAT_KERNEL_2_6_33
-ifdef CONFIG_COMPAT_RHEL_6_0
-export CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN=y
-endif #CONFIG_COMPAT_RHEL_6_0
-
-#
-# CONFIG_COMPAT_FIRMWARE_DATA_RW_NEEDS_FILP definition has no leading
-# whitespace, because it gets passed-on through compat_autoconf.h.
-#
-ifdef CONFIG_COMPAT_RHEL_6_0
-export CONFIG_COMPAT_FIRMWARE_DATA_RW_NEEDS_FILP=y
-endif #CONFIG_COMPAT_RHEL_6_0
-
-# Wireless subsystem stuff
-export CONFIG_MAC80211=m
-
-ifndef CONFIG_COMPAT_KERNEL_2_6_33
-export CONFIG_COMPAT_MAC80211_DRIVER_API_TRACER=y
-endif #CONFIG_COMPAT_KERNEL_2_6_33
-
-# export CONFIG_MAC80211_DEBUGFS=y
-# export CONFIG_MAC80211_NOINLINE=y
-# export CONFIG_MAC80211_VERBOSE_DEBUG=y
-# export CONFIG_MAC80211_MESSAGE_TRACING=y
-# export CONFIG_MAC80211_DEBUG_COUNTERS=y
-
-# export CONFIG_MAC80211_IBSS_DEBUG=y
-# export CONFIG_MAC80211_PS_DEBUG=y
-# export CONFIG_MAC80211_HT_DEBUG=y
-# export CONFIG_MAC80211_MPL_DEBUG=y
-# export CONFIG_MAC80211_MPATH_DEBUG=y
-# export CONFIG_MAC80211_MHWMP_DEBUG=y
-# export CONFIG_MAC80211_MESH_SYNC_DEBUG=y
-# export CONFIG_MAC80211_TDLS_DEBUG=y
-# export CONFIG_MAC80211_STA_DEBUG=y
-# export CONFIG_MAC80211_MLME_DEBUG=y
-
-# choose between pid and minstrel as default rate control algorithm
-export CONFIG_MAC80211_RC_DEFAULT=minstrel_ht
-export CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
-# export CONFIG_MAC80211_RC_DEFAULT_PID=y
-# This is the one used by our compat-drivers net/mac80211/rate.c
-# in case you have and old kernel which is overriding this to pid.
-export CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel_ht
-export CONFIG_MAC80211_RC_PID=y
-export CONFIG_MAC80211_RC_MINSTREL=y
-export CONFIG_MAC80211_RC_MINSTREL_HT=y
-ifdef CONFIG_LEDS_TRIGGERS
-export CONFIG_MAC80211_LEDS=y
-endif #CONFIG_LEDS_TRIGGERS
-
-# enable mesh networking too
-export CONFIG_MAC80211_MESH=y
-
-export CONFIG_CFG80211=m
-export CONFIG_CFG80211_DEFAULT_PS=y
-# export CONFIG_CFG80211_DEBUGFS=y
-# export CONFIG_NL80211_TESTMODE=y
-# export CONFIG_CFG80211_DEVELOPER_WARNINGS=y
-# export CONFIG_CFG80211_REG_DEBUG=y
-# export CONFIG_CFG80211_INTERNAL_REGDB=y
-# See below for wext stuff
-
-ifndef CONFIG_COMPAT_KERNEL_2_6_33
-export CONFIG_COMPAT_CFG80211_DRIVER_API_TRACER=y
-endif #CONFIG_COMPAT_KERNEL_2_6_33
-
-export CONFIG_LIB80211=m
-export CONFIG_LIB80211_CRYPT_WEP=m
-export CONFIG_LIB80211_CRYPT_CCMP=m
-export CONFIG_LIB80211_CRYPT_TKIP=m
-# export CONFIG_LIB80211_DEBUG=y
-
-export CONFIG_BT=m
-export CONFIG_BT_RFCOMM=m
-ifndef CONFIG_COMPAT_KERNEL_2_6_33
-export CONFIG_COMPAT_BT_RFCOMM_TTY=y
-endif #CONFIG_COMPAT_KERNEL_2_6_33
-export CONFIG_BT_BNEP=m
-export CONFIG_BT_BNEP_MC_FILTER=y
-export CONFIG_BT_BNEP_PROTO_FILTER=y
-# CONFIG_BT_CMTP depends on ISDN_CAPI
-ifdef CONFIG_ISDN_CAPI
-export CONFIG_BT_CMTP=m
-endif #CONFIG_ISDN_CAPI
-ifndef CONFIG_COMPAT_KERNEL_2_6_28
-export CONFIG_COMPAT_BT_HIDP=m
-endif #CONFIG_COMPAT_KERNEL_2_6_28
-
-export CONFIG_BT_HCIUART=m
-export CONFIG_BT_HCIUART_H4=y
-export CONFIG_BT_HCIUART_BCSP=y
-export CONFIG_BT_HCIUART_ATH3K=y
-export CONFIG_BT_HCIUART_LL=y
-export CONFIG_BT_HCIUART_3WIRE=y
-
-export CONFIG_BT_HCIVHCI=m
-export CONFIG_BT_MRVL=m
-ifndef CONFIG_COMPAT_KERNEL_2_6_39
-ifdef CONFIG_TI_ST
-export CONFIG_BT_WILINK=m
-endif #CONFIG_TI_ST
-endif #CONFIG_COMPAT_KERNEL_2_6_39
-
-ifdef CONFIG_PCMCIA
-export CONFIG_BT_HCIDTL1=m
-export CONFIG_BT_HCIBT3C=m
-export CONFIG_BT_HCIBLUECARD=m
-export CONFIG_BT_HCIBTUART=m
-endif #CONFIG_PCMCIA
-
-
-# We need CONFIG_WIRELESS_EXT for CONFIG_CFG80211_WEXT for every kernel
-# version. The new way CONFIG_CFG80211_WEXT is called from the kernel
-# does not work with compat-drivers because it calls some callback
-# function on struct wiphy. This struct is shipped with compat-drivers
-# and changes from kernel version to version. We are using the
-# wireless_handlers attribute which will be activated by
-# export CONFIG_WIRELESS_EXT.
-ifdef CONFIG_WIRELESS_EXT
-export CONFIG_CFG80211_WEXT=y
-else #CONFIG_CFG80211_WEXT
-$(warning "WARNING: CONFIG_CFG80211_WEXT will be deactivated or not working because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like iwconfig will not work. To activate it build your kernel e.g. with CONFIG_LIBIPW=m.")
-endif #CONFIG_WIRELESS_EXT
-
-ifdef CONFIG_STAGING
-export CONFIG_COMPAT_STAGING=m
-endif #CONFIG_STAGING
-
-ifndef CONFIG_COMPAT_KERNEL_2_6_31
-# mac80211 test driver
-export CONFIG_COMPAT_MAC80211_HWSIM=m
-endif #CONFIG_COMPAT_KERNEL_2_6_31
-
-export CONFIG_ATH5K=m
-# export CONFIG_ATH5K_DEBUG=y
-# export CONFIG_ATH5K_TRACER=y
-# export CONFIG_ATH5K_AHB=y
-
-export CONFIG_ATH9K=m
-export CONFIG_ATH9K_HW=m
-export CONFIG_ATH9K_COMMON=m
-# export CONFIG_ATH9K_DEBUGFS=y
-# export CONFIG_ATH9K_AHB=y
-
-# Disable this to get minstrel as default, we leave the ath9k
-# rate control algorithm as the default for now as that is also
-# default upstream on the kernel. We will move this to minstrel
-# as default once we get minstrel properly tested and blessed by
-# our systems engineering team. CCK rates also need to be used
-# for long range considerations.
-export CONFIG_COMPAT_ATH9K_RATE_CONTROL=y
-
-export CONFIG_ATH9K_BTCOEX_SUPPORT=y
-
-ifndef CONFIG_COMPAT_KERNEL_2_6_27
-export CONFIG_ATH6KL=m
-# export CONFIG_ATH6KL_DEBUG=y
-# export CONFIG_ATH6KL_TRACING=y
-endif #CONFIG_COMPAT_KERNEL_2_6_27
-
-# PCI Drivers
-ifdef CONFIG_PCI
-
-export CONFIG_ATH5K_PCI=y
-export CONFIG_ATH9K_PCI=y
-
-ifndef CONFIG_COMPAT_KERNEL_2_6_31
-export CONFIG_WIL6210=m
-export CONFIG_WIL6210_ISR_COR=y
-endif #CONFIG_COMPAT_KERNEL_2_6_31
-
-export CONFIG_IWLWIFI=m
-export CONFIG_IWLDVM=m
-export CONFIG_IWLMVM=m
-export CONFIG_IWLWIFI_OPMODE_MODULAR=y
-export CONFIG_IWLWIFI_P2P=y
-# export CONFIG_IWLWIFI_DEBUG=y
-# export CONFIG_IWLWIFI_DEBUGFS=y
-# export CONFIG_IWLWIFI_DEVICE_TRACING=y
-# export CONFIG_IWLWIFI_DEBUG_EXPERIMENTAL_UCODE=y
-
-export CONFIG_IWLEGACY=m
-export CONFIG_COMPAT_IWL4965=m
-export CONFIG_IWL3945=m
-# export CONFIG_IWLEGACY_DEBUG=y
-# export CONFIG_IWLEGACY_DEBUGFS=y
-
-
-export CONFIG_B43=m
-export CONFIG_B43_HWRNG=y
-export CONFIG_B43_PCI_AUTOSELECT=y
-ifdef CONFIG_PCMCIA
-export CONFIG_B43_PCMCIA=y
-endif #CONFIG_PCMCIA
-ifdef CONFIG_MAC80211_LEDS
-export CONFIG_B43_LEDS=y
-endif #CONFIG_MAC80211_LEDS
-export CONFIG_B43_PHY_LP=y
-export CONFIG_B43_PHY_N=y
-export CONFIG_B43_PHY_HT=y
-# export CONFIG_B43_PHY_LCN=y
-# export CONFIG_B43_DEBUG=y
-
-export CONFIG_B43LEGACY=m
-export CONFIG_B43LEGACY_HWRNG=y
-export CONFIG_B43LEGACY_PCI_AUTOSELECT=y
-ifdef CONFIG_MAC80211_LEDS
-export CONFIG_B43LEGACY_LEDS=y
-endif #CONFIG_MAC80211_LEDS
-# export CONFIG_B43LEGACY_DEBUG=y
-export CONFIG_B43LEGACY_DMA=y
-export CONFIG_B43LEGACY_PIO=y
-
-ifdef CONFIG_WIRELESS_EXT
-# The Intel ipws
-export CONFIG_LIBIPW=m
-# export CONFIG_LIBIPW_DEBUG=y
-
-export CONFIG_IPW2100=m
-export CONFIG_IPW2100_MONITOR=y
-# export CONFIG_IPW2100_DEBUG=y
-export CONFIG_IPW2200=m
-export CONFIG_IPW2200_MONITOR=y
-export CONFIG_IPW2200_RADIOTAP=y
-export CONFIG_IPW2200_PROMISCUOUS=y
-export CONFIG_IPW2200_QOS=y
-# export CONFIG_IPW2200_DEBUG=y
-# The above enables use a second interface prefixed 'rtap'.
-# Example usage:
-#
-# % modprobe ipw2200 rtap_iface=1
-# % ifconfig rtap0 up
-# % tethereal -i rtap0
-#
-# If you do not specify 'rtap_iface=1' as a module parameter then
-# the rtap interface will not be created and you will need to turn
-# it on via sysfs:
-#
-# % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
-endif #CONFIG_WIRELESS_EXT
-
-ifdef CONFIG_SSB
-# Sonics Silicon Backplane
-export CONFIG_SSB_SPROM=y
-
-export CONFIG_SSB_BLOCKIO=y
-export CONFIG_SSB_PCIHOST=y
-export CONFIG_SSB_B43_PCI_BRIDGE=y
-ifdef CONFIG_PCMCIA
-export CONFIG_SSB_PCMCIAHOST=y
-endif #CONFIG_PCMCIA
-# export CONFIG_SSB_DEBUG=y
-export CONFIG_SSB_DRIVER_PCICORE=y
-export CONFIG_B43_SSB=y
-endif #CONFIG_SSB
-
-export CONFIG_BCMA=m
-export CONFIG_BCMA_BLOCKIO=y
-export CONFIG_BCMA_HOST_PCI=y
-# export CONFIG_BCMA_DEBUG=y
-export CONFIG_B43_BCMA=y
-export CONFIG_B43_BCMA_EXTRA=y
-
-export CONFIG_P54_PCI=m
-
-export CONFIG_B44=m
-export CONFIG_B44_PCI=y
-
-export CONFIG_RTL8180=m
-
-export CONFIG_ADM8211=m
-
-export CONFIG_RT2X00_LIB_PCI=m
-export CONFIG_RT2400PCI=m
-export CONFIG_RT2500PCI=m
-ifdef CONFIG_CRC_CCITT
-export CONFIG_RT2800PCI=m
-export CONFIG_RT2800PCI_RT3290=y
-export CONFIG_RT2800PCI_RT33XX=y
-export CONFIG_RT2800PCI_RT35XX=y
-export CONFIG_RT2800PCI_RT53XX=y
-endif #CONFIG_CRC_CCITT
-NEED_RT2X00=y
-
-# Two rt2x00 drivers require firmware: rt61pci and rt73usb. They depend on
-# CRC to check the firmware. We check here first for the PCI
-# driver as we're in the PCI section.
-ifdef CONFIG_CRC_ITU_T
-export CONFIG_RT61PCI=m
-endif #CONFIG_CRC_ITU_T
-
-export CONFIG_MWL8K=m
-
-# Ethernet drivers go here
-export CONFIG_ATL1=m
-export CONFIG_ATL2=m
-export CONFIG_ATL1E=m
-ifndef CONFIG_COMPAT_KERNEL_2_6_28
-export CONFIG_ATL1C=m
-export CONFIG_ALX=m
-# If MDIO is needed for another driver feel free to
-# make it not depend on 2.6.28
-export CONFIG_COMPAT_MDIO=m
-endif #CONFIG_COMPAT_KERNEL_2_6_28
-
-ifdef CONFIG_WIRELESS_EXT
-export CONFIG_HERMES=m
-export CONFIG_HERMES_CACHE_FW_ON_INIT=y
-ifdef CONFIG_PPC_PMAC
-export CONFIG_APPLE_AIRPORT=m
-endif #CONFIG_PPC_PMAC
-export CONFIG_PLX_HERMES=m
-export CONFIG_TMD_HERMES=m
-export CONFIG_NORTEL_HERMES=m
-export CONFIG_PCI_HERMES=m
-ifdef CONFIG_PCMCIA
-export CONFIG_PCMCIA_HERMES=m
-export CONFIG_PCMCIA_SPECTRUM=m
-endif #CONFIG_PCMCIA
-endif #CONFIG_WIRELESS_EXT
-
-export CONFIG_RTL8192CE=m
-export CONFIG_RTL8192SE=m
-export CONFIG_RTL8192DE=m
-export CONFIG_RTL8723AE=m
-
-export CONFIG_BRCMSMAC=m
-
-export CONFIG_MWIFIEX_PCIE=m
-
-endif #CONFIG_PCI
-## end of PCI
-
-ifdef CONFIG_PCMCIA
-
-ifdef CONFIG_COMPAT_KERNEL_2_6_27
-export CONFIG_LIBERTAS=n
-export CONFIG_LIBERTAS_CS=n
-else #CONFIG_COMPAT_KERNEL_2_6_27
-export CONFIG_LIBERTAS_CS=m
-NEED_LIBERTAS=y
-endif #CONFIG_COMPAT_KERNEL_2_6_27
-
-endif #CONFIG_PCMCIA
-## end of PCMCIA
-
-# This is required for some cards
-export CONFIG_EEPROM_93CX6=m
-
-# USB Drivers
-ifdef CONFIG_USB
-ifndef CONFIG_COMPAT_KERNEL_2_6_29
-export CONFIG_COMPAT_ZD1211RW=m
-# export CONFIG_ZD1211RW_DEBUG=y
-endif #CONFIG_COMPAT_KERNEL_2_6_29
-
-# Sorry, rndis_wlan uses cancel_work_sync which is new and can't be done in compat...
-
-# Wireless RNDIS USB support (RTL8185 802.11g) A-Link WL54PC
-# All of these devices are based on Broadcom 4320 chip which
-# is only wireless RNDIS chip known to date.
-# Note: this depends on CONFIG_USB_NET_RNDIS_HOST and CONFIG_USB_NET_CDCETHER
-# it also requires new RNDIS_HOST and CDC_ETHER modules which we add
-ifdef CONFIG_COMPAT_KERNEL_2_6_29
-export CONFIG_USB_COMPAT_USBNET=n
-export CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
-export CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
-export CONFIG_USB_NET_COMPAT_CDCETHER=n
-else #CONFIG_COMPAT_KERNEL_2_6_29
-export CONFIG_USB_COMPAT_USBNET=m
-ifdef CONFIG_USB_NET_CDCETHER
-export CONFIG_USB_NET_COMPAT_RNDIS_HOST=m
-export CONFIG_USB_NET_COMPAT_RNDIS_WLAN=m
-endif #CONFIG_USB_NET_CDCETHER
-ifdef CONFIG_USB_NET_CDCETHER_MODULE
-export CONFIG_USB_NET_COMPAT_RNDIS_HOST=m
-export CONFIG_USB_NET_COMPAT_RNDIS_WLAN=m
-endif #CONFIG_USB_NET_CDCETHER
-export CONFIG_USB_NET_COMPAT_CDCETHER=m
-endif #CONFIG_COMPAT_KERNEL_2_6_29
-
-
-export CONFIG_P54_USB=m
-export CONFIG_RTL8187=m
-ifdef CONFIG_MAC80211_LEDS
-export CONFIG_RTL8187_LEDS=y
-endif #CONFIG_MAC80211_LEDS
-
-export CONFIG_AT76C50X_USB=m
-
-ifndef CONFIG_COMPAT_KERNEL_2_6_29
-export CONFIG_CARL9170=m
-ifdef CONFIG_MAC80211_LEDS
-export CONFIG_CARL9170_LEDS=y
-endif #CONFIG_MAC80211_LEDS
-# export CONFIG_CARL9170_DEBUGFS=y
-export CONFIG_CARL9170_WPC=y
-endif #CONFIG_COMPAT_KERNEL_2_6_29
-
-# This activates a threading fix for usb urb.
-# this is mainline commit: b3e670443b7fb8a2d29831b62b44a039c283e351
-# This fix will be included in some stable releases.
-export CONFIG_COMPAT_USB_URB_THREAD_FIX=y
-
-export CONFIG_ATH9K_HTC=m
-# export CONFIG_ATH9K_HTC_DEBUGFS=y
-
-export CONFIG_ATH6KL_USB=m
-
-export CONFIG_AR5523=m
-
-export CONFIG_BRCMFMAC_USB=y
-
-# RT2500USB does not require firmware
-export CONFIG_RT2500USB=m
-ifdef CONFIG_CRC_CCITT
-export CONFIG_RT2800USB=m
-export CONFIG_RT2800USB_RT33XX=y
-export CONFIG_RT2800USB_RT35XX=y
-export CONFIG_RT2800USB_RT53XX=y
-export CONFIG_RT2800USB_RT55XX=y
-export CONFIG_RT2800USB_UNKNOWN=y
-endif #CONFIG_CRC_CCITT
-export CONFIG_RT2X00_LIB_USB=m
-NEED_RT2X00=y
-# RT73USB requires firmware
-ifdef CONFIG_CRC_ITU_T
-export CONFIG_RT73USB=m
-endif #CONFIG_CRC_ITU_T
-
-ifdef CONFIG_COMPAT_KERNEL_2_6_27
-export CONFIG_LIBERTAS_THINFIRM_USB=n
-export CONFIG_LIBERTAS_USB=n
-NEED_LIBERTAS=n
-else #CONFIG_COMPAT_KERNEL_2_6_27
-export CONFIG_LIBERTAS_THINFIRM_USB=m
-export CONFIG_LIBERTAS_USB=m
-NEED_LIBERTAS=y
-endif #CONFIG_COMPAT_KERNEL_2_6_27
-
-export CONFIG_ORINOCO_USB=m
-
-export CONFIG_BT_HCIBTUSB=m
-export CONFIG_BT_HCIBCM203X=m
-export CONFIG_BT_HCIBPA10X=m
-export CONFIG_BT_HCIBFUSB=m
-export CONFIG_BT_ATH3K=m
-
-export CONFIG_RTL8192CU=m
-
-export CONFIG_MWIFIEX_USB=m
-
-endif #CONFIG_USB end of USB driver list
-
-ifdef CONFIG_SPI_MASTER
-ifndef CONFIG_COMPAT_KERNEL_2_6_25
-
-ifdef CONFIG_CRC7
-ifndef CONFIG_COMPAT_KERNEL_2_6_37
-export CONFIG_COMPAT_WL1251_SPI=m
-endif #CONFIG_COMPAT_KERNEL_2_6_37
-export CONFIG_WLCORE_SPI=m
-endif #CONFIG_CRC7
-export CONFIG_P54_SPI=m
-
-ifdef CONFIG_COMPAT_KERNEL_2_6_27
-export CONFIG_LIBERTAS_SPI=n
-NEED_LIBERTAS=n
-else #CONFIG_COMPAT_KERNEL_2_6_27
-export CONFIG_LIBERTAS_SPI=m
-NEED_LIBERTAS=y
-endif #CONFIG_COMPAT_KERNEL_2_6_27
-
-endif #CONFIG_COMPAT_KERNEL_2_6_25
-endif #CONFIG_SPI_MASTER end of SPI driver list
-
-ifdef CONFIG_MMC
-
-export CONFIG_SSB_SDIOHOST=y
-export CONFIG_B43_SDIO=y
-
-ifdef CONFIG_CRC7
-ifdef CONFIG_WL12XX_PLATFORM_DATA
-ifndef CONFIG_COMPAT_KERNEL_2_6_37
-export CONFIG_COMPAT_WL1251_SDIO=m
-endif #CONFIG_COMPAT_KERNEL_2_6_37
-ifndef CONFIG_COMPAT_KERNEL_2_6_38
-export CONFIG_WLCORE_SDIO=m
-endif #CONFIG_COMPAT_KERNEL_2_6_38
-endif #CONFIG_WL12XX_PLATFORM_DATA
-endif #CONFIG_CRC7
-
-export CONFIG_MWIFIEX_SDIO=m
-
-ifndef CONFIG_COMPAT_KERNEL_2_6_32
-export CONFIG_COMPAT_LIBERTAS_SDIO=m
-NEED_LIBERTAS=y
-endif #CONFIG_COMPAT_KERNEL_2_6_32
-
-export CONFIG_BT_HCIBTSDIO=m
-export CONFIG_BT_MRVL_SDIO=m
-
-export CONFIG_ATH6KL_SDIO=m
-
-export CONFIG_BRCMFMAC_SDIO=y
-
-endif #CONFIG_MMC
-
-export CONFIG_RTLWIFI=m
-# export CONFIG_RTLWIFI_DEBUG=y
-export CONFIG_RTL8192C_COMMON=m
-
-# Common rt2x00 requirements
-ifeq ($(NEED_RT2X00),y)
-export CONFIG_RT2X00=y
-export CONFIG_RT2X00_LIB=m
-export CONFIG_RT2800_LIB=m
-export CONFIG_RT2X00_LIB_FIRMWARE=y
-export CONFIG_RT2X00_LIB_CRYPTO=y
-# export CONFIG_RT2X00_LIB_SOC=y
-ifdef CONFIG_COMPAT_KERNEL_2_6_25
-export CONFIG_RT2X00_LIB_LEDS=n
-else #CONFIG_COMPAT_KERNEL_2_6_25
-ifdef CONFIG_LEDS_CLASS
-export CONFIG_RT2X00_LIB_LEDS=y
-endif #CONFIG_LEDS_CLASS
-endif #CONFIG_COMPAT_KERNEL_2_6_25
-# export CONFIG_RT2X00_DEBUG=y
-# export CONFIG_RT2X00_LIB_DEBUGFS=y
-endif
-
-# p54
-export CONFIG_P54_COMMON=m
-ifdef CONFIG_MAC80211_LEDS
-export CONFIG_P54_LEDS=y
-endif #CONFIG_MAC80211_LEDS
-
-# Atheros
-export CONFIG_ATH_COMMON=m
-export CONFIG_ATH_CARDS=m
-# export CONFIG_ATH_DEBUG=y
-
-export CONFIG_BRCMUTIL=m
-# export CONFIG_BRCMDBG=y
-
-ifndef CONFIG_COMPAT_KERNEL_2_6_29
-export CONFIG_BRCMFMAC=m
-endif #CONFIG_COMPAT_KERNEL_2_6_29
-
-ifndef CONFIG_COMPAT_KERNEL_2_6_30
-
-export CONFIG_WL_TI=y
-export CONFIG_WLCORE=m
-
-ifdef CONFIG_CRC7
-export CONFIG_WL1251=m
-export CONFIG_WL12XX=m
-export CONFIG_WL18XX=m
-endif #CONFIG_CRC7
-
-endif #CONFIG_COMPAT_KERNEL_2_6_30
-
-ifndef CONFIG_COMPAT_KERNEL_2_6_27
-export CONFIG_COMPAT_MWIFIEX=m
-endif #CONFIG_COMPAT_KERNEL_2_6_27
-
-ifndef CONFIG_CORDIC
-export CONFIG_COMPAT_CORDIC=y
-endif #CONFIG_CORDIC
-
-ifndef CONFIG_CRC8
-export CONFIG_COMPAT_CRC8=y
-endif #CONFIG_CRC8
-
-ifdef CONFIG_COMPAT_KERNEL_2_6_27
-export CONFIG_LIBERTAS=n
-else #CONFIG_COMPAT_KERNEL_2_6_27
-ifeq ($(NEED_LIBERTAS),y)
-export CONFIG_LIBERTAS_THINFIRM=m
-export CONFIG_LIBERTAS=m
-export CONFIG_LIBERTAS_MESH=y
-# export CONFIG_LIBERTAS_DEBUG=y
-endif
-endif #CONFIG_COMPAT_KERNEL_2_6_27
-
-# We need the backported rfkill module on kernel < 2.6.31.
-# In more recent kernel versions use the in kernel rfkill module.
-ifdef CONFIG_COMPAT_KERNEL_2_6_31
-export CONFIG_RFKILL_BACKPORT=m
-ifdef CONFIG_LEDS_TRIGGERS
-export CONFIG_RFKILL_BACKPORT_LEDS=y
-endif #CONFIG_LEDS_TRIGGERS
-export CONFIG_RFKILL_BACKPORT_INPUT=y
-endif #CONFIG_COMPAT_KERNEL_2_6_31
-
-# compilation has been tested down to 3.0 but run time
-# tests have only started on 3.2.
-ifndef CONFIG_COMPAT_KERNEL_3_2
-# Basic DRM support
-export CONFIG_COMPAT_HDMI=m
-export CONFIG_COMPAT_VIDEO_MODULES=y
-export CONFIG_COMPAT_DRM=m
-export CONFIG_COMPAT_DRM_TTM=m
-export CONFIG_COMPAT_DRM_KMS_HELPER=m
-export CONFIG_COMPAT_DRM_LOAD_EDID_FIRMWARE=y
-# Intel i915
-export CONFIG_COMPAT_DRM_I915=m
-# ATI/AMD Radeon
-export CONFIG_COMPAT_DRM_RADEON=m
-export CONFIG_COMPAT_DRM_RADEON_KMS=y
-endif #CONFIG_COMPAT_KERNEL_3_2
-
-# Enable nouveau on >= 3.3
-ifndef CONFIG_COMPAT_KERNEL_3_3
-export CONFIG_COMPAT_DRM_NOUVEAU=m
-export CONFIG_COMPAT_DRM_NOUVEAU_BACKLIGHT=y
-export CONFIG_COMPAT_NOUVEAU_DEBUG=5
-export CONFIG_COMPAT_NOUVEAU_DEBUG_DEFAULT=3
-endif #CONFIG_COMPAT_KERNEL_3_3
diff --git a/enable-older-kernels/README b/enable-older-kernels/README
deleted file mode 100644
index c26e35a8..00000000
--- a/enable-older-kernels/README
+++ /dev/null
@@ -1,12 +0,0 @@
-compat-drivers as a whole aims to always be compiled and used with the
-oldest stable kernel supported by kernel.org. This will be the oldest
-stable kernel on the 2.6. series listed on the kernel.org front page.
-Sometimes we'll go even beyond that.
-
-Backporting compat-drivers involves backporting some subsystems but
-at times we may want to support compiling only certain drivers on older
-kernels since its easier to backport some subsystems. Such is the case
-with PCI drivers. This directly exists to allow developers enable
-compilation of compat-drivers on older drivers using ./scripts/driver-select
-Upon selection of a driver a patch from this directly will be applied to
-allow further compilation of one driver onto even older kernels.
diff --git a/enable-older-kernels/enable-2.6.21.patch b/enable-older-kernels/enable-2.6.21.patch
deleted file mode 100644
index 83e1daf2..00000000
--- a/enable-older-kernels/enable-2.6.21.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/config.mk
-+++ b/config.mk
-@@ -33,9 +33,9 @@ endif
- COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
- $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_3_$(ver)=y))
-
--ifdef CONFIG_COMPAT_KERNEL_2_6_24
--$(error "ERROR: compat-drivers by default supports kernels >= 2.6.24, try enabling only one driver though")
--endif #CONFIG_COMPAT_KERNEL_2_6_24
-+ifdef CONFIG_COMPAT_KERNEL_2_6_21
-+$(error "ERROR: compat-drivers by default supports kernels >= 2.6.21, try enabling only one driver though")
-+endif #CONFIG_COMPAT_KERNEL_2_6_21
-
- ifeq ($(CONFIG_CFG80211),y)
- $(error "ERROR: your kernel has CONFIG_CFG80211=y, you should have it CONFIG_CFG80211=m if you want to use this thing.")
---- a/scripts/gen-compat-autoconf.sh
-+++ b/scripts/gen-compat-autoconf.sh
-@@ -11,7 +11,7 @@
-
- # This indicates which is the oldest kernel we support
- # Update this if you are adding support for older kernels.
--OLDEST_KERNEL_SUPPORTED="2.6.24"
-+OLDEST_KERNEL_SUPPORTED="2.6.21"
- COMPAT_RELEASE=".compat_version"
- KERNEL_RELEASE=".compat_base_tree_version"
- MULT_DEP_FILE=".compat_pivot_dep"
diff --git a/enable-older-kernels/enable-2.6.22.patch b/enable-older-kernels/enable-2.6.22.patch
deleted file mode 100644
index 9caebbac..00000000
--- a/enable-older-kernels/enable-2.6.22.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/config.mk
-+++ b/config.mk
-@@ -33,9 +33,9 @@ endif
- COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
- $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_3_$(ver)=y))
-
--ifdef CONFIG_COMPAT_KERNEL_2_6_24
--$(error "ERROR: compat-drivers by default supports kernels >= 2.6.24, try enabling only one driver though")
--endif #CONFIG_COMPAT_KERNEL_2_6_24
-+ifdef CONFIG_COMPAT_KERNEL_2_6_22
-+$(error "ERROR: compat-drivers by default supports kernels >= 2.6.22, try enabling only one driver though")
-+endif #CONFIG_COMPAT_KERNEL_2_6_22
-
- ifeq ($(CONFIG_CFG80211),y)
- $(error "ERROR: your kernel has CONFIG_CFG80211=y, you should have it CONFIG_CFG80211=m if you want to use this thing.")
---- a/scripts/gen-compat-autoconf.sh
-+++ b/scripts/gen-compat-autoconf.sh
-@@ -11,7 +11,7 @@
-
- # This indicates which is the oldest kernel we support
- # Update this if you are adding support for older kernels.
--OLDEST_KERNEL_SUPPORTED="2.6.24"
-+OLDEST_KERNEL_SUPPORTED="2.6.22"
- COMPAT_RELEASE=".compat_version"
- KERNEL_RELEASE=".compat_base_tree_version"
- MULT_DEP_FILE=".compat_pivot_dep"
diff --git a/enable-older-kernels/enable-2.6.23.patch b/enable-older-kernels/enable-2.6.23.patch
deleted file mode 100644
index f36bba7f..00000000
--- a/enable-older-kernels/enable-2.6.23.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/config.mk
-+++ b/config.mk
-@@ -33,9 +33,9 @@ endif
- COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
- $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_3_$(ver)=y))
-
--ifdef CONFIG_COMPAT_KERNEL_2_6_24
--$(error "ERROR: compat-drivers by default supports kernels >= 2.6.24, try enabling only one driver though")
--endif #CONFIG_COMPAT_KERNEL_2_6_24
-+ifdef CONFIG_COMPAT_KERNEL_2_6_23
-+$(error "ERROR: compat-drivers by default supports kernels >= 2.6.23, try enabling only one driver though")
-+endif #CONFIG_COMPAT_KERNEL_2_6_23
-
- ifeq ($(CONFIG_CFG80211),y)
- $(error "ERROR: your kernel has CONFIG_CFG80211=y, you should have it CONFIG_CFG80211=m if you want to use this thing.")
---- a/scripts/gen-compat-autoconf.sh
-+++ b/scripts/gen-compat-autoconf.sh
-@@ -11,7 +11,7 @@
-
- # This indicates which is the oldest kernel we support
- # Update this if you are adding support for older kernels.
--OLDEST_KERNEL_SUPPORTED="2.6.24"
-+OLDEST_KERNEL_SUPPORTED="2.6.23"
- COMPAT_RELEASE=".compat_version"
- KERNEL_RELEASE=".compat_base_tree_version"
- MULT_DEP_FILE=".compat_pivot_dep"
diff --git a/scripts/kconfig/Makefile b/kconfig/Makefile
index 98dacf96..30447101 100644
--- a/scripts/kconfig/Makefile
+++ b/kconfig/Makefile
@@ -1,9 +1,3 @@
-export COMPAT_BASE=$(shell cat $(PWD)/.compat_base)
-export COMPAT_BASE_TREE=$(shell cat $(PWD)/.compat_base_tree)
-export COMPAT_BASE_TREE_VERSION=$(shell cat $(PWD)/.compat_base_tree_version)
-export COMPAT_PROJECT=compat-drivers
-export COMPAT_VERSION=$(shell cat $(PWD)/.compat_version)
-
menuconfig:
gcc -Wp,-MD,scripts/kconfig/.conf.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -DCURSES_LOC="<ncurses.h>" -DLOCALE -c -o scripts/kconfig/conf.o scripts/kconfig/conf.c
gcc -Wp,-MD,scripts/kconfig/lxdialog/.checklist.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -DCURSES_LOC="<ncurses.h>" -DLOCALE -c -o scripts/kconfig/lxdialog/checklist.o scripts/kconfig/lxdialog/checklist.c
diff --git a/scripts/kconfig/conf.c b/kconfig/conf.c
index e39fcd81..e39fcd81 100644
--- a/scripts/kconfig/conf.c
+++ b/kconfig/conf.c
diff --git a/scripts/kconfig/confdata.c b/kconfig/confdata.c
index 13ddf112..13ddf112 100644
--- a/scripts/kconfig/confdata.c
+++ b/kconfig/confdata.c
diff --git a/scripts/kconfig/expr.c b/kconfig/expr.c
index d6626521..d6626521 100644
--- a/scripts/kconfig/expr.c
+++ b/kconfig/expr.c
diff --git a/scripts/kconfig/expr.h b/kconfig/expr.h
index cdd48600..cdd48600 100644
--- a/scripts/kconfig/expr.h
+++ b/kconfig/expr.h
diff --git a/scripts/kconfig/list.h b/kconfig/list.h
index 0ae730be..0ae730be 100644
--- a/scripts/kconfig/list.h
+++ b/kconfig/list.h
diff --git a/scripts/kconfig/lkc.h b/kconfig/lkc.h
index f8aee5fc..f8aee5fc 100644
--- a/scripts/kconfig/lkc.h
+++ b/kconfig/lkc.h
diff --git a/scripts/kconfig/lkc_proto.h b/kconfig/lkc_proto.h
index ef1a7381..ef1a7381 100644
--- a/scripts/kconfig/lkc_proto.h
+++ b/kconfig/lkc_proto.h
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/kconfig/lxdialog/check-lxdialog.sh
index 80788137..80788137 100644
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/kconfig/lxdialog/check-lxdialog.sh
diff --git a/scripts/kconfig/lxdialog/checklist.c b/kconfig/lxdialog/checklist.c
index a2eb80fb..a2eb80fb 100644
--- a/scripts/kconfig/lxdialog/checklist.c
+++ b/kconfig/lxdialog/checklist.c
diff --git a/scripts/kconfig/lxdialog/dialog.h b/kconfig/lxdialog/dialog.h
index aa3d6d9a..aa3d6d9a 100644
--- a/scripts/kconfig/lxdialog/dialog.h
+++ b/kconfig/lxdialog/dialog.h
diff --git a/scripts/kconfig/lxdialog/inputbox.c b/kconfig/lxdialog/inputbox.c
index 21404a04..21404a04 100644
--- a/scripts/kconfig/lxdialog/inputbox.c
+++ b/kconfig/lxdialog/inputbox.c
diff --git a/scripts/kconfig/lxdialog/menubox.c b/kconfig/lxdialog/menubox.c
index 48d382e7..48d382e7 100644
--- a/scripts/kconfig/lxdialog/menubox.c
+++ b/kconfig/lxdialog/menubox.c
diff --git a/scripts/kconfig/lxdialog/textbox.c b/kconfig/lxdialog/textbox.c
index a48bb93e..a48bb93e 100644
--- a/scripts/kconfig/lxdialog/textbox.c
+++ b/kconfig/lxdialog/textbox.c
diff --git a/scripts/kconfig/lxdialog/util.c b/kconfig/lxdialog/util.c
index 109d5311..109d5311 100644
--- a/scripts/kconfig/lxdialog/util.c
+++ b/kconfig/lxdialog/util.c
diff --git a/scripts/kconfig/lxdialog/yesno.c b/kconfig/lxdialog/yesno.c
index 4e6e8090..4e6e8090 100644
--- a/scripts/kconfig/lxdialog/yesno.c
+++ b/kconfig/lxdialog/yesno.c
diff --git a/scripts/kconfig/mconf.c b/kconfig/mconf.c
index 566288a7..566288a7 100644
--- a/scripts/kconfig/mconf.c
+++ b/kconfig/mconf.c
diff --git a/scripts/kconfig/menu.c b/kconfig/menu.c
index f3bffa30..f3bffa30 100644
--- a/scripts/kconfig/menu.c
+++ b/kconfig/menu.c
diff --git a/scripts/kconfig/symbol.c b/kconfig/symbol.c
index ecc5aa5f..ecc5aa5f 100644
--- a/scripts/kconfig/symbol.c
+++ b/kconfig/symbol.c
diff --git a/scripts/kconfig/util.c b/kconfig/util.c
index 6e7fbf19..6e7fbf19 100644
--- a/scripts/kconfig/util.c
+++ b/kconfig/util.c
diff --git a/scripts/kconfig/zconf.hash.c b/kconfig/zconf.hash.c
index 40df0005..40df0005 100644
--- a/scripts/kconfig/zconf.hash.c
+++ b/kconfig/zconf.hash.c
diff --git a/scripts/kconfig/zconf.lex.c b/kconfig/zconf.lex.c
index a0521aa5..a0521aa5 100644
--- a/scripts/kconfig/zconf.lex.c
+++ b/kconfig/zconf.lex.c
diff --git a/scripts/kconfig/zconf.tab.c b/kconfig/zconf.tab.c
index f636141e..f636141e 100644
--- a/scripts/kconfig/zconf.tab.c
+++ b/kconfig/zconf.tab.c
diff --git a/patches/crap/README b/patches/crap/README
deleted file mode 100644
index ff1ae85c..00000000
--- a/patches/crap/README
+++ /dev/null
@@ -1,17 +0,0 @@
-
-compat-drivers crap patches
-============================
-
-If you are including patches into this directory you
-must be fixing some critical bug for a customer which needs
-immediate release or immediate testing.
-
-Alternatively you would use this to apply some sort of
-crap code you are maintaining.
-
-You must have a really good reason to be adding files
-in this directory. If possible you should explain your
-reasoning of why the patch is getting included here and
-not upstream and why it hasn't even yet been posted.
-
-You should avoid these patches at all costs.
diff --git a/patches/linux-next-cherry-picks/README b/patches/linux-next-cherry-picks/README
deleted file mode 100644
index 101a51ad..00000000
--- a/patches/linux-next-cherry-picks/README
+++ /dev/null
@@ -1,20 +0,0 @@
-compat-drivers linux-next chery picked patches
-==============================================
-
-We work hard to get patches in time onto the stable
-tree but sometimes a few things slip out, and sometimes a
-stable fix is simply too big in size to be merged into
-stable. In such cases though we do believe some of these
-patches are still relatively important to either enable new
-hardware which escaped the late rc cycles or to correct some
-behaviour which might be too late for stable. We apply
-these patches by default as they will be supported on these
-releases.
-
-The larger the number of patches you see in this directory
-the more we should be ashamed. We should strive to reduce this
-to 0 all the time.
-
-This directory will always be empty for bleeding edge
-releases as bleeding edge releases are always based on
-linux-next already.
diff --git a/patches/linux-next-cherry-picks/network/.gitignore b/patches/linux-next-cherry-picks/network/.gitignore
deleted file mode 100644
index e69de29b..00000000
--- a/patches/linux-next-cherry-picks/network/.gitignore
+++ /dev/null
diff --git a/patches/linux-next-pending/README b/patches/linux-next-pending/README
deleted file mode 100644
index 092fc5fe..00000000
--- a/patches/linux-next-pending/README
+++ /dev/null
@@ -1,18 +0,0 @@
-
-compat-drivers linux-next-pending patches
-==========================================
-
-You must have a really good reason to be adding files
-in this directory. The requirement is your patches must have
-been posted to a public mailing list for the subsystem you are
-working on. Each patch you add here must have a really good
-explanation on the top of the file which clarifies why the
-patch has not yet been merged OR specify it on the commit log
-when you add it on compat-drivers.
-
-We try to avoid having patch files because but we understand
-if you might because you need to test code posted but not yet
-merged into linux-next or a stable kernel release. This can happen
-often during the merge window, when the maintainers are unavailable,
-on vacation, suck at what they do, or for any other uncontrollable
-reasons.
diff --git a/patches/linux-next-pending/network/.gitignore b/patches/linux-next-pending/network/.gitignore
deleted file mode 100644
index e69de29b..00000000
--- a/patches/linux-next-pending/network/.gitignore
+++ /dev/null
diff --git a/patches/pending-stable/.ignore b/patches/pending-stable/.ignore
deleted file mode 100644
index d95fa138..00000000
--- a/patches/pending-stable/.ignore
+++ /dev/null
@@ -1 +0,0 @@
-ath9k-lock-reset-and-PCU-start-stopping.patch
diff --git a/patches/pending-stable/README b/patches/pending-stable/README
deleted file mode 100644
index 52529d6e..00000000
--- a/patches/pending-stable/README
+++ /dev/null
@@ -1,23 +0,0 @@
-compat-drivers pending-stable/ patches
-=======================================
-
-Often right before the merge window we get a block on non
-oops/regression fixes for stable fixes. Some stable fixes
-often get propagated afterwards during the extraversion
-maintenance of the kernels. Right before the merge window
-circa rc4 and rc5 subsystem maintainers get pegged if they
-throw in non oops/regression fixes for Linus or their
-respective upstream maintainer. While this makes sense
-for tree management and stable release considerations we
-still need to get users some stable patches propagated.
-
-This directory is there to help with that. Only patches
-which have been merged into linux-next.git will be included
-in this directory which means you must post it and the maintainer
-should have merged it and Stephen would have picked it up.
-
-This directory will always be empty for bleeding edge
-releases as bleeding edge releases are always based on
-linux-next already. This directory only makes sense for
-stable release of the kernel, and it we will always try
-to use it, in case there are stable fixes not yet propagated.
diff --git a/patches/pending-stable/drm/.ignore b/patches/pending-stable/drm/.ignore
deleted file mode 100644
index 8b137891..00000000
--- a/patches/pending-stable/drm/.ignore
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/patches/pending-stable/network/.gitignore b/patches/pending-stable/network/.gitignore
deleted file mode 100644
index e69de29b..00000000
--- a/patches/pending-stable/network/.gitignore
+++ /dev/null
diff --git a/patches/unified-drivers/README.md b/patches/unified-drivers/README.md
deleted file mode 100644
index 1f606908..00000000
--- a/patches/unified-drivers/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# compat-driver unified driver backport patches
-
-compat-drivers supports developers to supply a unified
-driver git tree which is being used to target support
-for getting the driver in line with requirements for
-linux-next. Once the driver gets upstream the driver
-gets removed and we cherry pick updated version of the
-driver directly from linux upstream.
-
-The code provided on this tree must try to adhere to
-conventions for targetting inclusion into linux-next.
-The compat-drivers patches/unified-drivers/ directory
-allows for any additional required backport delta to
-be addressed for the supplied driver. This allows
-development and transformation of the driver to always
-be targetting linux-next and allows for backporting
-to be dealt with separately.
diff --git a/patches/unified-drivers/network/0001-backport-alx.patch b/patches/unified-drivers/network/0001-backport-alx.patch
deleted file mode 100644
index ea343c41..00000000
--- a/patches/unified-drivers/network/0001-backport-alx.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-This should go into patches/01-netdev.patch
-
---- a/drivers/net/ethernet/atheros/alx/alx_main.c
-+++ b/drivers/net/ethernet/atheros/alx/alx_main.c
-@@ -98,7 +98,11 @@ static void __alx_set_rx_mode(struct net
-
- /* comoute mc addresses' hash value ,and put it into hash table */
- netdev_for_each_mc_addr(ha, netdev)
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
- alx_add_mc_addr(hw, ha->addr);
-+#else
-+ alx_add_mc_addr(hw, ha->dmi_addr);
-+#endif
-
- ALX_MEM_W32(hw, ALX_HASH_TBL0, hw->mc_hash[0]);
- ALX_MEM_W32(hw, ALX_HASH_TBL1, hw->mc_hash[1]);
-@@ -130,8 +134,10 @@ static int alx_set_mac_address(struct ne
- if (!is_valid_ether_addr(addr->sa_data))
- return -EADDRNOTAVAIL;
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
- if (netdev->addr_assign_type & NET_ADDR_RANDOM)
- netdev->addr_assign_type ^= NET_ADDR_RANDOM;
-+#endif
-
- memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
- memcpy(hw->mac_addr, addr->sa_data, netdev->addr_len);
-@@ -1138,6 +1144,7 @@ static void alx_set_vlan_mode(struct alx
- }
-
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
- static netdev_features_t alx_fix_features(struct net_device *netdev,
- netdev_features_t features)
- {
-@@ -1170,6 +1177,7 @@ static int alx_set_features(struct net_d
-
- return 0;
- }
-+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
-
- /* alx_change_mtu - Change the Maximum Transfer Unit */
- static int alx_change_mtu(struct net_device *netdev, int new_mtu)
-@@ -1194,7 +1202,17 @@ static int alx_change_mtu(struct net_dev
- adpt->hw.mtu = new_mtu;
- adpt->rxbuf_size = new_mtu > ALX_DEF_RXBUF_SIZE ?
- ALIGN(max_frame, 8) : ALX_DEF_RXBUF_SIZE;
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
-+ if (new_mtu > (7*1024)) {
-+ netdev->features &= ~NETIF_F_TSO;
-+ netdev->features &= ~NETIF_F_TSO6;
-+ } else {
-+ netdev->features |= NETIF_F_TSO;
-+ netdev->features |= NETIF_F_TSO6;
-+ }
-+#else
- netdev_update_features(netdev);
-+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */
- if (netif_running(netdev))
- alx_reinit(adpt, false);
- }
-@@ -2460,8 +2478,10 @@ static const struct net_device_ops alx_n
- .ndo_change_mtu = alx_change_mtu,
- .ndo_do_ioctl = alx_ioctl,
- .ndo_tx_timeout = alx_tx_timeout,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
- .ndo_fix_features = alx_fix_features,
- .ndo_set_features = alx_set_features,
-+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
- #ifdef CONFIG_NET_POLL_CONTROLLER
- .ndo_poll_controller = alx_poll_controller,
- #endif
-@@ -2563,7 +2583,7 @@ alx_probe(struct pci_dev *pdev, const st
- goto err_iomap;
- }
-
-- netdev->netdev_ops = &alx_netdev_ops;
-+ netdev_attach_ops(netdev, &alx_netdev_ops);
- alx_set_ethtool_ops(netdev);
- netdev->irq = pdev->irq;
- netdev->watchdog_timeo = ALX_WATCHDOG_TIME;
-@@ -2608,12 +2628,21 @@ alx_probe(struct pci_dev *pdev, const st
- }
- }
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
- netdev->hw_features = NETIF_F_SG |
- NETIF_F_HW_CSUM |
- NETIF_F_HW_VLAN_RX |
- NETIF_F_TSO |
- NETIF_F_TSO6;
- netdev->features = netdev->hw_features | NETIF_F_HW_VLAN_TX;
-+#else
-+ netdev->features = NETIF_F_SG |
-+ NETIF_F_HW_CSUM |
-+ NETIF_F_HW_VLAN_RX |
-+ NETIF_F_TSO |
-+ NETIF_F_TSO6 |
-+ NETIF_F_HW_VLAN_TX;
-+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
-
- /* read permanent mac addr from register or eFuse */
- if (alx_get_perm_macaddr(hw, hw->perm_addr)) {
-@@ -2789,6 +2818,8 @@ static struct pci_error_handlers alx_err
- };
-
- #ifdef CONFIG_PM_SLEEP
-+compat_pci_suspend(alx_suspend);
-+compat_pci_resume(alx_resume);
- static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
- #define ALX_PM_OPS (&alx_pm_ops)
- #else
-@@ -2802,7 +2833,12 @@ static struct pci_driver alx_driver = {
- .remove = alx_remove,
- .shutdown = alx_shutdown,
- .err_handler = &alx_err_handler,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
- .driver.pm = ALX_PM_OPS,
-+#elif defined(CONFIG_PM_SLEEP)
-+ .suspend = alx_suspend_compat,
-+ .resume = alx_resume_compat,
-+#endif
- };
-
-
diff --git a/patches/unified-drivers/network/0002-enable-alx.patch b/patches/unified-drivers/network/0002-enable-alx.patch
deleted file mode 100644
index 9bf65bca..00000000
--- a/patches/unified-drivers/network/0002-enable-alx.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-Once upstream this will not be required.
-
---- a/drivers/net/ethernet/atheros/Makefile
-+++ b/drivers/net/ethernet/atheros/Makefile
-@@ -6,3 +6,4 @@ obj-$(CONFIG_ATL1) += atlx/
- obj-$(CONFIG_ATL2) += atlx/
- obj-$(CONFIG_ATL1E) += atl1e/
- obj-$(CONFIG_ATL1C) += atl1c/
-+obj-$(CONFIG_ALX) += alx/
diff --git a/patches/unified-drivers/network/0004-alx-deactivate-loopback-test.patch b/patches/unified-drivers/network/0004-alx-deactivate-loopback-test.patch
deleted file mode 100644
index 3ed96a43..00000000
--- a/patches/unified-drivers/network/0004-alx-deactivate-loopback-test.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/drivers/net/ethernet/atheros/alx/alx_ethtool.c
-+++ b/drivers/net/ethernet/atheros/alx/alx_ethtool.c
-@@ -1687,7 +1687,9 @@ static void alx_self_test(struct net_dev
- {
- struct alx_adapter *adpt = netdev_priv(netdev);
- bool if_running = netif_running(netdev);
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
- bool phy_lpback = etest->flags & ETH_TEST_FL_EXTERNAL_LB;
-+#endif
-
- ALX_FLAG_SET(adpt, TESTING);
- memset(data, 0, sizeof(u64) * ALX_TEST_LEN);
-@@ -1707,10 +1709,12 @@ static void alx_self_test(struct net_dev
- if (alx_diag_interrupt(adpt, &data[2]))
- etest->flags |= ETH_TEST_FL_FAILED;
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
- if (phy_lpback)
- etest->flags |= ETH_TEST_FL_EXTERNAL_LB_DONE;
- if (alx_diag_loopback(adpt, &data[3], phy_lpback))
- etest->flags |= ETH_TEST_FL_FAILED;
-+#endif
-
- } else {
- netif_info(adpt, hw, adpt->netdev, "online test start...\n");
diff --git a/patches/unified-drivers/network/0005-alx-intx-msi-workaround.patch b/patches/unified-drivers/network/0005-alx-intx-msi-workaround.patch
deleted file mode 100644
index e982c35e..00000000
--- a/patches/unified-drivers/network/0005-alx-intx-msi-workaround.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-For new kernels this is dealt with in drivers/pci/quirks.c
-Since older kernels will not have this we add a hack to the
-driver to deal with the PCI quirk.
-
---- a/drivers/net/ethernet/atheros/alx/alx_main.c
-+++ b/drivers/net/ethernet/atheros/alx/alx_main.c
-@@ -1032,6 +1032,9 @@ static int alx_identify_hw(struct alx_ad
- if (rev < ALX_REV_C0) {
- hw->ptrn_ofs = 0x600;
- hw->max_ptrns = 8;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+ pdev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
-+#endif
- } else {
- hw->ptrn_ofs = 0x14000;
- hw->max_ptrns = 16;
diff --git a/scripts/admin-clean.sh b/scripts/admin-clean.sh
deleted file mode 100755
index dd266709..00000000
--- a/scripts/admin-clean.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-if [ -d net ] ; then
- make clean
-fi
-rm -rf net
-rm -rf drivers
-rm -rf include
-rm -rf compat
-rm -rf udev
-rm -f .compat_base_tree
-rm -f .compat_base_tree_version
-rm -f .compat_version
-rm -f code-metrics.txt
-echo "Cleaned compat-drivers"
diff --git a/scripts/admin-refresh.sh b/scripts/admin-refresh.sh
deleted file mode 100755
index caf63e06..00000000
--- a/scripts/admin-refresh.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-./scripts/admin-clean.sh $@
-./scripts/admin-update.sh $@
diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
deleted file mode 100755
index d4d7d0b2..00000000
--- a/scripts/admin-update.sh
+++ /dev/null
@@ -1,999 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright 2007, 2008, 2010 Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
-#
-# Use this to update compat-drivers to the latest
-# linux-next.git tree you have.
-#
-# Usage: you should have the latest pull of linux-next.git
-# git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
-# We assume you have it on your ~/linux-next/ directory. If you do,
-# just run this script from the compat-drivers directory.
-# You can specify where your GIT_TREE is by doing:
-#
-# export GIT_TREE=/home/mcgrof/linux-next/
-
-# Pretty colors
-GREEN="\033[01;32m"
-YELLOW="\033[01;33m"
-NORMAL="\033[00m"
-BLUE="\033[34m"
-RED="\033[31m"
-PURPLE="\033[35m"
-CYAN="\033[36m"
-UNDERLINE="\033[02m"
-
-# File in which code metrics will be written
-CODE_METRICS=code-metrics.txt
-
-STABLE_PREFIX=".stable_"
-PENDING_STABLE_DIR="patches/pending-stable"
-
-# The GIT URL's for linux-next and compat trees
-GIT_URL="git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git"
-GIT_COMPAT_URL="git://github.com/mcgrof/compat.git"
-
-####################
-# Helper functions #
-# ##################
-
-# Refresh patches using quilt
-patchRefresh() {
- if [ -d .pc ] ; then
- OLD_PATCH_DIR=$(cat .pc/.quilt_patches)
- if [ "$OLD_PATCH_DIR" != "$1" ] ; then
- echo "found old quilt run for ${OLD_PATCH_DIR}, will skip it for ${1}"
- return;
- fi
- fi
-
- if [ -d patches.orig ] ; then
- rm -rf .pc patches/series
- else
- mkdir patches.orig
- fi
-
- export QUILT_PATCHES=$1
-
- mv -u $1/* patches.orig/
-
- for i in patches.orig/*.patch; do
- if [ ! -f "$i" ]; then
- echo -e "${RED}No patches found in $1${NORMAL}"
- break;
- fi
- echo -e "${GREEN}Refresh backport patch${NORMAL}: ${BLUE}${1}/$(basename $i)${NORMAL}"
- quilt import $i
- quilt push -f
- RET=$?
- if [[ $RET -ne 0 ]]; then
- echo -e "${RED}Refreshing $i failed${NORMAL}, update it"
- echo -e "use ${CYAN}quilt edit [filename]${NORMAL} to apply the failed part manually"
- echo -e "use ${CYAN}quilt refresh${NORMAL} after the files are corrected and rerun this script"
- cp patches.orig/README $1/README
- exit $RET
- fi
- QUILT_DIFF_OPTS="-p" quilt refresh -p ab --no-index --no-timestamp
- done
- quilt pop -a
-
- rm -rf patches.orig .pc $1/series
-}
-
-###
-# usage() function
-###
-usage() {
- printf "Usage: $0 [refresh] [ --help | -h | -b | -s | -n | -p | -c [ -u ] [subsystems]
- where subsystems can be network, drm or both. Network is enabled by default.\n\n"
-
- printf "${GREEN}%10s${NORMAL} - Update all your patch offsets using quilt\n" "refresh"
- printf "${GREEN}%10s${NORMAL} - Only copy over compat code, do not copy driver code\n" "-b"
- printf "${GREEN}%10s${NORMAL} - Get and apply pending-stable/ fixes purging old files there\n" "-s"
- printf "${GREEN}%10s${NORMAL} - Apply the patches from linux-next-cherry-picks directory\n" "-n"
- printf "${GREEN}%10s${NORMAL} - Apply the patches from linux-next-pending directory\n" "-p"
- printf "${GREEN}%10s${NORMAL} - Apply the patches from crap directory\n" "-c"
- printf "${GREEN}%10s${NORMAL} - Apply the patches from unified directory\n" "-u"
-}
-
-###
-# Code metrics related functions
-# 4 parameters get passed to them:
-# (ORIG_CODE, CHANGES, ADD, DEL)
-###
-brag_backport() {
- COMPAT_FILES_CODE=$(find ./ -type f -name \*.[ch] | egrep "^./compat/|include/linux/compat" |
- xargs wc -l | tail -1 | awk '{print $1}')
- let COMPAT_ALL_CHANGES=$2+$COMPAT_FILES_CODE
- printf "${GREEN}%10s${NORMAL} - backport code changes\n" $2
- printf "${GREEN}%10s${NORMAL} - backport code additions\n" $3
- printf "${GREEN}%10s${NORMAL} - backport code deletions\n" $4
- printf "${GREEN}%10s${NORMAL} - backport from compat module\n" $COMPAT_FILES_CODE
- printf "${GREEN}%10s${NORMAL} - total backport code\n" $COMPAT_ALL_CHANGES
- printf "${RED}%10s${NORMAL} - %% of code consists of backport work\n" \
- $(perl -e 'printf("%.4f", 100 * '$COMPAT_ALL_CHANGES' / '$1');')
-}
-
-nag_pending_stable() {
- printf "${YELLOW}%10s${NORMAL} - Code changes brought in from pending-stable\n" $2
- printf "${YELLOW}%10s${NORMAL} - Code additions brought in from pending-stable\n" $3
- printf "${YELLOW}%10s${NORMAL} - Code deletions brought in from pending-stable\n" $4
- printf "${RED}%10s${NORMAL} - %% of code being cherry picked from pending-stable\n" $(perl -e 'printf("%.4f", 100 * '$2' / '$1');')
-}
-
-nag_next_cherry_pick() {
- printf "${YELLOW}%10s${NORMAL} - Code changes brought in from linux-next\n" $2
- printf "${YELLOW}%10s${NORMAL} - Code additions brought in from linux-next\n" $3
- printf "${YELLOW}%10s${NORMAL} - Code deletions brought in from linux-next\n" $4
- printf "${RED}%10s${NORMAL} - %% of code being cherry picked from linux-next\n" $(perl -e 'printf("%.4f", 100 * '$2' / '$1');')
-}
-
-nag_pending() {
- printf "${YELLOW}%10s${NORMAL} - Code changes posted but not yet merged\n" $2
- printf "${YELLOW}%10s${NORMAL} - Code additions posted but not yet merged\n" $3
- printf "${YELLOW}%10s${NORMAL} - Code deletions posted but not yet merged\n" $4
- printf "${RED}%10s${NORMAL} - %% of code not yet merged\n" $(perl -e 'printf("%.4f", 100 * '$2' / '$1');')
-}
-
-nag_crap() {
- printf "${RED}%10s${NORMAL} - Crap changes not yet posted\n" $2
- printf "${RED}%10s${NORMAL} - Crap additions not yet posted\n" $3
- printf "${RED}%10s${NORMAL} - Crap deletions not yet posted\n" $4
- printf "${RED}%10s${NORMAL} - %% of crap code\n" $(perl -e 'printf("%.4f", 100 * '$2' / '$1');')
-}
-
-nag_unified() {
- printf "${RED}%10s${NORMAL} - Unified driver backport changes required to backport\n" $2
- printf "${RED}%10s${NORMAL} - Unified driver backport additions required\n" $3
- printf "${RED}%10s${NORMAL} - Unified driver backport deletions required\n" $4
- printf "${RED}%10s${NORMAL} - %% of unified backport code\n" $(perl -e 'printf("%.4f", 100 * '$2' / '$1');')
-}
-
-nagometer() {
- CHANGES=0
-
- ORIG_CODE=$2
- ADD=$(grep -Hc ^+ $1/*.patch| awk -F":" 'BEGIN {sum=0} {sum += $2} END { print sum}')
- DEL=$(grep -Hc ^- $1/*.patch| awk -F":" 'BEGIN {sum=0} {sum += $2} END { print sum}')
- # Total code is irrelevant unless you take into account each part,
- # easier to just compare against the original code.
- # let TOTAL_CODE=$ORIG_CODE+$ADD-$DEL
-
- let CHANGES=$ADD+$DEL
-
- case `dirname $1` in
- "patches/collateral-evolutions")
- brag_backport $ORIG_CODE $CHANGES $ADD $DEL
- ;;
- "patches/pending-stable")
- nag_pending_stable $ORIG_CODE $CHANGES $ADD $DEL
- ;;
- "patches/linux-next-cherry-picks")
- nag_next_cherry_pick $ORIG_CODE $CHANGES $ADD $DEL
- ;;
- "patches/linux-next-pending")
- nag_pending $ORIG_CODE $CHANGES $ADD $DEL
- ;;
- "patches/crap")
- nag_crap $ORIG_CODE $CHANGES $ADD $DEL
- ;;
- "patches/unified-drivers")
- nag_unified $ORIG_CODE $CHANGES $ADD $DEL
- ;;
- *)
- ;;
- esac
-
-}
-
-# Copy each file in $1 into $2
-copyFiles() {
- FILES=$1
- TARGET=$2
- for file in $FILES; do
- echo "Copying $GIT_TREE/$TARGET/$file"
- cp "$GIT_TREE/$TARGET/$file" $TARGET/
- done
-}
-
-copyDirectories() {
- DIRS=$1
- for dir in $DIRS; do
- echo "Copying $GIT_TREE/$dir/*.[ch]"
- cp $GIT_TREE/$dir/{Kconfig,Makefile,*.[ch]} $dir/ &> /dev/null
- done
-}
-
-# First check cmdline args to understand
-# which patches to apply and which release tag to set.
-#
-# Release tags (with corresponding cmdline switches):
-# ---------------------------------------------------
-# s: Include pending-stable/ patches (-s)
-# n: Include linux-next-cherry-picks/ patches (-n)
-# p: Include linux-next-pending/ patches (-p)
-# c: Include crap/ patches (-c)
-# u: Include unified-drivers/ patches (-u)
-# Note that the patches under patches/collateral-evolutions/{subsystem}
-# are applied by default.
-#
-# If "refresh" is given as a cmdline argument, the script
-# uses quilt to refresh the patches. This is useful if patches
-# can not be applied correctly after a code update in $GIT_URL.
-#
-# A final parameter drm, wlan or both determines which subsystem
-# drivers will be fetched in from the GIT repository. To retain
-# compatibility with compat-wireless, wlan/bt/eth drivers are
-# fetched in by default.
-ENABLE_NETWORK=1
-ENABLE_DRM=1
-ENABLE_UNIFIED=0
-SUBSYSTEMS=
-UNIFIED_DRIVERS=
-
-EXTRA_PATCHES="patches/collateral-evolutions"
-REFRESH="n"
-GET_STABLE_PENDING="n"
-POSTFIX_RELEASE_TAG=""
-
-# User exported this variable
-if [ -z $GIT_TREE ]; then
- GIT_TREE="$HOME/linux-next"
- if [ ! -d $GIT_TREE ]; then
- echo "Please tell me where your linux-next git tree is."
- echo "You can do this by exporting its location as follows:"
- echo
- echo " export GIT_TREE=$HOME/linux-next"
- echo
- echo "If you do not have one you can clone the repository:"
- echo " git clone $GIT_URL"
- echo
- echo "Alternatively, you can use get-compat-trees script "
- echo "from compat.git tree to fetch the necessary trees."
- exit 1
- fi
-else
- echo "You said to use git tree at: $GIT_TREE for linux-next"
-fi
-
-if [ -z $GIT_COMPAT_TREE ]; then
- GIT_COMPAT_TREE="$HOME/compat"
- if [ ! -d $GIT_COMPAT_TREE ]; then
- echo "Please tell me where your compat git tree is."
- echo "You can do this by exporting its location as follows:"
- echo
- echo " export GIT_COMPAT_TREE=$HOME/compat"
- echo
- echo "If you do not have one you can clone the repository:"
- echo " git clone $GIT_COMPAT_URL"
- echo
- echo "Alternatively, you can use get-compat-trees script "
- echo "from compat.git tree to fetch the necessary trees."
- exit 1
- fi
-else
- echo "You said to use git tree at: $GIT_COMPAT_TREE for compat"
-fi
-
-# Now define what files to copy from $GIT_URL
-INCLUDE_NET_BT="hci_core.h
- l2cap.h
- bluetooth.h
- rfcomm.h
- hci.h
- hci_mon.h
- mgmt.h
- sco.h
- smp.h
- a2mp.h
- amp.h"
-
-# Required wlan headers from include/linux
-INCLUDE_LINUX_WLAN="ieee80211.h
- pci_ids.h
- eeprom_93cx6.h
- ath9k_platform.h
- wl12xx.h
- rndis.h
- bcm47xx_wdt.h"
-
-# For rndis_wext
-INCLUDE_LINUX_USB_WLAN="usbnet.h
- rndis_host.h"
-
-# For rndis_wlan, we need a new rndis_host.ko, cdc_ether.ko and usbnet.ko
-RNDIS_REQUIREMENTS="Makefile
- rndis_host.c
- cdc_ether.c
- usbnet.c"
-
-# For libertas driver
-INCLUDE_LINUX_LIBERTAS_WLAN="libertas_spi.h"
-
-# Required wlan headers from include/uapi/linux
-INCLUDE_UAPI_LINUX_WLAN="nl80211.h
- rfkill.h"
-
-# 802.11 related headers
-INCLUDE_NET="cfg80211.h
- cfg80211-wext.h
- ieee80211_radiotap.h
- lib80211.h
- mac80211.h
- regulatory.h"
-
-# Network related directories
-NET_WLAN_DIRS="net/wireless
- net/mac80211
- net/rfkill"
-
-# Bluetooth related directories
-NET_BT_DIRS="net/bluetooth
- net/bluetooth/bnep
- net/bluetooth/cmtp
- net/bluetooth/rfcomm
- net/bluetooth/hidp"
-
-# Drivers that have their own directory
-DRIVERS_WLAN="drivers/net/wireless/ath
- drivers/net/wireless/ath/carl9170
- drivers/net/wireless/ath/ar5523
- drivers/net/wireless/ath/ath5k
- drivers/net/wireless/ath/ath6kl
- drivers/net/wireless/ath/ath9k
- drivers/net/wireless/ath/wil6210
- drivers/ssb
- drivers/bcma
- drivers/net/wireless/b43
- drivers/net/wireless/b43legacy
- drivers/net/wireless/brcm80211
- drivers/net/wireless/brcm80211/brcmfmac
- drivers/net/wireless/brcm80211/brcmsmac
- drivers/net/wireless/brcm80211/brcmsmac/phy
- drivers/net/wireless/brcm80211/brcmutil
- drivers/net/wireless/brcm80211/include
- drivers/net/wireless/iwlegacy
- drivers/net/wireless/iwlwifi
- drivers/net/wireless/iwlwifi/pcie
- drivers/net/wireless/iwlwifi/dvm
- drivers/net/wireless/iwlwifi/mvm
- drivers/net/wireless/rt2x00
- drivers/net/wireless/zd1211rw
- drivers/net/wireless/libertas
- drivers/net/wireless/p54
- drivers/net/wireless/rtl818x
- drivers/net/wireless/rtl818x/rtl8180
- drivers/net/wireless/rtl818x/rtl8187
- drivers/net/wireless/rtlwifi
- drivers/net/wireless/rtlwifi/rtl8192c
- drivers/net/wireless/rtlwifi/rtl8192ce
- drivers/net/wireless/rtlwifi/rtl8192cu
- drivers/net/wireless/rtlwifi/rtl8192se
- drivers/net/wireless/rtlwifi/rtl8192de
- drivers/net/wireless/rtlwifi/rtl8723ae
- drivers/net/wireless/libertas_tf
- drivers/net/wireless/ipw2x00
- drivers/net/wireless/ti
- drivers/net/wireless/ti/wl12xx
- drivers/net/wireless/ti/wl1251
- drivers/net/wireless/ti/wlcore
- drivers/net/wireless/ti/wl18xx
- drivers/net/wireless/orinoco
- drivers/net/wireless/mwifiex"
-
-# Staging drivers
-STAGING_DRIVERS=""
-
-# Ethernet drivers having their own directory
-DRIVERS_ETH="drivers/net/ethernet/atheros
- drivers/net/ethernet/atheros/atl1c
- drivers/net/ethernet/atheros/atl1e
- drivers/net/ethernet/atheros/atlx"
-
-# Ethernet drivers that have their own file alone
-DRIVERS_ETH_FILES="mdio.c"
-
-# Bluetooth drivers
-DRIVERS_BT="drivers/bluetooth"
-
-# Drivers that belong the the wireless directory
-DRIVERS_WLAN_FILES="adm8211.c
- adm8211.h
- at76c50x-usb.c
- at76c50x-usb.h
- mac80211_hwsim.c
- mac80211_hwsim.h
- mwl8k.c
- rndis_wlan.c"
-
-# DRM drivers
-DRIVERS_DRM="drivers/gpu/drm/ast
- drivers/gpu/drm/cirrus
- drivers/gpu/drm/gma500
- drivers/gpu/drm/i2c
- drivers/gpu/drm/i810
- drivers/gpu/drm/i915
- drivers/gpu/drm/mgag200
- drivers/gpu/drm/nouveau
- drivers/gpu/drm/radeon
- drivers/gpu/drm/ttm
- drivers/gpu/drm/via
- drivers/gpu/drm/vmwgfx"
-
-# UDL uses the new dma-buf API, let's disable this for now
-#DRIVERS="$DRIVERS drivers/gpu/drm/udl"
-
-rm -rf drivers/
-rm -f code-metrics.txt
-
-mkdir -p include/net/bluetooth \
- include/linux/usb \
- include/linux/unaligned \
- include/linux/spi \
- include/trace \
- include/pcmcia \
- include/crypto \
- include/uapi \
- include/uapi/linux \
- drivers/bcma \
- drivers/misc/eeprom \
- drivers/net/usb \
- drivers/net/ethernet/broadcom \
- drivers/platform/x86 \
- drivers/ssb \
- drivers/staging \
- $NET_WLAN_DIRS \
- $NET_BT_DIRS \
- $DRIVERS_WLAN \
- $DRIVERS_ETH \
- $DRIVERS_BT \
- $DRIVERS_DRM \
- drivers/video
-
-
-
-function refresh_compat()
-{
- # Compat stuff
- COMPAT="compat"
- mkdir -p $COMPAT
- echo "Copying $GIT_COMPAT_TREE/ files..."
- cp $GIT_COMPAT_TREE/compat/*.[ch] $COMPAT/
- cp $GIT_COMPAT_TREE/compat/Makefile $COMPAT/
- cp -a $GIT_COMPAT_TREE/udev .
- cp -a $GIT_COMPAT_TREE/scripts $COMPAT/
- cp $GIT_COMPAT_TREE/bin/ckmake $COMPAT/
- cp -a $GIT_COMPAT_TREE/include/linux/* include/linux/
- cp -a $GIT_COMPAT_TREE/include/net/* include/net/
- cp -a $GIT_COMPAT_TREE/include/trace/* include/trace/
- cp -a $GIT_COMPAT_TREE/include/pcmcia/* include/pcmcia/
- cp -a $GIT_COMPAT_TREE/include/crypto/* include/crypto/
-}
-
-function gen_compat_labels()
-{
-
- DIR="$PWD"
- cd $GIT_TREE
- GIT_DESCRIBE=$(git describe)
- GIT_BRANCH=$(git branch --no-color |sed -n 's/^\* //p')
- GIT_BRANCH=${GIT_BRANCH:-master}
- GIT_REMOTE=$(git config branch.${GIT_BRANCH}.remote)
- GIT_REMOTE=${GIT_REMOTE:-origin}
- GIT_REMOTE_URL=$(git config remote.${GIT_REMOTE}.url)
- GIT_REMOTE_URL=${GIT_REMOTE_URL:-unknown}
-
- cd $GIT_COMPAT_TREE
- git describe > $DIR/.compat_base
- cd $DIR
-
- echo -e "${GREEN}Updated${NORMAL} from local tree: ${BLUE}${GIT_TREE}${NORMAL}"
- echo -e "Origin remote URL: ${CYAN}${GIT_REMOTE_URL}${NORMAL}"
- cd $DIR
- if [ -d ./.git ]; then
- if [[ ${POSTFIX_RELEASE_TAG} != "" ]]; then
- echo -e "$(git describe)-${POSTFIX_RELEASE_TAG}" > .compat_version
- else
- echo -e "$(git describe)" > .compat_version
- fi
-
- cd $GIT_TREE
- TREE_NAME=${GIT_REMOTE_URL##*/}
-
- echo $TREE_NAME > $DIR/.compat_base_tree
- echo $GIT_DESCRIBE > $DIR/.compat_base_tree_version
-
- case $TREE_NAME in
- "wireless-testing.git") # John's wireless-testing
- echo -e "This is a ${RED}wireless-testing.git${NORMAL} compat-drivers release"
- ;;
- "linux-next.git") # The linux-next integration testing tree
- echo -e "This is a ${RED}linux-next.git${NORMAL} compat-drivers release"
- ;;
- "linux-stable.git") # Greg's all stable tree
- echo -e "This is a ${GREEN}linux-stable.git${NORMAL} compat-drivers release"
- ;;
- "linux-2.6.git") # Linus' 2.6 tree
- echo -e "This is a ${GREEN}linux-2.6.git${NORMAL} compat-drivers release"
- ;;
- *)
- ;;
- esac
-
- cd $DIR
- echo -e "\nBase tree: ${GREEN}$(cat .compat_base_tree)${NORMAL}" >> $CODE_METRICS
- echo -e "Base tree version: ${PURPLE}$(cat .compat_base_tree_version)${NORMAL}" >> $CODE_METRICS
- echo -e "compat.git: ${CYAN}$(cat .compat_base)${NORMAL}" >> $CODE_METRICS
- echo -e "compat-drivers release: ${YELLOW}$(cat .compat_version)${NORMAL}" >> $CODE_METRICS
-
- fi
-
-
- echo -e "Code metrics archive: ${GREEN}http://bit.ly/H6BTF7${NORMAL}" >> $CODE_METRICS
-
- cat $CODE_METRICS
-}
-
-
-if [ $# -ge 1 ]; then
- if [ $# -gt 6 ]; then
- usage $0
- exit
- fi
- while [ $# -ne 0 ]; do
- case $1 in
- "-b")
- refresh_compat
- gen_compat_labels
- exit
- ;;
- "-s")
- GET_STABLE_PENDING="y"
- EXTRA_PATCHES="${EXTRA_PATCHES} patches/pending-stable"
- EXTRA_PATCHES="${EXTRA_PATCHES} patches/pending-stable/backports/"
- POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}s"
- shift
- ;;
- "-n")
- EXTRA_PATCHES="${EXTRA_PATCHES} patches/linux-next-cherry-picks"
- POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}n"
- shift
- ;;
- "-p")
- EXTRA_PATCHES="${EXTRA_PATCHES} patches/linux-next-pending"
- POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}p"
- shift
- ;;
- "-c")
- EXTRA_PATCHES="${EXTRA_PATCHES} patches/crap"
- POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}c"
- shift
- ;;
- "-u")
- EXTRA_PATCHES="${EXTRA_PATCHES} patches/unified-drivers"
- POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}u"
- ENABLE_UNIFIED=1
- shift
- ;;
- "refresh")
- REFRESH="y"
- shift
- ;;
- "network")
- ENABLE_NETWORK=1
- ENABLE_DRM=0
- shift
- ;;
- "drm")
- ENABLE_DRM=1
- shift
- ;;
- "-h" | "--help")
- usage $0
- exit
- ;;
- *)
- echo "Unexpected argument passed: $1"
- usage $0
- exit
- ;;
- esac
- done
-
-fi
-
-# SUBSYSTEMS is used to select which patches to apply
-if [[ "$ENABLE_NETWORK" == "1" ]]; then
- SUBSYSTEMS="network"
-fi
-
-if [[ "$ENABLE_DRM" == "1" ]]; then
- SUBSYSTEMS+=" drm"
-fi
-
-if [[ "$ENABLE_NETWORK" == "1" ]]; then
- # WLAN and bluetooth files
- copyFiles "$INCLUDE_LINUX_WLAN" "include/linux"
- copyFiles "$INCLUDE_UAPI_LINUX_WLAN" "include/uapi/linux"
- copyFiles "$INCLUDE_NET" "include/net"
- copyFiles "$INCLUDE_NET_BT" "include/net/bluetooth"
- copyFiles "$INCLUDE_LINUX_USB_WLAN" "include/linux/usb"
- copyFiles "$INCLUDE_LINUX_LIBERTAS_WLAN" "include/linux/spi"
- copyFiles "$DRIVERS_WLAN_FILES" "drivers/net/wireless"
- copyFiles "$RNDIS_REQUIREMENTS" "drivers/net/usb"
-
- # Ethernet
- copyFiles "$DRIVERS_ETH_FILES" "drivers/net/"
- echo "compat_mdio-y += mdio.o" > drivers/net/Makefile
- echo "obj-\$(CONFIG_COMPAT_MDIO) += compat_mdio.o" >> drivers/net/Makefile
- copyDirectories "$DRIVERS_ETH"
- cp $GIT_TREE/include/linux/mdio.h include/linux/
- cp $GIT_TREE/include/uapi/linux/mdio.h include/uapi/linux/
-
- copyDirectories "$NET_WLAN_DIRS"
- copyDirectories "$NET_BT_DIRS"
- copyDirectories "$DRIVERS_BT"
- copyDirectories "$DRIVERS_WLAN"
-
- cp -a $GIT_TREE/include/linux/ssb include/linux/
- cp -a $GIT_TREE/include/linux/bcma include/linux/
- cp -a $GIT_TREE/include/linux/rfkill.h include/linux/rfkill_backport.h
- mv include/uapi/linux/rfkill.h include/uapi/linux/rfkill_backport.h
-
- # Misc
- cp $GIT_TREE/drivers/misc/eeprom/{Makefile,eeprom_93cx6.c} drivers/misc/eeprom/
-
- # Copy files needed for statically compiled regulatory rules database
- cp $GIT_TREE/net/wireless/{db.txt,genregdb.awk} net/wireless/
-
- # Top level wireless driver Makefile
- cp $GIT_TREE/drivers/net/wireless/Makefile drivers/net/wireless
-
- # Broadcom case
- DIR="drivers/net/ethernet/broadcom"
- cp $GIT_TREE/$DIR/b44.[ch] drivers/net/ethernet/broadcom
- # Not yet
- echo "obj-\$(CONFIG_B44) += b44.o" > drivers/net/ethernet/broadcom/Makefile
-fi
-
-if [[ "$ENABLE_DRM" == "1" ]]; then
- # DRM drivers
- copyDirectories "$DRIVERS_DRM"
-
- # Copy standalone drivers
- echo "Copying $GIT_TREE/drivers/gpu/drm/*.[ch]"
- cp $GIT_TREE/drivers/gpu/drm/{Makefile,*.[ch]} drivers/gpu/drm/
-
- # Copy DRM headers
- cp -a $GIT_TREE/include/drm include/
-
- # Copy UAPI DRM headers
- cp -a $GIT_TREE/include/uapi/drm include/uapi/
-
- # drivers/gpu/drm/i915/intel_pm.c requires this
- cp $GIT_TREE/drivers/platform/x86/intel_ips.h drivers/platform/x86
-
- # Copy radeon reg_srcs for hostprogs
- cp -a $GIT_TREE/drivers/gpu/drm/radeon/reg_srcs drivers/gpu/drm/radeon
-
- # Copy core/ from nouveau/ (Introduced after new code rewrite in 3.7)
- cp -a $GIT_TREE/drivers/gpu/drm/nouveau/core drivers/gpu/drm/nouveau
-
- # Finally get the DRM top-level makefile
- cp $GIT_TREE/drivers/gpu/drm/Makefile drivers/gpu/drm
-
- DIR="drivers/video"
- cp $GIT_TREE/$DIR/hdmi.c $DIR
- echo "obj-\$(CONFIG_COMPAT_HDMI) += hdmi.o" > $DIR/Makefile
- cp $GIT_TREE/include/linux/hdmi.h include/linux/hdmi.h
-else
- touch drivers/gpu/drm/Makefile
- touch drivers/video/Makefile
-fi
-
-# Staging drivers in their own directory
-for i in $STAGING_DRIVERS; do
- if [ ! -d $GIT_TREE/$i ]; then
- continue
- fi
- rm -rf $i
- echo -e "Copying ${RED}STAGING${NORMAL} $GIT_TREE/$i/*.[ch]"
- # staging drivers tend to have their own subdirs...
- cp -a $GIT_TREE/$i drivers/staging/
-done
-
-UNIFIED_DRIVERS+="alx"
-
-unified_driver_git_tree() {
- case $1 in
- "alx")
- echo "git://github.com/erikarn/alx.git"
- ;;
- *)
- ;;
- esac
-}
-
-unified_driver_linux_next_target() {
- case $1 in
- "alx")
- echo "drivers/net/ethernet/atheros/alx"
- ;;
- *)
- ;;
- esac
-}
-
-unified_driver_get_linux_src() {
- case $1 in
- "alx")
- make -C $DRV_SRC/ linux-src
-
- TARGET_NEXT_DIR="$(unified_driver_linux_next_target $i)"
-
- rm -rf $TARGET_NEXT_DIR
- cp -a $DRV_SRC/target/linux/src $TARGET_NEXT_DIR
- ;;
- *)
- echo "Unsupported unified driver: $1"
- exit
- ;;
- esac
-}
-
-if [[ "$ENABLE_UNIFIED" == "1" ]]; then
- if [ -z $UNIFIED_SRC ]; then
- UNIFIED_SRC="$HOME/unified"
- if [ ! -d $UNIFIED_SRC ]; then
- echo "The directory $UNIFIED_SRC does not exist"
- echo
- echo "Please tell me where your unified drivers are located"
- echo "You can do this by exporting its location as follows:"
- echo
- echo " export UNIFIED_SRC=$HOME/unified"
- echo
- echo "If you have never downloaded unified driver code you"
- echo "can simply re-run this script by first creating an"
- echo "empty directory for on $HOME/unified, the script"
- echo "will then tell you what trees to clone. The unified"
- echo "drivers that we support in compat-drivers adhear to"
- echo "a policy explained in unified/README.md"
- exit 1
- fi
- else
- if [ ! -d $UNIFIED_SRC ]; then
- echo "The directory $UNIFIED_SRC does not exist"
- exit
- fi
- fi
-
- for i in $UNIFIED_DRIVERS; do
- DRV_SRC="$UNIFIED_SRC/$i"
-
- if [ ! -d $DRV_SRC ]; then
- echo -e "$DRV_SRC does not exist. You can clone this tree from:"
- echo
- unified_driver_git_tree $i
- echo
- echo "You should clone this into $UNIFIED_SRC directory or"
- echo "later specify where you put it using the UNIFIED_SRC"
- echo "environment variable"
- exit 1
- fi
-
- unified_driver_get_linux_src $i
- done
-fi
-
-
-# Finally copy MAINTAINERS file
-cp $GIT_TREE/MAINTAINERS ./
-
-refresh_compat
-
-# Clean up possible *.mod.c leftovers
-find -type f -name "*.mod.c" -exec rm -f {} \;
-
-# files we suck in for wireless drivers
-export NETWORK_STABLE="
- net/wireless/
- net/mac80211/
- net/rfkill/
- drivers/net/wireless/
- net/bluetooth/
- drivers/bluetooth/
- drivers/net/ethernet/atheros/atl1c/
- drivers/net/ethernet/atheros/atl1e/
- drivers/net/ethernet/atheros/atlx/
- include/uapi/linux/nl80211.h
- include/uapi/linux/rfkill.h
- include/linux/rfkill.h
- include/net/mac80211.h
- include/net/regulatory.h
- include/net/bluetooth/amp.h
- include/net/bluetooth/hci.h
- include/net/bluetooth/hci_core.h
- include/net/bluetooth/mgmt.h
- include/net/cfg80211.h"
-
-export DRM_STABLE="
- include/uapi/drm
- include/drm/
- drivers/gpu/drm/
- "
-
-get_stable_patches() {
- SUBSYS=$1
- STABLE_TARGET="${PENDING_STABLE_DIR}/${SUBSYS}"
- STABLE_FILE_LIST="${STABLE_PREFIX}${SUBSYS}"
- STABLE_FILES=$(cat ${STABLE_FILE_LIST})
-
- rm -rf $STABLE_TARGET
- mkdir -p $STABLE_TARGET
-
- echo -e "${GREEN}Generating stable cherry picks for ${SUBSYS}... ${NORMAL}"
- echo -e "\nUsing command on directory $PWD:"
-
- echo -e "\ngit format-patch --grep=\"stable@vger.kernel.org\" -o "
- echo -e "\t$STABLE_TARGET ${LAST_STABLE_UPDATE}.. "
- for i in $STABLE_FILES; do
- echo -e "\t$i"
- done
-
- git format-patch --grep="stable@vger.kernel.org" -o \
- $STABLE_TARGET ${LAST_STABLE_UPDATE}.. \
- $STABLE_FILES
-
- if [ ! -d ${LAST_DIR}/${STABLE_TARGET} ]; then
- echo -e "Assumption that ${LAST_DIR}/${STABLE_TARGET} directory exists failed"
- exit 1
- fi
-
- echo -e "${GREEN}Purging old stable cherry picks... ${NORMAL}"
- rm -f ${LAST_DIR}/${STABLE_TARGET}/*.patch
-
- FOUND=$(find ${STABLE_TARGET}/ -maxdepth 1 -name \*.patch | wc -l)
- if [ $FOUND -ne 0 ]; then
- cp ${STABLE_TARGET}/*.patch ${LAST_DIR}/${STABLE_TARGET}/
- else
- echo "No stable pending-stable $SUBSYS patches found on linux-next"
- fi
- if [ -f ${LAST_DIR}/${STABLE_TARGET}/.ignore ]; then
- for i in $(cat ${LAST_DIR}/${STABLE_TARGET}/.ignore) ; do
- echo -e "Skipping $i from generated stable patches..."
- rm -f ${LAST_DIR}/${STABLE_TARGET}/*$i*
- done
- fi
- echo -e "${GREEN}Updated stable cherry picks, review with git diff "
- echo -e "and update hunks with ./scripts/admin-update.sh -s refresh${NORMAL}"
-}
-
-# Stable pending, if -n was passed
-if [[ "$GET_STABLE_PENDING" = y ]]; then
-
- if [ -z $NEXT_TREE ]; then
- NEXT_TREE="/$HOME/linux-next"
- if [ ! -d $NEXT_TREE ]; then
- echo "Please tell me where your linux-next git tree is."
- echo "You can do this by exporting its location as follows:"
- echo
- echo " export NEXT_TREE=$HOME/linux-next"
- echo
- echo "If you do not have one you can clone the repository:"
- echo " git clone git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git"
- exit 1
- fi
- else
- echo "You said to use git tree at: $NEXT_TREE for linux-next"
- fi
-
- LAST_DIR=$PWD
- cd $GIT_TREE
- if [ -f localversion* ]; then
- echo -e "You should be using a stable tree to use the -s option"
- exit 1
- fi
-
- # we now assume you are using a stable tree
- cd $GIT_TREE
- LAST_STABLE_UPDATE=$(git describe --abbrev=0)
- cd $NEXT_TREE
-
- rm -rf $PENDING_STABLE_DIR
-
- git tag -l | grep $LAST_STABLE_UPDATE 2>&1 > /dev/null
- if [[ $? -ne 0 ]]; then
- echo -e "${BLUE}Tag $LAST_STABLE_UPDATE not found on $NEXT_TREE tree: bailing out${NORMAL}"
- exit 1
- fi
-
- echo $NETWORK_STABLE > ${STABLE_PREFIX}network
- echo $DRM_STABLE > ${STABLE_PREFIX}drm
-
- if [[ "$ENABLE_NETWORK" == "1" ]]; then
- get_stable_patches network
- fi
-
- if [[ "$ENABLE_DRM" == "1" ]]; then
- get_stable_patches drm
- fi
-
- rm -f ${STABLE_PREFIX}network ${STABLE_PREFIX}drm
- cd $LAST_DIR
-
-fi
-
-ORIG_CODE=$(find ./ -type f -name \*.[ch] |
- egrep -v "^./compat/|include/linux/compat" |
- xargs wc -l | tail -1 | awk '{print $1}')
-printf "\n${CYAN}compat-drivers code metrics${NORMAL}\n\n" > $CODE_METRICS
-printf "${PURPLE}%10s${NORMAL} - Total upstream lines of code being pulled\n" $ORIG_CODE >> $CODE_METRICS
-
-for subsystem in $SUBSYSTEMS; do
-
- printf "\n ${YELLOW}$subsystem${NORMAL}\n ----------------------------------------\n" >> $CODE_METRICS
-
- for dir in $EXTRA_PATCHES; do
- LAST_ELEM=$dir
- done
-
- for dir in $EXTRA_PATCHES; do
- PATCHDIR="$dir/$subsystem"
- if [[ ! -d $PATCHDIR ]]; then
- echo -e "${RED}Patches: $PATCHDIR empty, skipping...${NORMAL}"
- continue
- fi
- if [[ "$REFRESH" = y ]]; then
- patchRefresh $PATCHDIR
- fi
-
- FOUND=$(find $PATCHDIR/ -maxdepth 1 -name \*.patch | wc -l)
- if [ $FOUND -eq 0 ]; then
- continue
- fi
-
- for i in $(ls $PATCHDIR/*.patch); do
- # GNU Patch does not yet support giving a different
- # error return value for patches detected as reversed or
- # already applied. We can add that support but for now
- # we distinguish this by grep'ing the results. We nuke
- # already applied patches, this typically would come from
- # linux-next, on linux-stable branches given that there is
- # no linearity between the two.
- #
- # To support this change however it means we now have
- # the double amount of time it takes to apply patches
- # given that we now need a dry run first. The algorithm
- # for checking if a patch is reversed only works by
- # analyzing the first hunk of a patch though so perhaps
- # what we need on GNU Patch is a check for asking if
- # a patch is reversed, that would not cause much
- # overhead here, it would just dry run on the first
- # hunk by reducing the search space considerably.
- patch --dry-run -p1 -N -t < $i > /dev/null 2>&1
- RET=$?
- if [[ $RET -ne 0 ]]; then
- patch --dry-run -p1 -N -t < $i | grep "Reversed" > /dev/null 2>&1
- if [[ $? -eq 0 ]]; then
- echo -e "${CYAN}Deleting${NORMAL} ${GREEN}already applied ${NORMAL}${BLUE}${i}"
- rm -f $i
- continue
- fi
- fi
-
- echo -e "${GREEN}Applying backport patch${NORMAL}: ${BLUE}$i${NORMAL}"
- patch -p1 -N -t < $i
- RET=$?
- if [[ $RET -ne 0 ]]; then
- echo -e "${RED}Patching $i failed${NORMAL}, update it"
- exit $RET
- fi
- done
- nagometer $PATCHDIR $ORIG_CODE >> $CODE_METRICS
- done
-done
-
-refresh_compat
-gen_compat_labels
-
-./scripts/driver-select restore
diff --git a/scripts/athenable b/scripts/athenable
deleted file mode 100755
index 3ec16ad2..00000000
--- a/scripts/athenable
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2007 Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
-#
-# Makes sure either ath5k or MadWifi are ready to be used. This allows
-# us to choose any driver without blacklisting each other.
-
-. /usr/lib/compat-drivers/modlib.sh
-
-if [[ $UID -ne 0 ]]; then
- echo "Run with root privileges"
- exit
-fi
-
-ATH5K="ath5k"
-ATH9K="ath9k"
-MADWIFI="ath_pci"
-# Appended to module file at the end when we want to ignore one
-IGNORE_SUFFIX=".ignore"
-USAGE="Usage: $0 [ ath5k | madwifi ]"
-
-# Default behavior: disables any MadWifi driver present and makes sure
-# ath5k is enabled
-if [ $# -eq 0 ]; then
- module_disable $MADWIFI
- module_enable $ATH5K
- module_enable $ATH9K
- exit
-elif [ $# -ne 1 ]; then
- echo "$USAGE"
- exit
-fi
-
-MODULE=$1
-if [ "$MODULE" == "ath5k" ]; then
- module_disable $MADWIFI
- module_enable $ATH5K
- module_enable $ATH9K
-elif [ "$MODULE" == "madwifi" ]; then
- module_disable $ATH5K
- module_disable $ATH9K
- module_enable $MADWIFI
-else
- echo "$USAGE"
- exit
-fi
diff --git a/scripts/athload b/scripts/athload
deleted file mode 100755
index 96b28c3c..00000000
--- a/scripts/athload
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-# Copyright 2007 Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
-#
-# Loads ath5k or madwifi
-
-. /usr/lib/compat-drivers/modlib.sh
-
-if [[ $UID -ne 0 ]]; then
- echo "Run with root privileges"
- exit
-fi
-
-
-USAGE="Usage: $0 [ ath5k | madwifi ]"
-
-# Default behavior: unload MadWifi and load ath5k
-if [ $# -eq 0 ]; then
- athenable ath5k
- exit
-elif [ $# -ne 1 ]; then
- echo "$USAGE"
- exit
-fi
-
-MODULE=$1
-if [ "$MODULE" == "ath5k" ]; then
- madwifi-unload
- athenable ath5k
- modprobe ath5k
- CHECK=`modprobe -l ath5k`
- if [ ! -z $CHECK ]; then
- echo "ath5k loaded successfully"
- fi
- modprobe ath9k
- CHECK=`modprobe -l ath9k`
- if [ ! -z $CHECK ]; then
- echo "ath9k loaded successfully"
- fi
-elif [ "$MODULE" == "madwifi" ]; then
- CHECK=`modprobe -l ath5k`
- if [ ! -z $CHECK ]; then
- echo "ath5k currently loaded, going to try to unload the module..."
- modprobe -r --ignore-remove ath5k
- fi
- athenable madwifi
- # MadWifi may be loaded, but it doesn't mean devices
- # currently available were picked up
- madwifi-unload 2>&1 > /dev/null
- modprobe ath_pci
- CHECK=`modprobe -l ath_pci`
- if [ ! -z $CHECK ]; then
- echo "MadWifi loaded successfully!"
- fi
-else
- echo "$USAGE"
- exit
-fi
diff --git a/scripts/b43enable b/scripts/b43enable
deleted file mode 100755
index 2d2d22cb..00000000
--- a/scripts/b43enable
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2007 Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
-#
-# Makes sure either b43, b43legacy (new mac80211 drivers) or bcm43xx
-# is enabled to be used. This allows us to choose any driver without
-# blacklisting each other.
-
-. /usr/lib/compat-drivers/modlib.sh
-
-if [[ $UID -ne 0 ]]; then
- echo "Run with root privileges"
- exit
-fi
-
-B43S="b43 b43legacy"
-B43_OLD="bcm43xx"
-B43_PROP="wl"
-
-# Appended to module file at the end when we want to ignore one
-USAGE="Usage: $0 [ b43 | bcm43xx | wl ]"
-
-function enable_b43 {
- module_disable $B43_OLD
- module_disable $B43_PROP
- for i in $B43S; do
- module_enable $i
- done
-}
-
-# Default behavior: disables the old bcm43xx driver and enables b43
-# and b43legacy
-if [ $# -eq 0 ]; then
- enable_b43
- exit
-elif [ $# -ne 1 ]; then
- echo "$USAGE"
- exit
-fi
-
-MODULE=$1
-if [ "$MODULE" == "bcm43xx" ]; then
- for i in $B43S; do
- module_disable $i
- done
- module_disable $B43_PROP
- module_enable $B43_OLD
-elif [ "$MODULE" == "wl" ]; then
- for i in $B43S; do
- module_disable $i
- done
- module_disable $B43_OLD
- module_enable $B43_PROP
-elif [ "$MODULE" == "b43" ]; then
- enable_b43
-else
- echo "$USAGE"
- exit
-fi
diff --git a/scripts/b43load b/scripts/b43load
deleted file mode 100755
index 3e7a4d99..00000000
--- a/scripts/b43load
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/bash
-# Copyright 2007 Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
-#
-# Loads new broadcom drivers (b43 and b43legacy) or the old ones (bcm43xx)
-
-. /usr/lib/compat-drivers/modlib.sh
-
-if [[ $UID -ne 0 ]]; then
- echo "Run with root privileges"
- exit
-fi
-
-
-USAGE="Usage: $0 [ b43 | bcm43xx ]"
-
-# Default behavior: unload bcm43xx and load b43 and b43legacy
-if [ $# -eq 0 ]; then
- 1=b43
-elif [ $# -ne 1 ]; then
- echo "$USAGE"
- exit
-fi
-
-MODULE=$1
-if [ "$MODULE" == "b43" ]; then
- grep bcm43xx /proc/modules 2>&1 > /dev/null
- if [ $? -eq 0 ]; then
- echo Unloading $i...
- modprobe -r --ignore-remove bcm43xx
- fi
- # Enables both b43 and b43legacy
- b43enable b43
- modprobe b43
- modprobe b43legacy
- CHECK=`modprobe -l b43`
- if [ ! -z $CHECK ]; then
- echo "b43 loaded successfully"
- fi
- CHECK=`modprobe -l b43legacy`
- if [ ! -z $CHECK ]; then
- echo "b43legacy loaded successfully"
- fi
-elif [ "$MODULE" == "bcm43xx" ]; then
- CHECK=`modprobe -l b43`
- if [ ! -z $CHECK ]; then
- echo "b43 currently loaded, going to try to unload the module..."
- modprobe -r --ignore-remove b43
- fi
- CHECK=`modprobe -l b43legacy`
- if [ ! -z $CHECK ]; then
- echo "b43legacy currently loaded, going to try to unload the module..."
- modprobe -r --ignore-remove b43legacy
- fi
- b43enable bcm43xx
- # bcm43xx may be loaded already lets remove them first
- modprobe -r --ignore-remov bcm43xx 2>&1 > /dev/null
- modprobe bcm43xx
- CHECK=`modprobe -l bcm43xx`
- if [ ! -z $CHECK ]; then
- echo "bcm43xx loaded successfully!"
- fi
-else
- echo "$USAGE"
- exit
-fi
diff --git a/scripts/btunload.sh b/scripts/btunload.sh
deleted file mode 100755
index cc566138..00000000
--- a/scripts/btunload.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-MODULES="$MODULES ath3k bcm203x bluecard_cs bnep bpa10x bt3c_cs btmrvl btmrvl_sdio btsdio"
-MODULES="$MODULES btusb btuart_cs cmtp dtl1_cs hidp hci_vhci hci_uart rfcomm sco bluetooth l2cap"
-echo Stoping bluetooth service..
-/etc/init.d/bluetooth stop
-/etc/init.d/bluetooth status
-
-for i in $MODULES; do
- grep ^$i /proc/modules 2>&1 > /dev/null
- if [ $? -eq 0 ]; then
- echo Unloading $i...
- modprobe -r --ignore-remove $i
- fi
-done
diff --git a/scripts/check_config.sh b/scripts/check_config.sh
deleted file mode 100755
index 648c05bd..00000000
--- a/scripts/check_config.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env bash
-# This script checks the compat-drivers configuration file and if changes were made
-# regenerates the compat_autoconf header.
-
-# These variables are expected to be exported:
-#COMPAT_CONFIG_CW=$(PWD)/config.mk
-#COMPAT_CONFIG=$(PWD)/.config
-#CONFIG_CHECK=$(PWD)/.config.mk_md5sum.txt
-#COMPAT_AUTOCONF=include/linux/compat_autoconf.h
-
-
-function gen_compat_autoconf {
- echo "./scripts/gen-compat-autoconf.sh $COMPAT_CONFIG $COMPAT_CONFIG_CW > $COMPAT_AUTOCONF"
- ./scripts/gen-compat-autoconf.sh $COMPAT_CONFIG $COMPAT_CONFIG_CW > $COMPAT_AUTOCONF
- md5sum $COMPAT_CONFIG $COMPAT_CONFIG_CW > $CONFIG_CHECK
-}
-
-which md5sum 2>&1 > /dev/null
-if [ $? -ne 0 ]; then
- echo "md5sum required to detect changes on config file"
- exit -1
-fi
-
-if [ ! -f $CONFIG_CHECK ]; then
- gen_compat_autoconf
- exit
-fi
-
-md5sum -c $CONFIG_CHECK 2> /dev/null 1>/dev/null
-
-if [ $? -ne 0 ]; then
- echo "Changes to compat-drivers's configuration was detected, regenerating autoconf..."
- gen_compat_autoconf
-fi
-
diff --git a/scripts/check_depmod b/scripts/check_depmod
deleted file mode 100755
index fbcdd27a..00000000
--- a/scripts/check_depmod
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/bash
-# Copyright 2009 Luis R. Rodriguez <mcgrof@gmail.com>
-#
-# Ensures your distribution likes to prefer updates/ over the kernel/
-# search updates built-in
-
-# Seems Mandriva has an $DEPMOD_DIR but it doesn't have any files,
-# so lets deal with those distributions.
-DEPMOD_CONF="/etc/depmod.conf"
-DEPMOD_CONF_TMP="$DEPMOD_CONF.compat-drivers.old"
-DEPMOD_DIR="/etc/depmod.d/"
-COMPAT_DEPMOD_FILE=compat-drivers.conf
-GREP_REGEX_UPDATES="^[[:space:]]*search.*[[:space:]]updates\([[:space:]]\|$\)"
-GREP_REGEX_SEARCH="^[[:space:]]*search[[:space:]].\+$"
-DEPMOD_CMD="depmod"
-
-function add_compat_depmod_conf {
- echo "NOTE: Your distribution lacks an $DEPMOD_DIR directory with "
- echo "updates/ directory being prioritized for modules, we're adding "
- echo "one for you."
- mkdir -p $DEPMOD_DIR
- FIRST_FILE=$(ls $DEPMOD_DIR|head -1)
- [ -n "$FIRST_FILE" ] && while [[ $FIRST_FILE < $COMPAT_DEPMOD_FILE ]]; do
- COMPAT_DEPMOD_FILE="0$COMPAT_DEPMOD_FILE"
- done
- echo "search updates" > $DEPMOD_DIR/$COMPAT_DEPMOD_FILE
-}
-
-function add_global_depmod_conf {
- echo "NOTE: Your distribution lacks updates/ directory being"
- echo "prioritized for modules, we're adding it to $DEPMOD_CONF."
- rm -f $DEPMOD_CONF_TMP
- [ -f $DEPMOD_CONF ] && cp -f $DEPMOD_CONF $DEPMOD_CONF_TMP
- echo "search updates" > $DEPMOD_CONF
- [ -f $DEPMOD_CONF_TMP ] && cat $DEPMOD_CONF_TMP >> $DEPMOD_CONF
-}
-
-function depmod_updates_ok {
- echo "depmod will prefer updates/ over kernel/ -- OK!"
-}
-
-function add_depmod_conf {
- if [ -f "$DEPMOD_CONF" ]; then
- add_global_depmod_conf
- else
- DEPMOD_VERSION=$($DEPMOD_CMD --version | cut -d" " -f2 | sed "s/\.//")
- if [[ $DEPMOD_VERSION -gt 36 ]]; then
- add_compat_depmod_conf
- else
- add_global_depmod_conf
- fi
- fi
-}
-
-# =============================================================================
-# === MAIN ====================================================================
-# =============================================================================
-
-GREP_FILES=""
-[ -f $DEPMOD_CONF ] && GREP_FILES="$DEPMOD_CONF"
-if [ -d $DEPMOD_DIR ]; then
- DEPMOD_FILE_COUNT=$(ls $DEPMOD_DIR | wc -l)
- [[ $DEPMOD_FILE_COUNT -gt 0 ]] && GREP_FILES="$GREP_FILES $DEPMOD_DIR/*"
-fi
-
-if [ -n "$GREP_FILES" ]; then
- grep -q "$GREP_REGEX_SEARCH" $GREP_FILES
- if [[ $? -eq 0 ]]; then
- grep -q "$GREP_REGEX_UPDATES" $GREP_FILES
- if [[ $? -eq 0 ]]; then
- depmod_updates_ok
- else
- add_depmod_conf
- fi
- else
- depmod_updates_ok
- fi
-else
- depmod_updates_ok
-fi
-
-exit 0
-
diff --git a/scripts/compress_modules b/scripts/compress_modules
deleted file mode 100755
index cf2a76cd..00000000
--- a/scripts/compress_modules
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-# To be used by distributions using compressed modules
-
-COMPRESSION_FOUND="n"
-COUNT=0;
-
-for i in $(modprobe -l mac80211); do
- let COUNT=$COUNT+1
- i=${i##*/}
- if [ "$i" = "mac80211.ko.gz" ]; then
- COMPRESSION_FOUND="y"
- continue
- fi
-done
-
-if [ $COUNT -gt 2 ]; then
- echo "More than two mac80211 modules are detected, please report this."
- exit
-fi
-
-if [ $COMPRESSION_FOUND = "n" ]; then
- exit
-fi
-
-DIRS="$KLIB/$KMODDIR/net/mac80211/"
-# This handles both drivers/net/ and drivers/net/wireless/
-DIRS="$DIRS $KLIB/$KMODDIR/net/"
-DIRS="$DIRS $KLIB/$KMODDIR/drivers/ssb/"
-DIRS="$DIRS $KLIB/$KMODDIR/drivers/net/usb/"
-DIRS="$DIRS $KLIB/$KMODDIR/drivers/net/wireless/"
-DIRS="$DIRS $KLIB/$KMODDIR/drivers/misc/eeprom/"
-
-for i in $DIRS; do
- if [ ! -d $i ]; then
- continue;
- fi
- for driver in $(find $i -type f -name *.ko); do
- gzip -9 $driver
- done
-done
diff --git a/scripts/driver-select b/scripts/driver-select
deleted file mode 100755
index 862f43bf..00000000
--- a/scripts/driver-select
+++ /dev/null
@@ -1,565 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 Luis R. Rodriguez <mcgrof@gmail.com>
-#
-# This script allows you to select your compat-drivers driver and
-# reduce compilation time.
-
-COMPAT_CONFIG_CW="config.mk"
-DRIVERS_MAKEFILE="drivers/net/wireless/Makefile"
-ATH_MAKEFILE="drivers/net/wireless/ath/Makefile"
-ATH9K_MAKEFILE="drivers/net/wireless/ath/ath9k/Makefile"
-BRCM80211_MAKEFILE="drivers/net/wireless/brcm80211/Makefile"
-RT2X00_MAKEFILE="drivers/net/wireless/rt2x00/Makefile"
-TI_MAKEFILE="drivers/net/wireless/ti/Makefile"
-NET_WIRELESS_MAKEFILE="net/wireless/Makefile"
-EEPROM_MAKEFILE="drivers/misc/eeprom/Makefile"
-DRIVERS_NET_ATHEROS="drivers/net/ethernet/atheros/Makefile"
-DRIVERS_NET_BROADCOM="drivers/net/ethernet/broadcom/Makefile"
-DRIVERS_NET_USB_MAKEFILE="drivers/net/usb/Makefile"
-SSB_MAKEFILE="drivers/ssb/Makefile"
-BCMA_MAKEFILE="drivers/bcma/Makefile"
-
-# used to backup files from foo to foo.${BACKUP_EXT}
-BACKUP_EXT="bk"
-
-# Pretty colors
-GREEN="\033[01;32m"
-YELLOW="\033[01;33m"
-NORMAL="\033[00m"
-BLUE="\033[34m"
-RED="\033[31m"
-PURPLE="\033[35m"
-CYAN="\033[36m"
-UNDERLINE="\033[02m"
-
-SUPPORTED_80211_DRIVERS="ath5k ath9k ath9k_ap ath9k_htc carl9170 ath6kl ar5523 wil6210 b43 zd1211rw rt2x00 wl1251 wl12xx brcmsmac brcmfmac mac80211_hwsim"
-
-# b43 needs some more work for driver-select, the SSB stuff, plus
-# what if you update b44 but not b43? It will bust.
-SUPPORTED_ETH_DRIVERS="atl1 atl2 atl1e atl1c alx"
-
-SUPPORTED_DRM_DRIVERS="i915"
-
-function usage {
- echo -e "${GREEN}Usage${NORMAL}: ${BOLD}$0${NORMAL} [ ${PURPLE}<driver-name>${NORMAL} | ${CYAN}<driver-group-name>${NORMAL} | ${GREEN}restore${NORMAL} ]"
-
- # These should match the switch below.
- echo -e "Supported 802.11 drivers:"
- for i in $SUPPORTED_80211_DRIVERS; do
- echo -e "\t${PURPLE}${i}${NORMAL}"
- done
-
- echo
- echo -e "Supported Ethernet drivers:"
- for i in $SUPPORTED_ETH_DRIVERS; do
- echo -e "\t${PURPLE}${i}${NORMAL}"
- done
-
- echo -e "Supported DRM drivers:"
- for i in $SUPPORTED_DRM_DRIVERS; do
- echo -e "\t${PURPLE}${i}${NORMAL}"
- done
-
- # These should match the switch below.
- echo -e "\nSupported group drivers:"
- echo -e "\t${CYAN}atheros${NORMAL} < ${PURPLE} ath5k ath9k carl9170 zd1211rw ath6kl wil6210 ar5523${NORMAL}>"
- echo -e "\t${CYAN}ath${NORMAL} < ${PURPLE} ath5k ath9k carl9170 ath6kl wil6210 ar5523${NORMAL}>"
- echo -e "\t${CYAN}brcm80211${NORMAL} < ${PURPLE} brcmsmac brcmfmac ${NORMAL}>"
- echo -e "\t${CYAN}intel${NORMAL} < ${PURPLE} iwlwifi, iwlegacy ${NORMAL}>"
- echo -e "\t${CYAN}rtl818x${NORMAL} < ${PURPLE} rtl8180 rtl8187 ${NORMAL}>"
- echo -e "\t${CYAN}rtlwifi${NORMAL} < ${PURPLE} rtl8192ce ${NORMAL}>"
- echo -e "\t${CYAN}ti${NORMAL} < ${PURPLE} wl1251 wl12xx (SPI and SDIO)${NORMAL}>"
-
- echo -e "\nSupported group drivers: Bluetooth & Ethernet:"
- echo -e "\t${CYAN}atlxx${NORMAL} < ${PURPLE} atl1 atl2 atl1e alx${NORMAL}>"
- echo -e "\t${CYAN}bt${NORMAL} < ${PURPLE} Linux bluetooth drivers ${NORMAL}>"
-
- echo -e "\nSupported group drivers: DRM:"
- echo -e "\t${CYAN}drm${NORMAL} < ${PURPLE} i915${NORMAL}>"
-
- echo -e "Restoring compat-drivers:"
- echo -e "\t${GREEN}restore${NORMAL}: you can use this option to restore compat-drivers to the original state"
-}
-
-function backup_file {
- if [ -f $1.${BACKUP_EXT} ]; then
- echo -e "Backup exists: ${CYAN}${1}.${BACKUP_EXT}${NORMAL}"
- return
- fi
- echo -e "Backing up makefile: ${CYAN}${1}.${BACKUP_EXT}${NORMAL}"
- cp "${1}" "${1}.${BACKUP_EXT}"
-}
-
-function disable_makefile
-{
- backup_file $1
- echo > $1
-}
-
-function select_drivers_from_makefile
-{
- MAKEFILE="$1"
- shift
- backup_file $MAKEFILE
- CONFIGS=""
- COUNT=0
- for i in $@; do
- if [[ "$CONFIGS" = "" ]]; then
- CONFIGS="$i"
- else
- CONFIGS="${CONFIGS}|$i"
- fi
- done
- egrep "$CONFIGS" $MAKEFILE > ${MAKEFILE}.tmp
- mv ${MAKEFILE}.tmp ${MAKEFILE}
-}
-
-function select_drivers
-{
- select_drivers_from_makefile $DRIVERS_MAKEFILE $@
-}
-
-function disable_lib80211
-{
- backup_file $NET_WIRELESS_MAKEFILE
- perl -i -ne 'print if ! /LIB80211/ ' $NET_WIRELESS_MAKEFILE
-}
-
-function disable_b44 {
- backup_file $DRIVERS_NET_BROADCOM
- perl -i -ne 'print if ! /CONFIG_B44/ ' $DRIVERS_NET_BROADCOM
-}
-
-function disable_ssb
-{
- disable_makefile ${SSB_MAKEFILE}
- perl -i -ne 'print if ! /drivers\/ssb\//' Makefile
-}
-
-function disable_bcma
-{
- disable_makefile ${BCMA_MAKEFILE}
- perl -i -ne 'print if ! /drivers\/bcma\//' Makefile
-}
-
-function disable_rfkill
-{
- backup_file Makefile
- perl -i -ne 'print if ! /CONFIG_COMPAT_RFKILL/' Makefile
-}
-
-function disable_eeprom
-{
- disable_makefile ${EEPROM_MAKEFILE}
- perl -i -ne 'print if ! /drivers\/misc\/eeprom\//' Makefile
-}
-
-function disable_usbnet
-{
- disable_makefile ${DRIVERS_NET_USB_MAKEFILE}
- perl -i -ne 'print if ! /drivers\/net\/usb\//' Makefile
-}
-
-function disable_usbnet {
- perl -i -ne 'print if ! /CONFIG_COMPAT_NET_USB_MODULES/' Makefile
-}
-
-function disable_ethernet {
- perl -i -ne 'print if ! /CONFIG_COMPAT_NETWORK_MODULES/' Makefile
-}
-
-function disable_var_03 {
- perl -i -ne 'print if ! /CONFIG_COMPAT_VAR_MODULES/' Makefile
-}
-
-function disable_bt {
- perl -i -ne 'print if ! /CONFIG_COMPAT_BLUETOOTH/' Makefile
-}
-
-function disable_80211 {
- perl -i -ne 'print if ! /CONFIG_COMPAT_WIRELESS/' Makefile
-}
-
-function disable_drm {
- perl -i -ne 'print if ! /CONFIG_COMPAT_VIDEO_MODULES/' Makefile
-}
-
-function disable_bt_usb_ethernet {
- backup_file Makefile
- disable_usbnet
- disable_ethernet
- disable_bt
- disable_update-initramfs
- disable_drm
-}
-
-function disable_bt_usb_ethernet_var {
- backup_file Makefile
- disable_bt_usb_ethernet
- disable_var_03
-}
-
-function enable_only_ethernet {
- backup_file Makefile
- backup_file $DRIVERS_NET_BROADCOM
- backup_file $DRIVERS_NET_ATHEROS
- disable_staging
- disable_usbnet
- disable_var_03
- disable_bt
- disable_drm
- # rfkill may be needed if you enable b44 as you may have b43
- disable_rfkill
- disable_80211
-}
-
-function disable_var {
- disable_ssb
- disable_bcma
- disable_usbnet
- disable_eeprom
- disable_update-initramfs
-}
-
-function disable_var_01 {
- disable_lib80211
- disable_var
-}
-
-function disable_var_02 {
- #var_01 with eeprom not disabled
- disable_lib80211
- disable_ssb
- disable_bcma
- disable_usbnet
- disable_update-initramfs
-}
-
-function disable_staging {
- backup_file Makefile
- perl -i -ne 'print if ! /CONFIG_COMPAT_STAGING/ ' Makefile
-}
-
-function disable_update-initramfs
-{
- backup_file Makefile
- perl -i -ne 'print if ! /update-initramfs/' Makefile
-}
-
-function enable_only_drm {
- backup_file Makefile
- disable_ethernet
- disable_staging
- disable_usbnet
- disable_var_03
- disable_bt
- # rfkill may be needed if you enable b44 as you may have b43
- disable_rfkill
- disable_80211
-}
-
-function select_ath_driver
-{
- backup_file $ATH_MAKEFILE
- perl -i -ne 'print if /'$1'/ || /CONFIG_ATH_/ || /ath-objs/ || /regd.o/ || /hw.o/ || /key.o/' $ATH_MAKEFILE
- disable_var_01
-}
-
-function select_ath_no_common
-{
- backup_file $ATH_MAKEFILE
- perl -i -ne 'print if /'$1'/' $ATH_MAKEFILE
- disable_var_01
-}
-
-function select_ath9k_driver
-{
- select_ath_driver CONFIG_ATH9K_HW
- # In the future here we'll add stuff to disable ath9k_htc
-}
-
-function select_ath9k_driver_ap
-{
- select_ath9k_driver
- backup_file $COMPAT_CONFIG_CW
- perl -i -ne 'print if ! /CONFIG_COMPAT_ATH9K_RATE_CONTROL/ ' $COMPAT_CONFIG_CW
-}
-
-function select_ti_drivers
-{
- select_drivers CONFIG_WL_TI
- select_drivers_from_makefile $TI_MAKEFILE $@
-}
-
-function select_brcm80211_driver
-{
- backup_file $BRCM80211_MAKEFILE
- perl -i -ne 'print if /'$1'/ || /CONFIG_BRCMUTIL/ ' $BRCM80211_MAKEFILE
-}
-
-function restore_file {
- local ORIG="${1%%.${BACKUP_EXT}}"
- cp $1 $ORIG
- rm -f $1
- echo -e "Restored makefile: ${CYAN}${ORIG}${NORMAL} (and removed backup)"
-}
-
-function restore_compat {
- local FILES=$(find ./ -type f -name *\."${BACKUP_EXT}")
- for i in $FILES; do
- restore_file $i
- done
-}
-
-if [ $# -ne 1 ]; then
- usage
- exit
-fi
-
-if [ ! -f .compat_version ]; then
- echo "Must run $0 from the compat-drivers top level directory"
- exit
-fi
-
-if [[ ! -f built-in.o ]]; then
- if [[ "$1" != "restore" ]]; then
- echo -e "${PURPLE}Processing new driver-select request...${NORMAL}"
- fi
-fi
-
-# Always backup the top level Makefile, unless restoring
-if [[ "$1" != "restore" ]]; then
- backup_file Makefile
-fi
-
-# If a user selects a new driver make sure we clean up for them
-# first and also restore the backup makefiles then. Otherwise
-# we'll be trying to leave drivers on Makefiles which are not
-# already there from a previous run.
-if [ -f built-in.o ]; then
- echo -e "${PURPLE}Old build found, going to clean this up first...${NORMAL}"
- make clean
- echo -e "${PURPLE}Restoring Makefiles...${NORMAL}"
- ./$0 restore
-fi
-
-case $1 in
- restore)
- restore_compat
- ;;
-# Group drivers
- atheros)
- select_drivers CONFIG_ATH_CARDS \
- CONFIG_COMPAT_ZD1211RW
- disable_staging
- disable_bt_usb_ethernet_var
- disable_var_01
- ;;
- ath)
- disable_bt_usb_ethernet_var
- select_drivers CONFIG_ATH_CARDS
- disable_var_01
- ;;
- intel)
- select_drivers CONFIG_IWLWIFI \
- CONFIG_IWLEGACY \
- CONFIG_IPW
- disable_staging
- disable_var
- disable_bt
- disable_ethernet
- disable_usbnet
- ;;
- iwlwifi)
- select_drivers CONFIG_IWLWIFI
- disable_staging
- disable_var_01
- disable_bt
- disable_ethernet
- disable_usbnet
- ;;
- iwlegacy)
- select_drivers CONFIG_IWLEGACY
- disable_staging
- disable_var_01
- disable_bt
- disable_ethernet
- disable_usbnet
- ;;
- rtl818x)
- select_drivers CONFIG_RTL8180 CONFIG_RTL8187
- disable_staging
- disable_bt_usb_ethernet
- disable_ssb
- disable_bcma
- disable_lib80211
- ;;
- rtlwifi)
- select_drivers CONFIG_RTL8192CE CONFIG_RTLWIFI
- disable_staging
- disable_bt_usb_ethernet_var
- disable_lib80211
- ;;
- ti)
- select_drivers CONFIG_WL_TI
- disable_bt_usb_ethernet_var
- disable_staging
- disable_var_01
- ;;
- brcm80211)
- disable_staging
- disable_bt_usb_ethernet_var
- select_drivers CONFIG_BRCMUTIL \
- CONFIG_BRCMFMAC \
- CONFIG_BRCMSMAC
- ;;
-# Singular modules
- ath5k)
- disable_staging
- disable_bt_usb_ethernet_var
- select_drivers CONFIG_ATH_CARDS
- select_ath_driver CONFIG_ATH5K
- #patch -p1 < enable-older-kernels/enable-2.6.23.patch
- ;;
- ath9k)
- disable_staging
- disable_bt_usb_ethernet_var
- select_drivers CONFIG_ATH_CARDS
- select_ath9k_driver
- ;;
- ath9k_ap)
- disable_staging
- disable_bt_usb_ethernet_var
- select_drivers CONFIG_ATH_CARDS
- select_ath9k_driver_ap
- ;;
- carl9170)
- disable_staging
- disable_bt_usb_ethernet_var
- select_drivers CONFIG_ATH_CARDS
- select_ath_driver CONFIG_CARL9170
- ;;
- ath9k_htc)
- disable_staging
- disable_bt_usb_ethernet_var
- select_drivers CONFIG_ATH_CARDS
- select_ath9k_driver
- ;;
- ath6kl)
- disable_staging
- disable_bt_usb_ethernet_var
- select_drivers CONFIG_ATH_CARDS
- select_ath_driver CONFIG_ATH6KL
- ;;
- wil6210)
- disable_staging
- disable_bt_usb_ethernet_var
- select_drivers CONFIG_ATH_CARDS
- select_ath_no_common CONFIG_WIL6210
- ;;
- ar5523)
- disable_staging
- disable_bt_usb_ethernet_var
- select_drivers CONFIG_ATH_CARDS
- select_ath_no_common CONFIG_AR5523
- ;;
- brcmsmac)
- disable_staging
- disable_bt_usb_ethernet_var
- select_drivers CONFIG_BRCMSMAC
- select_brcm80211_driver CONFIG_BRCMSMAC CONFIG_BRCMUTIL
- ;;
- brcmfmac)
- disable_staging
- disable_bt_usb_ethernet_var
- select_drivers CONFIG_BRCMFMAC
- select_brcm80211_driver CONFIG_BRCMFMAC CONFIG_BRCMUTIL
- ;;
- zd1211rw)
- select_drivers CONFIG_COMPAT_ZD1211RW
- disable_staging
- disable_var_01
- ;;
- b43)
- disable_staging
- disable_bt_usb_ethernet
- disable_eeprom
- disable_lib80211
- select_drivers CONFIG_B43
- ;;
- rt2x00)
- select_drivers CONFIG_RT2X00
- disable_staging
- disable_bt_usb_ethernet
- disable_var_02
- ;;
- wl1251)
- select_ti_drivers CONFIG_WL1251
- disable_staging
- disable_var_01
- ;;
- wl12xx)
- select_ti_drivers CONFIG_WL12XX
- disable_staging
- disable_var_01
- ;;
- wl18xx)
- select_ti_drivers CONFIG_WL18XX
- disable_staging
- disable_var_01
- ;;
- mac80211_hwsim)
- select_drivers CONFIG_COMPAT_MAC80211_HWSIM
- disable_staging
- disable_bt_usb_ethernet_var
- ;;
-# Ethernet and Bluetooth drivers
- atl1)
- enable_only_ethernet
- disable_b44
- echo -e "obj-\$(CONFIG_ATL1) += atlx/" > $DRIVERS_NET_ATHEROS
- ;;
- atl2)
- enable_only_ethernet
- disable_b44
- echo -e "obj-\$(CONFIG_ATL2) += atlx/" > $DRIVERS_NET_ATHEROS
- ;;
- atl1e)
- enable_only_ethernet
- disable_b44
- echo -e "obj-\$(CONFIG_ATL1E) += atl1e/" > $DRIVERS_NET_ATHEROS
- ;;
- atl1c)
- enable_only_ethernet
- disable_b44
- echo -e "obj-\$(CONFIG_ATL1C) += atl1c/" > $DRIVERS_NET_ATHEROS
- ;;
- alx)
- enable_only_ethernet
- disable_b44
- echo -e "obj-\$(CONFIG_ALX) += alx/" > $DRIVERS_NET_ATHEROS
- ;;
- atlxx)
- select_drivers CONFIG_ATL1 CONFIG_ATL2 CONFIG_ATL1E CONFIG_ALX
- enable_only_ethernet
- disable_b44
- disable_update-initramfs
- ;;
- bt)
- select_drivers CONFIG_BT
- disable_var
- disable_ethernet
- disable_staging
- disable_80211
- ;;
- i915)
- enable_only_drm
- ;;
- drm)
- enable_only_drm
- ;;
- *)
- echo "Unsupported driver"
- exit
- ;;
-esac
diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
deleted file mode 100755
index c9ab9da7..00000000
--- a/scripts/gen-compat-autoconf.sh
+++ /dev/null
@@ -1,210 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright 2007 Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
-#
-# Use this to parse a small .config equivalent looking file to generate
-# our own autoconf.h. This file has defines for each config option
-# just like the kernels include/linux/autoconf.h
-#
-# XXX: consider using scripts/kconfig/confdata.c instead.
-# On the downside this would require the user to have libc though.
-
-# This indicates which is the oldest kernel we support
-# Update this if you are adding support for older kernels.
-OLDEST_KERNEL_SUPPORTED="2.6.24"
-COMPAT_RELEASE=".compat_version"
-KERNEL_RELEASE=".compat_base_tree_version"
-MULT_DEP_FILE=".compat_pivot_dep"
-
-if [ $# -ne 2 ]; then
- echo "Usage $0 <generic-compat-config-file> <compat-drivers-config-file>"
- exit
-fi
-
-COMPAT_CONFIG_1="$1"
-COMPAT_CONFIG_2="$2"
-
-if [[ ! -f $COMPAT_CONFIG_1 || ! -f $COMPAT_CONFIG_2 ]]; then
- echo "File $COMPAT_CONFIG_1 and $COMPAT_CONFIG_2 files must be present"
- exit
-fi
-
-if [ ! -f $COMPAT_RELEASE -o ! -f $KERNEL_RELEASE ]; then
- echo "Error: $COMPAT_RELEASE or $KERNEL_RELEASE file is missing"
- exit
-fi
-
-CREL=$(cat $COMPAT_RELEASE | tail -1)
-KREL=$(cat $KERNEL_RELEASE | tail -1)
-DATE=$(date)
-
-# Defines a CONFIG_ option if not defined yet, this helps respect
-# linux/autoconf.h
-function define_config {
- VAR=$1
- VALUE=$2
- case $VALUE in
- n) # Try to undefine it
- echo "#undef $VAR"
- ;;
- y)
- echo "#ifndef $VAR"
- echo "#define $VAR 1"
- echo "#endif /* $VAR */ "
- ;;
- m)
- echo "#ifndef $VAR"
- echo "#define $VAR 1"
- echo "#endif /* $VAR */ "
- ;;
- [0-9]*)
- # Leave integers as is
- echo "#ifndef $VAR"
- echo "#define $VAR $VALUE"
- echo "#endif /* $VAR */ "
- ;;
- *)
- # Escape every other thing with double quotes
- echo "#ifndef $VAR"
- echo "#define $VAR \"$VALUE\""
- echo "#endif /* $VAR */ "
- ;;
-
- esac
-}
-
-# This deals with core compat-drivers kernel requirements.
-function define_config_req {
- VAR=$1
- echo "#ifndef $VAR"
- echo -n "#error Compat-drivers requirement: $VAR must be enabled "
- echo "in your kernel"
- echo "#endif /* $VAR */"
-}
-
-# This handles modules which have dependencies from the kernel
-# which compat-drivers isn't providing yet either because
-# the dependency is not available as kernel module or
-# the module simply isn't provided by compat-drivers.
-function define_config_dep {
- VAR=$1
- VALUE=$2
- DEP=$3
- WARN_VAR="COMPAT_WARN_$VAR"
- echo "#ifdef $DEP"
- define_config $VAR $VALUE
- echo "#else"
- # XXX: figure out a way to warn only once
- # define only once in case user tried to enable config option
- # twice in config.mk
- echo "#ifndef $WARN_VAR"
- # Lets skip these for now.. they might be too annoying
- #echo "#warning Skipping $VAR as $DEP was needed... "
- #echo "#warning This just means $VAR won't be built and is not fatal."
- echo "#define $WARN_VAR"
- echo "#endif /* $VAR */"
- echo "#endif /* $WARN_VAR */"
-}
-
-# This handles options which have *multiple* dependencies from the kernel
-function define_config_multiple_deps {
- VAR=$1
- VALUE=$2
- DEP_ARRAY=$3
-
- # First, put all ifdefs
- for i in $(cat $MULT_DEP_FILE); do
- echo "#ifdef $i"
- done
-
- # Now put our option in the middle
- define_config $VAR $VALUE
-
- # Now close all ifdefs
- # First, put all ifdefs
- for i in $(cat $MULT_DEP_FILE); do
- echo "#endif"
- done
-
-}
-
-function kernel_version_req {
- VERSION=$(echo $1 | sed -e 's/\./,/g')
- echo "#if (LINUX_VERSION_CODE < KERNEL_VERSION($VERSION))"
- echo "#error Compat-wireless requirement: Linux >= $VERSION"
- echo "#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION($VERSION) */ "
-}
-
-cat <<EOF
-#ifndef COMPAT_AUTOCONF_INCLUDED
-#define COMPAT_AUTOCONF_INCLUDED
-/*
- * Automatically generated C config: don't edit
- * $DATE
- * compat-drivers: $CREL
- * linux: $KREL
- */
-#define COMPAT_RELEASE "$CREL"
-#define COMPAT_KERNEL_RELEASE "$KREL"
-EOF
-
-# Checks user is compiling against a kernel we support
-kernel_version_req $OLDEST_KERNEL_SUPPORTED
-
-# For each CONFIG_FOO=x option
-for i in $(egrep -h '^export CONFIG_|^ifdef CONFIG_|^ifndef CONFIG_|^endif #CONFIG_|^else #CONFIG_' $COMPAT_CONFIG_1 $COMPAT_CONFIG_2 | \
- sed 's/export //' | \
- sed 's/ /+/'); do
- case $i in
- 'ifdef+CONFIG_'* )
- echo "#$i" | sed -e 's/+/ /' -e 's/\(ifdef CONFIG_COMPAT_KERNEL_3_\)\([0-9]*\)/if (LINUX_VERSION_CODE < KERNEL_VERSION(3,\2,0))/' -e 's/\(ifdef CONFIG_COMPAT_KERNEL_2_6_\)\([0-9]*\)/if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,\2))/' -e 's/\(ifdef CONFIG_COMPAT_RHEL_\)\([0-9]*\)_\([0-9]*\)/if (defined(RHEL_MAJOR) \&\& RHEL_MAJOR == \2 \&\& RHEL_MINOR >= \3)/' -e 's/\(#ifdef \)\(CONFIG_[^:space:]*\)/#if defined(\2) || defined(\2_MODULE)/'
- continue
- ;;
- 'ifndef+CONFIG_'* )
- echo "#$i" | sed -e 's/+/ /' -e 's/\(ifndef CONFIG_COMPAT_KERNEL_3_\)\([0-9]*\)/if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,\2,0))/' -e 's/\(ifndef CONFIG_COMPAT_KERNEL_2_6_\)\([0-9]*\)/if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,\2))/' -e 's/\(ifndef CONFIG_COMPAT_RHEL_\)\([0-9]*\)_\([0-9]*\)/if (!defined(RHEL_MAJOR) || RHEL_MAJOR != \2 || RHEL_MINOR < \3)/' -e 's/\(#ifndef \)\(CONFIG_[^:space:]*\)/#if !defined(\2) \&\& !defined(\2_MODULE)/'
- continue
- ;;
- 'else+#CONFIG_'* | 'endif+#CONFIG_'* )
- echo "#$i */" |sed -e 's/+#/ \/* /g'
- continue
- ;;
- CONFIG_* )
- # Get the element on the left of the "="
- VAR=$(echo $i | cut -d"=" -f 1)
- # Get the element on the right of the "="
- VALUE=$(echo $i | cut -d"=" -f 2)
-
- # Handle core kernel module depenencies here.
- case $VAR in
- # ignore this, we have a special hanlder for this at the botttom
- # instead. We still need to keep this in config.mk to let Makefiles
- # know its enabled so just ignore it here.
- CONFIG_MAC80211_QOS)
- continue
- ;;
- esac
- # Any other module which can *definitely* be built as a module goes here
- define_config $VAR $VALUE
- continue
- ;;
- esac
-done
-
-# Deal with special cases. CONFIG_MAC80211_QOS is such a case.
-# We handle this specially for different kernels we support.
-if [ -f $KLIB_BUILD/Makefile ]; then
- MAJORLEVEL=$(make -C $KLIB_BUILD kernelversion | sed -n 's/^\([0-9]\)\..*/\1/p')
- SUBLEVEL=$(make -C $KLIB_BUILD kernelversion | sed -n 's/^\(2\.6\|[3-9]\)\.\([0-9]\+\).*/\2/p')
- if [ $MAJORLEVEL -eq 2 -a $SUBLEVEL -le 22 ]; then
- define_config CONFIG_MAC80211_QOS y
- else # kernel >= 2.6.23
- # CONFIG_MAC80211_QOS on these kernels requires
- # CONFIG_NET_SCHED and CONFIG_NETDEVICES_MULTIQUEUE
- rm -f $MULT_DEP_FILE
- echo CONFIG_NET_SCHED >> $MULT_DEP_FILE
- echo CONFIG_NETDEVICES_MULTIQUEUE >> $MULT_DEP_FILE
- define_config_multiple_deps CONFIG_MAC80211_QOS y $ALL_DEPS
- rm -f $MULT_DEP_FILE
- fi
-fi
-echo "#endif /* COMPAT_AUTOCONF_INCLUDED */"
diff --git a/scripts/gen-release.sh b/scripts/gen-release.sh
deleted file mode 100755
index 47518f25..00000000
--- a/scripts/gen-release.sh
+++ /dev/null
@@ -1,311 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009-2012 Luis R. Rodriguez <mcgrof@do-not-panic.com>
-#
-# You can use this to make compat-drivers releases:
-#
-# * daily linux-next.git based compat-drivers releases
-# * linux-stable.git / linux.git stable releases
-#
-# The assumption is you have the linux-stable git tree on your $HOME
-#
-# git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
-# git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
-#
-# You can add linux.git on to your linux-stable.git as a remote to get
-# Linus's RC's and you should add linux-stable.git as a local remote
-# to your linux-next.git so you can get then get the linux-stable tags
-# for your linux-next.git tree.
-#
-# By default we refer to the GIT_TREE variable for where we are pulling
-# code for a release and guestimate what type of release you want
-# from that. By default we assume you want a daily linux-next.git tree
-# release.
-
-# Pretty colors
-GREEN="\033[01;32m"
-YELLOW="\033[01;33m"
-NORMAL="\033[00m"
-BLUE="\033[34m"
-RED="\033[31m"
-PURPLE="\033[35m"
-CYAN="\033[36m"
-UNDERLINE="\033[02m"
-
-GIT_STABLE_URL="git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"
-GIT_NEXT_URL="git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git"
-
-STABLE_TREE="linux-stable"
-NEXT_TREE="linux-next"
-
-STAGING=/tmp/staging/compat-drivers/
-
-GIT_DIRS="$GIT_DIRS $HOME/compat/"
-GIT_DIRS="$GIT_DIRS $HOME/devel/compat-drivers/"
-GIT_DIRS="$GIT_DIRS $HOME/linux-next/"
-GIT_DIRS="$GIT_DIRS $HOME/linux-stable/"
-
-export GIT_DIRS="$GIT_DIRS"
-
-function usage()
-{
- echo -e "Usage:"
- echo -e ""
- echo -e "export GIT_TREE=${HOME}/linux-stable/"
- echo -e "or"
- echo -e "export GIT_TREE=${HOME}/linux-next/"
- echo -e ""
- echo -e "${GREEN}$1${NORMAL} ${BLUE}[ -s | -n | -p | -c | -r | -k ]${NORMAL}"
- echo -e ""
- echo -e "-s apply ${BLUE}pending-stable/${NORMAL} patches"
- echo -e "-n apply ${BLUE}linux-next-cherry-picks/${NORMAL} patches"
- echo -e "-p apply ${BLUE}linux-next-pending/${NORMAL} patches"
- echo -e "-c apply ${BLUE}crap/${NORMAL} patches"
- echo -e "-u apply ${BLUE}unified-drivers/${NORMAL} patches"
- echo -e ""
- echo -e "-k run ${GREEN}git clean -x -d -f${NORMAL} for you, ${RED}not for the faint of heart${NORMAL}"
- echo -e "-r release to kernel.org"
- echo
- echo Examples usages:
- echo
- echo -e "export GIT_TREE=${HOME}/linux-stable/"
- echo -e "${PURPLE}${1} -s -n -p -c${NORMAL}"
- echo or
- echo -e "export GIT_TREE=${HOME}/linux-next/"
- echo -e "${PURPLE}${1} -p -c${NORMAL}"
- echo
- exit
-}
-
-UPDATE_ARGS=""
-POSTFIX_RELEASE_TAG="-"
-USE_KUP=""
-FORCE_CLEAN=""
-
-if [ -z $GIT_TREE ]; then
- export GIT_TREE=$HOME/$NEXT_TREE
- if [ ! -d $GIT_TREE ]; then
- echo "Please tell me where your linux-next or linux-stable git tree is."
- echo "You can do this by exporting its location as follows:"
- echo
- echo " export GIT_TREE=${HOME}/linux-next/"
- echo "or"
- echo " export GIT_TREE=${HOME}/linux-stable/"
- echo
- echo "If you do not have one you can clone the repositories at:"
- echo " git clone $GIT_STABLE_URL"
- echo " git clone $GIT_NEXT_URL"
- exit 1
- fi
-else
- echo "You said to use git tree at: $GIT_TREE"
- GIT_DIRS="$GIT_DIRS $GIT_TREE"
-fi
-
-COMPAT_DRIVERS_DIR=$(pwd)
-COMPAT_DRIVERS_BRANCH=$(git branch | grep \* | awk '{print $2}')
-
-cd $GIT_TREE
-# --abbrev=0 on branch should work but I guess it doesn't on some releases
-EXISTING_BRANCH=$(git branch | grep \* | awk '{print $2}')
-
-# target branch we want to use from hpa's tree, by default
-# this respects the existing branch on the target kernel.
-# You can override the target branch by specifying an argument
-# to this script.
-TARGET_BRANCH="$EXISTING_BRANCH"
-TARGET_TAG="$(git describe)"
-
-while [ $# -ne 0 ]; do
- if [[ "$1" = "-s" ]]; then
- UPDATE_ARGS="${UPDATE_ARGS} $1"
- POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}s"
- shift; continue;
- fi
- if [[ "$1" = "-n" ]]; then
- UPDATE_ARGS="${UPDATE_ARGS} $1"
- POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}n"
- shift; continue;
- fi
- if [[ "$1" = "-p" ]]; then
- UPDATE_ARGS="${UPDATE_ARGS} $1"
- POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}p"
- shift; continue;
- fi
- if [[ "$1" = "-c" ]]; then
- UPDATE_ARGS="${UPDATE_ARGS} $1"
- POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}c"
- shift; continue;
- fi
- if [[ "$1" = "-u" ]]; then
- UPDATE_ARGS="${UPDATE_ARGS} $1"
- POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}u"
- shift; continue;
- fi
-
- if [[ "$1" = "-r" ]]; then
- USE_KUP="1"
- shift; continue;
- fi
-
- if [[ "$1" = "-k" ]]; then
- FORCE_CLEAN="1"
- shift; continue;
- fi
-
- echo -e "Unexpected argument passed: ${RED}${1}${NORMAL}"
- usage $0
- exit
-done
-
-BASE_TREE=$(basename $GIT_TREE)
-
-echo "On ${BASE_TREE}: $TARGET_BRANCH"
-
-# Lets now make sure you are on matching compat-drivers branch.
-# This is a super hack, but let me know if you figure out a cleaner way
-TARGET_KERNEL_RELEASE=$(make VERSION="linux-3" SUBLEVEL="" EXTRAVERSION=".y" kernelversion)
-GENLOG_TARGET=$(make VERSION="3" SUBLEVEL="" EXTRAVERSION="" kernelversion)
-
-if [[ $COMPAT_DRIVERS_BRANCH != $TARGET_KERNEL_RELEASE && $BASE_TREE != "linux-next" ]]; then
- echo -e "You are on the compat-drivers ${GREEN}${COMPAT_DRIVERS_BRANCH}${NORMAL} but are "
- echo -en "on the ${RED}${TARGET_KERNEL_RELEASE}${NORMAL} branch... "
- echo -e "try changing to that first."
-
- read -p "Do you still want to continue (y/N)? "
- if [[ "${REPLY}" != "y" ]]; then
- echo -e "Bailing out !"
- exit
- fi
-fi
-
-cd $COMPAT_DRIVERS_DIR
-CHANGELOG_FILE="ChangeLog-$(git describe| sed -e 's|compat-drivers-v||')"
-
-
-if [[ $COMPAT_DRIVERS_BRANCH != "master" ]]; then
- RELEASE=$(git describe --abbrev=0 | sed -e 's|\(v\)\([0-9]\)|\2|')
-else
- RELEASE=$(git describe --abbrev=0)
-fi
-
-if [[ $POSTFIX_RELEASE_TAG != "-" ]]; then
- RELEASE="${RELEASE}${POSTFIX_RELEASE_TAG}"
-fi
-RELEASE_TAR="$RELEASE.tar.bz2"
-
-rm -rf $STAGING
-mkdir -p $STAGING
-cp -a $COMPAT_DRIVERS_DIR $STAGING/$RELEASE
-cd $STAGING/$RELEASE
-
-# Only use interactive paranoia for non-signed / uploaded to kernel.org releases
-# If using kup note that we will from now on always be forcing a super clean
-# release and will simply use git clean to help use remove all detected content
-# that should not be on your local git tree as after a checkout.
-PARANOIA=""
-if [[ "$USE_KUP" != "1" ]]; then
- PARANOIA="-i"
-else
- PARANOIA="-c"
-fi
-
-if [[ "$FORCE_CLEAN" = "1" ]]; then
- PARANOIA="$PARANOIA -c"
-fi
-
-./scripts/git-paranoia $PARANOIA
-if [[ $? -ne 0 ]]; then
- if [[ "$USE_KUP" = "1" ]]; then
- echo -e "Given that this is a targeted ${CYAN}kernel.org${NORMAL}"
- echo -e "release we are bailing."
- exit 1
- fi
- echo
- echo -e "Detected some tree content is not yet ${RED}GPG signed${NORMAL}..."
- echo -e "Consider ${CYAN}baling out${NORMAL} and ${RED}carefully${NORMAL} reading the"
- echo -e "implications of running ${GREEN}$0 -k${NORMAL} instead."
- echo -e "If you make a release right now you may be included files"
- echo -e "or code into the release you perhaps did not want to."
- echo -e ""
- read -p "Do you still want to continue (y/N)? "
- if [[ "${REPLY}" != "y" ]]; then
- echo -e "Bailing out !"
- exit 1
- fi
-fi
-
-./scripts/admin-update.sh $UPDATE_ARGS
-rm -rf $STAGING/$RELEASE/.git
-
-# Remove any gunk
-echo
-echo "Cleaning up the release ..."
-make clean 2>&1 > /dev/null
-find ./ -type f -name *.orig | xargs rm -f
-find ./ -type f -name *.rej | xargs rm -f
-
-cd $STAGING/
-
-echo "Creating ${RELEASE}.tar ..."
-tar -cf ${RELEASE}.tar $RELEASE/
-bzip2 -k -9 ${RELEASE}.tar
-
-# kup allows us to upload a compressed archive but wants us
-# to sign the tarball alone, it will uncompress the
-# compressed tarball, verify the tarball and then re-compress
-# the tarball.
-gpg --armor --detach-sign ${RELEASE}.tar
-
-echo
-echo "compat-drivers release: $RELEASE"
-echo "Size: $(du -h ${RELEASE_TAR})"
-echo "sha1sum: $(sha1sum ${RELEASE_TAR})"
-echo
-echo "Release: ${STAGING}${RELEASE_TAR}"
-echo "Release signature: ${STAGING}${RELEASE}.tar.asc"
-
-if [[ "$USE_KUP" != "1" ]]; then
- exit 0
-fi
-
-# Where we dump backport releases onto kernel.org
-KORG_BACKPORT="/pub/linux/kernel/projects/backports/"
-
-if [[ "$BASE_TREE" = "linux-next" ]]; then
- YEAR=$(echo $TARGET_TAG | awk -F "-" '{print $2}' | cut -c 1-4)
- MONTH=$(echo $TARGET_TAG | awk -F "-" '{print $2}' | cut -c 5-6)
- DAY=$(echo $TARGET_TAG | awk -F "-" '{print $2}' | cut -c 7-8)
-
-
- kup mkdir ${KORG_BACKPORT}/${YEAR} > /dev/null 2>&1
- kup mkdir ${KORG_BACKPORT}/${YEAR}/${MONTH} > /dev/null 2>&1
- kup mkdir ${KORG_BACKPORT}/${YEAR}/${MONTH}/${DAY} > /dev/null 2>&1
-
- kup ls ${KORG_BACKPORT}/${YEAR}/${MONTH}/${DAY}/ | grep ${RELEASE}.tar.bz2 > /dev/null 2>&1
- if [[ $? -eq 0 ]]; then
- echo -e "File ${KORG_BACKPORT}/${YEAR}/${MONTH}/${DAY}/${BLUE}${RELEASE}.tar.bz2${NORMAL} already exists"
- fi
-
- kup put ${RELEASE}.tar.bz2 ${RELEASE}.tar.asc ${KORG_BACKPORT}/${YEAR}/${MONTH}/${DAY}/
-elif [[ "$BASE_TREE" = "linux-stable" ]]; then
- TARGET_STABLE="${KORG_BACKPORT}/stable/${TARGET_TAG}"
-
- kup mkdir ${KORG_BACKPORT}/stable > /dev/null 2>&1
- kup mkdir ${TARGET_STABLE} > /dev/null 2>&1
-
- kup ls ${TARGET_STABLE} | grep ${RELEASE}.tar.bz2 > /dev/null 2>&1
- if [[ $? -eq 0 ]]; then
- echo -e "File ${TARGET_STABLE}/${RELEASE}.tar.bz2${NORMAL} already exists"
- fi
-
- kup put ${RELEASE}.tar.bz2 ${RELEASE}.tar.asc ${TARGET_STABLE}/
-
- cd $GIT_TREE
- $STAGING/${RELEASE}/scripts/genlog-${GENLOG_TARGET}
-
- gpg --armor --detach-sign $CHANGELOG_FILE
- kup put ${CHANGELOG_FILE} ${CHANGELOG_FILE}.asc ${TARGET_STABLE}/
-else
- echo "Unsupported release type: $BASE_TREE"
- exit 1
-fi
diff --git a/scripts/genlog-3.7 b/scripts/genlog-3.7
deleted file mode 100755
index 80f8731f..00000000
--- a/scripts/genlog-3.7
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/bin/bash
-
-COMPAT=$HOME/compat/.git
-COMPAT_DRIVERS=$HOME/devel/compat-drivers/.git
-
-export GIT_DIR=${COMPAT_DRIVERS}
-
-OLD_VER=6
-let VER="7"
-RC="-rc1"
-LOG="ChangeLog-$(git describe| sed -e 's|compat-drivers-v||')"
-
-echo > $LOG
-
-echo -e "===============================================" >> $LOG
-echo -e "ChangeLog for compat-drivers for linux-3.${VER}${RC}" >> $LOG
-echo -e "===============================================" >> $LOG
-
-echo -e "
-This is the ChangeLog for the Linux kernel project compat-drivers.
-It provides a backport of a few Linux kernel subsystems down to
-older kernels:
-
- * 802.11
- * Bluetooth
- * Ethernet
- * DRM
-
-For more details refer to the home pages:
-
-https://backports.wiki.kernel.org
-
-The compat-drivers project consists of code from three projects:
-
- * The Linux kernel: linux-stable.git
- * Compat-wirelesS: compat-drivers.git
- * Compat: compat.git
-
-The compat-drivers stable releases incorporates code from from
-each of these git trees for the respective upstream Linux kernel
-stable release. A branch called linux-3.x.y exists for each
-stable release. Below we provide the ChangeLog of changes from
-the previous branched release to the new branched release.
-
-Release: linux-3.${VER}
-
-" >> $LOG
-
-export GIT_DIR=${COMPAT}
-echo -e "Updates from the compat.git project:" >> $LOG
-echo -e "====================================\n" >> $LOG
-
-echo -e "git shortlog linux-3.${OLD_VER}.y..linux-3.${VER}.y\n" >> $LOG
-git shortlog origin/linux-3.${OLD_VER}.y..HEAD >> $LOG
-
-export GIT_DIR=${COMPAT_DRIVERS}
-echo -e "Updates from the compat-drivers.git project:" >> $LOG
-echo -e "=============================================\n" >> $LOG
-echo -e "git shortlog linux-3.${OLD_VER}.y..linux-3.${VER}.y\n" >> $LOG
-git shortlog origin/linux-3.${OLD_VER}.y..HEAD >> $LOG
-
-echo -e "Updates from the Linux kernel:" >> $LOG
-echo -e "=============================================\n" >> $LOG
-
-echo -e "We only include very specific changes for the supported" >> $LOG
-echo -e "subsystems:\n" >> $LOG
-echo -e " * 802.11" >> $LOG
-echo -e " * Bluetooth" >> $LOG
-echo -e " * Ethernet" >> $LOG
-echo -e " * DRM " >> $LOG
-
-echo -e "
-Generated by using:
-
-git log v3.${OLD_VER}${RC}..HEAD \
- net/wireless/ \
- net/mac80211/ \
- net/rfkill/ \
- drivers/net/wireless/ \
- net/bluetooth/ \
- drivers/bluetooth/ \
- drivers/gpu/drm/ \
- drivers/net/ethernet/atheros/atl1c/ \
- drivers/net/ethernet/atheros/atl1e/ \
- drivers/net/ethernet/atheros/atlx/ \
- include/uapi/linux/nl80211.h \
- include/linux/rfkill.h \
- include/uapi/rfkill.h \
- include/uapi/drm \
- include/net/cfg80211.h \
- include/net/regulatory.h \
- include/net/cfg80211.h >> $LOG
-
-git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
-" >> $LOG
-
-export GIT_DIR=${PWD}/.git/
-git log v3.${OLD_VER}..HEAD \
- net/wireless/ \
- net/mac80211/ \
- net/rfkill/ \
- drivers/net/wireless/ \
- net/bluetooth/ \
- drivers/bluetooth/ \
- drivers/gpu/drm/ \
- drivers/net/ethernet/atheros/atl1c/ \
- drivers/net/ethernet/atheros/atl1e/ \
- drivers/net/ethernet/atheros/atlx/ \
- include/uapi/linux/nl80211.h \
- include/linux/rfkill.h \
- include/uapi/linux/rfkill.h \
- include/uapi/drm \
- include/net/cfg80211.h \
- include/net/regulatory.h \
- include/net/cfg80211.h >> $LOG
-
diff --git a/scripts/genlog-3.8 b/scripts/genlog-3.8
deleted file mode 100755
index 72153cb2..00000000
--- a/scripts/genlog-3.8
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/bin/bash
-
-COMPAT=$HOME/compat/.git
-COMPAT_WIRELESS=$HOME/devel/compat-drivers/.git
-
-OLD_VER=7
-let VER="8"
-RC="-rc5"
-export GIT_DIR=${COMPAT_WIRELESS}
-CD_VER="$(git describe | sed -e 's|compat-drivers-v||g')"
-LOG="ChangeLog-${CD_VER}"
-
-echo > $LOG
-
-echo -e "================================================================" >> $LOG
-echo -e "ChangeLog for $(git describe) based on linux-3.${VER}${RC}" >> $LOG
-echo -e "================================================================" >> $LOG
-
-echo -e "
-This is the ChangeLog for the Linux kernel project compat-drivers.
-It provides a backport of a few Linux kernel subsystems down to
-older kernels:
-
- * 802.11
- * Bluetooth
- * Ethernet
- * DRM
-
-For more details refer to the home pages:
-
-https://backports.wiki.kernel.org
-
-The compat-drivers project consists of code from three projects:
-
- * The Linux kernel: linux-stable.git
- * Compat-wirelesS: compat-drivers.git
- * Compat: compat.git
-
-The compat-drivers stable releases incorporates code from from
-each of these git trees for the respective upstream Linux kernel
-stable release. A branch called linux-3.x.y exists for each
-stable release. Below we provide the ChangeLog of changes from
-the previous branched release to the new branched release.
-
-Release: linux-3.${VER}
-
-" >> $LOG
-
-export GIT_DIR=${COMPAT}
-echo -e "Updates from the compat.git project:" >> $LOG
-echo -e "====================================\n" >> $LOG
-
-echo -e "git shortlog linux-3.${OLD_VER}.y..linux-3.${VER}.y\n" >> $LOG
-git shortlog origin/linux-3.${OLD_VER}.y..HEAD >> $LOG
-
-export GIT_DIR=${COMPAT_WIRELESS}
-echo -e "Updates from the compat-drivers.git project:" >> $LOG
-echo -e "=============================================\n" >> $LOG
-echo -e "git shortlog linux-3.${OLD_VER}.y..linux-3.${VER}.y\n" >> $LOG
-git shortlog origin/linux-3.${OLD_VER}.y..HEAD >> $LOG
-
-echo -e "Updates from the Linux kernel:" >> $LOG
-echo -e "=============================================\n" >> $LOG
-
-echo -e "We only include very specific changes for the supported" >> $LOG
-echo -e "subsystems:\n" >> $LOG
-echo -e " * 802.11" >> $LOG
-echo -e " * Bluetooth" >> $LOG
-echo -e " * Ethernet" >> $LOG
-echo -e " * DRM " >> $LOG
-
-echo -e "
-Generated by using:
-
-git log v3.${OLD_VER}${RC}..HEAD \
- net/wireless/ \
- net/mac80211/ \
- net/rfkill/ \
- drivers/net/wireless/ \
- net/bluetooth/ \
- drivers/bluetooth/ \
- drivers/gpu/drm/ \
- drivers/net/ethernet/atheros/atl1c/ \
- drivers/net/ethernet/atheros/atl1e/ \
- drivers/net/ethernet/atheros/atlx/ \
- include/uapi/linux/nl80211.h \
- include/linux/rfkill.h \
- include/uapi/rfkill.h \
- include/uapi/drm \
- include/net/cfg80211.h \
- include/net/regulatory.h \
- include/net/cfg80211.h >> $LOG
-
-git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
-" >> $LOG
-
-export GIT_DIR=${PWD}/.git/
-git log v3.${OLD_VER}..HEAD \
- net/wireless/ \
- net/mac80211/ \
- net/rfkill/ \
- drivers/net/wireless/ \
- net/bluetooth/ \
- drivers/bluetooth/ \
- drivers/gpu/drm/ \
- drivers/net/ethernet/atheros/atl1c/ \
- drivers/net/ethernet/atheros/atl1e/ \
- drivers/net/ethernet/atheros/atlx/ \
- include/uapi/linux/nl80211.h \
- include/linux/rfkill.h \
- include/uapi/linux/rfkill.h \
- include/uapi/drm \
- include/net/cfg80211.h \
- include/net/regulatory.h \
- include/net/cfg80211.h >> $LOG
-
diff --git a/scripts/genlog-3.9 b/scripts/genlog-3.9
deleted file mode 100755
index a9fdf075..00000000
--- a/scripts/genlog-3.9
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/bin/bash
-
-COMPAT=$HOME/compat/.git
-COMPAT_WIRELESS=$HOME/devel/compat-drivers/.git
-
-OLD_VER=8
-let VER="9"
-RC="-rc1"
-export GIT_DIR=${COMPAT_WIRELESS}
-CD_VER="$(git describe | sed -e 's|compat-drivers-v||g')"
-LOG="ChangeLog-${CD_VER}"
-
-echo > $LOG
-
-echo -e "================================================================" >> $LOG
-echo -e "ChangeLog for $(git describe) based on linux-3.${VER}${RC}" >> $LOG
-echo -e "================================================================" >> $LOG
-
-echo -e "
-This is the ChangeLog for the Linux kernel project compat-drivers.
-It provides a backport of a few Linux kernel subsystems down to
-older kernels:
-
- * 802.11
- * Bluetooth
- * Ethernet
- * DRM
-
-For more details refer to the home pages:
-
-https://backports.wiki.kernel.org
-
-The compat-drivers project consists of code from three projects:
-
- * The Linux kernel: linux-stable.git
- * Compat-wirelesS: compat-drivers.git
- * Compat: compat.git
-
-The compat-drivers stable releases incorporates code from from
-each of these git trees for the respective upstream Linux kernel
-stable release. A branch called linux-3.x.y exists for each
-stable release. Below we provide the ChangeLog of changes from
-the previous branched release to the new branched release.
-
-Release: linux-3.${VER}
-
-" >> $LOG
-
-export GIT_DIR=${COMPAT}
-echo -e "Updates from the compat.git project:" >> $LOG
-echo -e "====================================\n" >> $LOG
-
-echo -e "git shortlog linux-3.${OLD_VER}.y..linux-3.${VER}.y\n" >> $LOG
-git shortlog origin/linux-3.${OLD_VER}.y..HEAD >> $LOG
-
-export GIT_DIR=${COMPAT_WIRELESS}
-echo -e "Updates from the compat-drivers.git project:" >> $LOG
-echo -e "=============================================\n" >> $LOG
-echo -e "git shortlog linux-3.${OLD_VER}.y..linux-3.${VER}.y\n" >> $LOG
-git shortlog origin/linux-3.${OLD_VER}.y..HEAD >> $LOG
-
-echo -e "Updates from the Linux kernel:" >> $LOG
-echo -e "=============================================\n" >> $LOG
-
-echo -e "We only include very specific changes for the supported" >> $LOG
-echo -e "subsystems:\n" >> $LOG
-echo -e " * 802.11" >> $LOG
-echo -e " * Bluetooth" >> $LOG
-echo -e " * Ethernet" >> $LOG
-echo -e " * DRM " >> $LOG
-
-echo -e "
-Generated by using:
-
-git log v3.${OLD_VER}..HEAD \
- net/wireless/ \
- net/mac80211/ \
- net/rfkill/ \
- drivers/net/wireless/ \
- net/bluetooth/ \
- drivers/bluetooth/ \
- drivers/gpu/drm/ \
- drivers/net/ethernet/atheros/atl1c/ \
- drivers/net/ethernet/atheros/atl1e/ \
- drivers/net/ethernet/atheros/atlx/ \
- include/uapi/linux/nl80211.h \
- include/linux/rfkill.h \
- include/uapi/rfkill.h \
- include/uapi/drm \
- include/net/cfg80211.h \
- include/net/regulatory.h \
- include/net/cfg80211.h >> $LOG
-
-git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
-" >> $LOG
-
-export GIT_DIR=${PWD}/.git/
-git log v3.${OLD_VER}..HEAD \
- net/wireless/ \
- net/mac80211/ \
- net/rfkill/ \
- drivers/net/wireless/ \
- net/bluetooth/ \
- drivers/bluetooth/ \
- drivers/gpu/drm/ \
- drivers/net/ethernet/atheros/atl1c/ \
- drivers/net/ethernet/atheros/atl1e/ \
- drivers/net/ethernet/atheros/atlx/ \
- include/uapi/linux/nl80211.h \
- include/linux/rfkill.h \
- include/uapi/linux/rfkill.h \
- include/uapi/drm \
- include/net/cfg80211.h \
- include/net/regulatory.h \
- include/net/cfg80211.h >> $LOG
-
diff --git a/scripts/git-paranoia b/scripts/git-paranoia
deleted file mode 100755
index cfc18e6a..00000000
--- a/scripts/git-paranoia
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/bash
-#
-# git-paranoia: for those parnaoid about what goes into releases based on git.
-#
-# Copyright 2012 Luis R. Rodriguez <mcgrof@do-not-panic.com>
-#
-# 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., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Pretty colors
-GREEN="\033[01;32m"
-YELLOW="\033[01;33m"
-NORMAL="\033[00m"
-BLUE="\033[34m"
-RED="\033[31m"
-PURPLE="\033[35m"
-CYAN="\033[36m"
-UNDERLINE="\033[02m"
-
-INTERACTIVE="0"
-RUN_CLEAN="0"
-
-function usage()
-{
- echo -e "Usage: ${GREEN}$1${NORMAL} ${BLUE}[ -i ]${NORMAL}"
- echo -e "-i\tInteractive, allows user to override paranoia"
- echo -e "-c\tRuns git clean -x -d for you. Not for the faint of heart"
- echo
- echo -e "Example usage:"
- echo
- echo -e "export GIT_DIRS=\"${HOME}/linux-stable/ ${HOME}/linux-next\""
- echo -e "$1"
- echo
- exit
-}
-
-function __git_paranoia()
-{
- for i in $GIT_DIRS; do
- if [[ ! -d $i ]]; then
- echo -e "${BLUE}$i${NORMAL} does not exist"
- return 1
- fi
-
- cd $i;
-
- if [[ "$RUN_CLEAN" = "1" ]]; then
- git clean -x -d -f
- fi
-
- printf "Verifying ${BLUE}%15s\t${CYAN}%40s\t" $(basename $i) $(git describe)
- git tag -v $(git describe --dirty) > /dev/null 2>&1
- if [[ $? -ne 0 || $(git status -s | wc -l) -ne 0 ]]; then
- echo -e "[${RED}FAILED${NORMAL}]"
- # We're paranoid, not only do we want the git tag to be GPG signed
- # but we also want *no* unepxected content on the releases! If you have
- # any files that do not belong into the git tree, nuke them, we won't do it
- # for you!
- if [[ $(git status -s | wc -l) -ne 0 || $(git clean -x -d -n | wc -l) -ne 0 ]]; then
- echo -e "Detected some content which likely should not be released."
- echo -e "In order to fix either run 'git clean -x -d -f' yourself or"
- echo -e "run '$0 -c'"
- echo -e ""
- echo -e "Not commited content: (run: git clean -x -d -f to fix)"
- git status -s
- git clean -x -d -n | sed 's|^Would|Should|g'
- fi
- return 1
- else
- echo -e "[${GREEN}OK!${NORMAL}]"
- fi
- done
-}
-
-if [[ -z $GIT_DIRS ]]; then
- GIT_DIRS="${PWD}"
- STAT="$(git status > /dev/null 2>&1 && echo $?)"
- if [[ $STAT -ne 0 ]]; then
- echo -e "${RED}Error${NORMAL}:"
- echo -e "${PWD} not a git tree. Jump into one or set the "
- echo -e "${CYAN}GIT_DIRS${NORMAL} environment variable with your list of git trees"
- echo
- usage $0
- exit 1
- fi
-fi
-
-while [ $# -ne 0 ]; do
- if [[ "$1" = "-i" ]]; then
- INTERACTIVE="1"
- shift; continue;
- fi
- if [[ "$1" = "-c" ]]; then
- RUN_CLEAN="1"
- shift; continue;
- fi
- echo -e "Unexpected argument passed: ${RED}${1}${NORMAL}"
- usage $0
- exit
-done
-
-__git_paranoia
-
-if [[ $? -ne 0 ]]; then
- echo
- echo -e "Detected some tree content is not yet ${RED}GPG signed${NORMAL}..."
- if [[ "$INTERACTIVE" = "0" ]]; then
- exit 1
- fi
-
- read -p "Do you still want to continue (y/N)? "
- if [[ "${REPLY}" != "y" ]]; then
- echo -e "Bailing out !"
- exit 1
- fi
-fi
-
-exit 0
diff --git a/scripts/iwl-enable b/scripts/iwl-enable
deleted file mode 100755
index c29b71ee..00000000
--- a/scripts/iwl-enable
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2007 Luis R. Rodriguez <lrodriguez@atheros.com>
-#
-# Makes sure either iwlagn (new) or iwl4965 (old)
-# is enabled to be used. This allows us to choose any driver without
-# blacklisting each other.
-
-. /usr/lib/compat-drivers/modlib.sh
-
-if [[ $UID -ne 0 ]]; then
- echo "Run with root privileges"
- exit
-fi
-
-IWL_NEW="iwlagn"
-IWL_OLD="iwl4965"
-
-# Appended to module file at the end when we want to ignore one
-USAGE="Usage: $0 [ $IWL_NEW | $IWL_OLD | iwlwifi ]"
-
-function enable_iwlwifi {
- for i in $IWL_OLD $IWL_NEW; do
- module_disable $i
- done
- module_enable iwlwifi
-}
-
-function enable_iwlagn {
- module_disable $IWL_OLD
- for i in $IWL_NEW; do
- module_enable $i
- done
-}
-
-# Default behavior: disables the old iwl4965 driver and enables iwlagn
-if [ $# -eq 0 ]; then
- enable_iwlagn
- exit
-elif [ $# -ne 1 ]; then
- echo "$USAGE"
- exit
-fi
-
-MODULE=$1
-if [ "$MODULE" == "iwl4965" ]; then
- module_disable $IWL_NEW
- module_enable $IWL_OLD
-elif [ "$MODULE" == "iwlagn" ]; then
- enable_iwlagn
-elif [ "$MODULE" == "iwlwifi" ]; then
- enable_iwlwifi
-else
- echo "$USAGE"
- exit
-fi
diff --git a/scripts/iwl-load b/scripts/iwl-load
deleted file mode 100755
index a758902a..00000000
--- a/scripts/iwl-load
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-# Copyright 2008 Luis R. Rodriguez <lrodriguez@atheros.com>
-#
-# Loads new Intel iwl (iwlagn) or the old ones (iwl4965)
-
-. /usr/lib/compat-drivers/modlib.sh
-
-IWL_OLD="iwl4965"
-IWL_NEW="iwlagn"
-
-if [[ $UID -ne 0 ]]; then
- echo "Run with root privileges"
- exit
-fi
-
-
-USAGE="Usage: $0 [ iwlagn | iwl4965 ]"
-
-# Default behavior: unload iwl4965 and load iwlagn
-if [ $# -eq 0 ]; then
- 1=iwlagn
-elif [ $# -ne 1 ]; then
- echo "$USAGE"
- exit
-fi
-
-MODULE=$1
-if [ "$MODULE" == "iwlagn" ]; then
- grep iwl4965 /proc/modules 2>&1 > /dev/null
- if [ $? -eq 0 ]; then
- echo Unloading $i...
- modprobe -r --ignore-remove iwl4965
- fi
- # Enables both b43 and b43legacy
- iwl-enable iwlagn
- modprobe iwlagn
- CHECK=`modprobe -l iwlagn`
- if [ ! -z $CHECK ]; then
- echo "iwlagn loaded successfully"
- fi
-elif [ "$MODULE" == "iwl4965" ]; then
- CHECK=`modprobe -l iwlagn`
- if [ ! -z $CHECK ]; then
- echo "iwlagn currently loaded, going to try to unload the module..."
- modprobe -r --ignore-remove iwlagn
- fi
- iwl-enable iwl4965
- # iwl4965 may be loaded already lets remove it first
- modprobe -r --ignore-remov iwl4965 2>&1 > /dev/null
- modprobe iwl4965
- CHECK=`modprobe -l iwl4965`
- if [ ! -z $CHECK ]; then
- echo "iwl4965 loaded successfully!"
- fi
-else
- echo "$USAGE"
- exit
-fi
diff --git a/scripts/madwifi-unload b/scripts/madwifi-unload
deleted file mode 100755
index 0cde2865..00000000
--- a/scripts/madwifi-unload
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-# Copyright 2006 Kel Modderman <kelrin@tpg.com.au>
-#
-# Taken from madwifi scripts. This unloads madwifi
-
-: ${PATTERN='\(ath_.*\|wlan_.*\|wlan\)$'}
-: ${MAX_TRIES=10}
-
-test "`id -u`" = 0 || {
- echo "ERROR: You must be root to run this script" >&2
- exit 1
-}
-
-test -r /proc/modules || {
- echo "ERROR: Cannot read /proc/modules" >&2
- exit 1
-}
-
-tries="$MAX_TRIES"
-while test "$tries" != "0"; do
- skipped=0
- IFS='
-'
- for line in `cat /proc/modules`; do
- IFS=' '
- set x $line
- name="$2"
- size="$3"
- use_count="$4"
- use_name="$5"
- state="$6"
- expr "$name" : "$PATTERN" >/dev/null || continue
-
- # Compatibility for Linux 2.4.x
- test -z "$state" && { use_name="-"; state="Live"; }
-
- if test "$state" != "Live" || test "$use_count" != "0" || \
- test "$use_name" != "-"; then
- # Don't skip unload in the last run
- if test "$tries" != "1"; then
- skipped=1
- continue
- fi
- fi
-
- echo "Unloading \"$name\""
- sync # to be safe
- /sbin/rmmod "$name" || {
- echo "ERROR: cannot unload module \"$name\"" >&2
- exit 1
- }
- sync # to be even safer
- done
- test "$skipped" = "0" && break
- tries=$(($tries - 1))
-done
-
-exit 0
diff --git a/scripts/modlib.sh b/scripts/modlib.sh
deleted file mode 100755
index d839a37e..00000000
--- a/scripts/modlib.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2007 Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
-#
-# You can use these to enable/disable modules without blacklisting them
-
-# Make sure our imporant paths are included
-PATH=$PATH:/usr/sbin:/sbin
-
-# Appended to module file at the end when we want to ignore one
-IGNORE_SUFFIX=".ignore"
-VER=`uname -r`
-
-# If 'module' is found, its renamed to 'module.ignore'
-function module_disable {
- # Basic check to see if this is a module available for loading
- MODULE_CHECK=`modprobe -l $1`
- if [ -z $MODULE_CHECK ]; then
- echo "Module $1 not detected -- this is fine"
- return
- fi
- MODULE=$1
- MODULE_KO=${MODULE}.ko
- # In case there are more than one of these modules. This can
- # happen, for example if your distribution provides one and you have
- # compiled one in yourself later.
- MODULE_COUNT=`find /lib/modules/$VER/ -name $MODULE_KO | wc -l`
- ALL_MODULES=`find /lib/modules/$VER/ -name $MODULE_KO`
- COUNT=1
- CHECK=`modprobe -l $MODULE`
- for i in $ALL_MODULES; do
- if [[ $MODULE_COUNT -gt 1 ]]; then
- if [[ $COUNT -eq 1 ]]; then
- echo -en "$MODULE_COUNT $MODULE modules found "
- echo -e "we'll disable all of them"
- fi
- echo -en "Disabling $MODULE ($COUNT) ..."
- else
- echo -en "Disabling $MODULE ..."
- fi
- mv -f $i ${i}${IGNORE_SUFFIX}
- depmod -a
- CHECK_AGAIN=`modprobe -l $MODULE`
- if [ "$CHECK" != "$CHECK_AGAIN" ]; then
- echo -e "\t[OK]\tModule disabled:"
- echo "$CHECK"
- else
- echo -e "[ERROR]\tModule is still being detected:"
- echo "$CHECK"
- fi
- let COUNT=$COUNT+1
- done
-}
-
-# If 'module.ignore' is found, rename it back to 'module'
-function module_enable {
- MODULE=$1
- MODULE_KO=${MODULE}.ko
- IGNORED_MODULE=${MODULE_KO}${IGNORE_SUFFIX}
- # In case there are more than one of these modules. This can
- # happen, for example if your distribution provides one and you have
- # compiled one in yourself later.
- ALL_MODULES=`find /lib/modules/$VER/ -name $IGNORED_MODULE`
- for i in $ALL_MODULES; do
- echo -en "Enabling $MODULE ..."
- DIR=`dirname $i`
- mv $i $DIR/$MODULE_KO
- depmod -a
- CHECK=`modprobe -l $MODULE`
- if [ "$DIR/$MODULE_KO" != $CHECK ]; then
- if [ -z $CHECK ]; then
- echo -e "\t[ERROR]\tModule could not be enabled"
- else
- echo -en "\t[OK]\tModule renamed but another "
- echo "module file is being preferred"
- echo -e "Renamed module:\t\t$DIR/$MODULE_KO"
- echo -e "Preferred module:\t$CHECK"
- fi
- else
- echo -e "\t[OK]\tModule enabled: "
- echo "$DIR/$MODULE_KO"
- fi
- # Lets only do this for the first module found
- break
- done
-}
-
diff --git a/scripts/refresh-compat b/scripts/refresh-compat
deleted file mode 100755
index 6846d3e9..00000000
--- a/scripts/refresh-compat
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2012 Luis R. Rodriguez <mcgrof@frijolero.org>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-# The purpose of this script is to enable developers use compat-drivers
-# backport work without having to carry code on their tree. This lets
-# developers synch to newer compat-drivers releases to gain more backport
-# work. If you use this throw the files into your .gitignore:
-#
-# compat/
-# udev/
-# include/
-# scripts/
-# .compat_base_tree
-# .compat_base_tree_version
-# .compat_version
-# config.mk
-#
-# An example git tree for standalone development will be provided later.
-# Once run you can then just run on your standalone development tree:
-#
-# ./refresh-compat
-#
-# This is a copy of refresh-compat-local that we maintain here
-# You can keep that in your git tree as otherwise its hard for users to
-# know what to run.
-
-# Pretty colors
-GREEN="\033[01;32m"
-YELLOW="\033[01;33m"
-NORMAL="\033[00m"
-BLUE="\033[34m"
-RED="\033[31m"
-PURPLE="\033[35m"
-CYAN="\033[36m"
-UNDERLINE="\033[02m"
-
-COMPAT_SRC="$HOME/devel/compat-drivers/"
-EXTRA_COPY=""
-
-if [[ -f .compat_copy ]]; then
- source .compat_copy
-fi
-
-COPY=""
-COPY="$COPY compat/"
-COPY="$COPY include/"
-COPY="$COPY udev/"
-COPY="$COPY scripts/check_config.sh"
-COPY="$COPY scripts/check_depmod"
-COPY="$COPY scripts/compress_modules"
-COPY="$COPY scripts/gen-compat-autoconf.sh"
-COPY="$COPY scripts/modlib.sh"
-COPY="$COPY scripts/update-initramfs"
-COPY="$COPY scripts/skip-colors"
-COPY="$COPY .compat_base"
-COPY="$COPY .compat_base_tree"
-COPY="$COPY .compat_base_tree_version"
-COPY="$COPY .compat_version"
-COPY="$COPY config.mk"
-COPY="$COPY $EXTRA_COPY"
-
-REFRESH_LOCAL="scripts/refresh-compat-local"
-REFRESH_TARGET="refresh-compat"
-
-WORK_DIR="$(pwd)"
-cd ${COMPAT_SRC}
-# Only copy the base files
-./scripts/admin-update.sh -b
-cd ${WORK_DIR}
-
-for i in $COPY ; do
- if [[ -d ${COMPAT_SRC}${i} ]]; then
- echo -e "Copying ${BLUE}${i}${NORMAL} ..."
- cp -a ${COMPAT_SRC}/$i .
- continue
- fi
- if [[ -f ${COMPAT_SRC}${i} ]]; then
- DIR=$(dirname $i)
- if [[ ! -d $DIR ]]; then
- mkdir -p $DIR
- fi
-
- if [[ -x ${COMPAT_SRC}${i} ]]; then
- echo -e "Copying ${GREEN}${i}${NORMAL} ..."
- else
- echo -e "Copying ${i}${NORMAL} ..."
- fi
-
- cp -f ${COMPAT_SRC}/${i} $i
- continue
- fi
-done
-
-rm -f include/linux/compat_autoconfig.h
-rm -f .config
-
-cp -f ${COMPAT_SRC}/${REFRESH_LOCAL} ${REFRESH_TARGET}
-
-if [[ ! -f .compat_base_tree_version ]]; then
- echo -e "Failed at copying files over..."
- exit 1
-fi
-
-echo
-echo -e "Synched with ${CYAN}$(cat .compat_version)${NORMAL}"
diff --git a/scripts/refresh-compat-local b/scripts/refresh-compat-local
deleted file mode 100755
index 53963df3..00000000
--- a/scripts/refresh-compat-local
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2012 Luis R. Rodriguez <mcgrof@do-not-panic.com>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-# You can keep this in synch with your git tree after running
-# This script just update your local copy.
-
-source .compat_copy
-UPDATE_SCRIPT="$COMPAT_SRC/scripts/refresh-compat"
-
-if [[ ! -d $COMPAT_SRC ]]; then
- echo -e "You should have compat-drivers.git cloned and checked out under $COMPAT_SRC"
- echo -e "The git tree: git://github.com/mcgrof/compat-drivers"
- exit 1
-fi
-
-if [[ ! -f $UPDATE_SCRIPT ]]; then
- echo -e "$UPDATE_SCRIPT must exist"
- exit 1
-fi
-
-exec $UPDATE_SCRIPT
diff --git a/scripts/skip-colors b/scripts/skip-colors
deleted file mode 100755
index 71238082..00000000
--- a/scripts/skip-colors
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env bash
-perl -pe 's|(\e)\[(\d+)(;*)(\d*)(\w)||g'
diff --git a/scripts/unload.sh b/scripts/unload.sh
deleted file mode 100755
index 1f3c5c38..00000000
--- a/scripts/unload.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash
-
-# The old stack drivers and the mac80211 rc80211_simple modules
-# which is no longer on recent kernels (its internal)
-OLD_MODULES="iwlwifi_mac80211 rc80211_simple zd1211rw-mac80211"
-OLD_MODULES="$OLD_MODULES ieee80211_crypt_tkip ieee80211_crypt_ccmp"
-OLD_MODULES="$OLD_MODULES ieee80211softmac ieee80211_crypt ieee80211"
-OLD_MODULES="$OLD_MODULES bcm43xx rndis_wext iwl4965"
-MODULES="$OLD_MODULES"
-MODULES="$MODULES ipw2100 ipw2200 libipw"
-MODULES="$MODULES wl1251 wl12xx"
-MODULES="$MODULES libertas_cs usb8xxx libertas libertas_sdio libertas_spi"
-MODULES="$MODULES libertas_tf libertas_tf_usb"
-MODULES="$MODULES adm8211 zd1211rw"
-MODULES="$MODULES orinoco_cs orinoco_nortel orinoco_pci orinoco_plx"
-MODULES="$MODULES orinoco_tld orinoco_usb spectrum_cs orinoco"
-MODULES="$MODULES b43 b44 b43legacy brcm80211 ssb"
-MODULES="$MODULES iwl3945 iwlwifi iwlagn iwlcore"
-MODULES="$MODULES ath9k ath9k_htc ath9k_common ath9k_hw "
-MODULES="$MODULES ath5k ath ath6kl ar9170usb carl9170"
-MODULES="$MODULES p54pci p54usb p54spi p54common"
-MODULES="$MODULES rt2400pci rt2500pci rt61pci"
-MODULES="$MODULES rt2500usb rt73usb"
-MODULES="$MODULES rt2800usb rt2800pci rt2800lib"
-MODULES="$MODULES rt2x00usb rt2x00pci rt2x00lib"
-MODULES="$MODULES rtl8180 rtl8187 rtl8192ce rtlwifi"
-MODULES="$MODULES mwl8k mac80211_hwsim"
-MODULES="$MODULES at76c50x_usb at76_usb"
-MODULES="$MODULES rndis_wlan rndis_host cdc_ether usbnet"
-# eeprom_93cx6 is used by rt2x00 (rt61pci, rt2500pci, rt2400pci)
-# and Realtek drivers ( rtl8187, rtl8180)
-MODULES="$MODULES eeprom_93cx6"
-MODULES="$MODULES lib80211_crypt_ccmp lib80211_crypt_tkip lib80211_crypt_wep"
-MODULES="$MODULES mac80211 cfg80211 lib80211"
-MODULES="$MODULES compat"
-# Bluetooth modules
-MODULES="$MODULES ath3k bcm203x bluecard_cs bnep bpa10x bt3c_cs btmrvl btmrvl_sdio btsdio"
-MODULES="$MODULES btusb btuart_cs cmtp dtl1_cs hidp hci_vhci hci_uart rfcomm sco bluetooth l2cap"
-MODULES="$MODULES atl1 atl2 atl1e atl1c alx"
-echo Stoping bluetooth service..
-/etc/init.d/bluetooth stop
-/etc/init.d/bluetooth status
-MADWIFI_MODULES="ath_pci ath_rate_sample wlan_scan_sta wlan ath_hal"
-IPW3945D="/sbin/ipw3945d-`uname -r`"
-
-if [ -f $IPW3945D ]; then
- $IPW3945D --isrunning
- if [ ! $? ]; then
- echo -n "Detected ipw3945 daemon loaded we're going to "
- echo "shut the daemon down now and remove the module."
- modprobe -r --ignore-remove ipw3945
- fi
-fi
-
-grep ath_pci /proc/modules 2>&1 > /dev/null
-if [ $? -eq 0 ]; then
- echo "MadWifi driver is loaded, going to try to unload it..."
- ./scripts/madwifi-unload
-fi
-
-for i in $MODULES; do
- grep ^$i /proc/modules 2>&1 > /dev/null
- if [ $? -eq 0 ]; then
- echo Unloading $i...
- modprobe -r --ignore-remove $i
- fi
-done
diff --git a/scripts/update-initramfs b/scripts/update-initramfs
deleted file mode 100755
index 9e311a49..00000000
--- a/scripts/update-initramfs
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-# Copyright 2009 Luis R. Rodriguez <mcgrof@gmail.com>
-#
-# Since we provide ssb, ethernet modules and most importantly
-# DRM drivers, people may want to update the initramfs image
-# of their distribution. This can also help people who may
-# want to wireless-boot their systems.
-
-KLIB=/lib/modules/$(uname -r)/build
-ver=$(echo $KLIB | awk -F "/lib/modules/" '{print $2}' | awk -F"/" '{print $1}')
-dir=/boot/
-
-LSB_RED_ID=$(/usr/bin/lsb_release -i -s &> /dev/null)
-
-if [[ -z $LSB_RED_ID && -f "/etc/os-release" ]]; then
- # Let's try with os-release. Fedora doesn't have
- # lsb_release anymore.
- LSB_RED_ID=$(sed -n '/^NAME/ s/^NAME=\(.*\)$/\1/p' /etc/os-release)
-fi
-
-case $LSB_RED_ID in
-"Ubuntu")
- echo "Updating ${LSB_RED_ID}'s initramfs for $ver under $dir ..."
- mkinitramfs -o $dir/initrd.img-$ver $ver
- echo "Will now run update-grub to ensure grub will find the new initramfs ..."
- update-grub
- ;;
-"Debian")
- echo "Updating ${LSB_RED_ID}'s initramfs for $ver under $dir ..."
- mkinitramfs -o $dir/initrd.img-$ver $ver
- echo "Will now run update-grub to ensure grub will find the new initramfs ..."
- update-grub
- ;;
-"Fedora")
- # This adds a -compat-drivers suffixed initramfs with a new grub2
- # entry to not override distribution's default stuff.
- INITRAMFS=${dir}initramfs-$ver-compat-drivers.img
- KERNEL=${dir}vmlinuz-$ver
- GRUB_TITLE="Fedora ($ver) with compat-drivers"
-
- echo "Updating ${LSB_RED_ID}'s initramfs for $ver under $dir ..."
- mkinitrd --force $INITRAMFS $ver
-
- # If a previous compat-drivers entry for the same kernel exists
- # do not add it again.
- grep -q "${GRUB_TITLE}" /etc/grub2.cfg &> /dev/null
- if [[ "$?" == "1" ]]; then
- echo "Will now run grubby to add a new kernel entry ..."
- # Add a new kernel entry
- grubby --grub2 --copy-default --add-kernel="$KERNEL" --initrd="$INITRAMFS" --title="$GRUB_TITLE"
- fi
- ;;
-*)
- echo "Warning:"
- echo "You may or may not need to update your initramfs, you should if"
- echo "any of the modules installed are part of your initramfs. To add"
- echo "support for your distribution to do this automatically send a"
- echo "patch against $0. If your distribution does not require this"
- echo "send a patch against the '/usr/bin/lsb_release -i -s': $LSB_RED_ID"
- echo "tag for your distribution to avoid this warning."
- ;;
-esac
diff --git a/scripts/wlunload.sh b/scripts/wlunload.sh
deleted file mode 100755
index 88c20cf6..00000000
--- a/scripts/wlunload.sh
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/bash
-
-# The old stack drivers and the mac80211 rc80211_simple modules
-# which is no longer on recent kernels (its internal)
-OLD_MODULES="iwlwifi_mac80211 rc80211_simple zd1211rw-mac80211"
-OLD_MODULES="$OLD_MODULES ieee80211_crypt_tkip ieee80211_crypt_ccmp"
-OLD_MODULES="$OLD_MODULES ieee80211softmac ieee80211_crypt ieee80211"
-OLD_MODULES="$OLD_MODULES bcm43xx rndis_wext iwl4965"
-MODULES="$OLD_MODULES"
-MODULES="$MODULES ipw2100 ipw2200 libipw"
-MODULES="$MODULES wl1251 wl12xx"
-MODULES="$MODULES libertas_cs usb8xxx libertas libertas_sdio libertas_spi"
-MODULES="$MODULES libertas_tf libertas_tf_usb"
-MODULES="$MODULES adm8211 zd1211rw"
-MODULES="$MODULES orinoco_cs orinoco_nortel orinoco_pci orinoco_plx"
-MODULES="$MODULES orinoco_tld orinoco_usb spectrum_cs orinoco"
-MODULES="$MODULES b43 b44 b43legacy brcm80211 ssb"
-MODULES="$MODULES iwl3945 iwlwifi iwlagn iwlcore"
-MODULES="$MODULES ath9k ath9k_htc ath9k_common ath9k_hw "
-MODULES="$MODULES ath5k ath ath6kl ar9170usb carl9170"
-MODULES="$MODULES p54pci p54usb p54spi p54common"
-MODULES="$MODULES rt2400pci rt2500pci rt61pci"
-MODULES="$MODULES rt2500usb rt73usb"
-MODULES="$MODULES rt2800usb rt2800lib"
-MODULES="$MODULES rt2x00usb rt2x00lib"
-MODULES="$MODULES rtl8180 rtl8187 rtl8192ce rtlwifi"
-MODULES="$MODULES mwl8k mac80211_hwsim"
-MODULES="$MODULES at76c50x_usb at76_usb"
-MODULES="$MODULES rndis_wlan rndis_host cdc_ether usbnet"
-# eeprom_93cx6 is used by rt2x00 (rt61pci, rt2500pci, rt2400pci)
-# and Realtek drivers ( rtl8187, rtl8180)
-MODULES="$MODULES eeprom_93cx6"
-MODULES="$MODULES lib80211_crypt_ccmp lib80211_crypt_tkip lib80211_crypt_wep"
-MODULES="$MODULES mac80211 cfg80211 lib80211"
-MADWIFI_MODULES="ath_pci ath_rate_sample wlan_scan_sta wlan ath_hal"
-IPW3945D="/sbin/ipw3945d-`uname -r`"
-
-if [ -f $IPW3945D ]; then
- $IPW3945D --isrunning
- if [ ! $? ]; then
- echo -n "Detected ipw3945 daemon loaded we're going to "
- echo "shut the daemon down now and remove the module."
- modprobe -r --ignore-remove ipw3945
- fi
-fi
-
-grep ath_pci /proc/modules 2>&1 > /dev/null
-if [ $? -eq 0 ]; then
- echo "MadWifi driver is loaded, going to try to unload it..."
- ./scripts/madwifi-unload
-fi
-
-for i in $MODULES; do
- grep ^$i /proc/modules 2>&1 > /dev/null
- if [ $? -eq 0 ]; then
- echo Unloading $i...
- modprobe -r --ignore-remove $i
- fi
-done