aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2012-11-30 13:54:54 -0800
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2012-11-30 17:33:15 -0800
commit9efaa573ca7e745e81100494568ad113c6d232dc (patch)
tree50555e84629fb6d4912d05ad354711855892f784
parente277191b2ff470e2105bf308b85d97a5c61b2352 (diff)
downloadalx-9efaa573ca7e745e81100494568ad113c6d232dc.tar.gz
alx: update linux target
compat-drivers had removed alx from being cherry picked as a crap type patch. The alx driver is not yet upstream and a compromise has been reached to try to help enable users with the alx module and to help address killing proprietary drivers. This unified alx git tree will be used to supply the target OS support for Linux and FreeBSD, and compat-drivers will cherry pick the alx driver from here while it is not yet upstream as the project aims to provide a foundation for how to do open unified driver development. This also adds the -DCOMPAT_BASE which is now required on the latest compat-drivers. The changes in this commit address the latest changes to compat-drivers to support unified drivers. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rw-r--r--.compat_copy6
-rw-r--r--.gitignore29
-rw-r--r--Makefile31
-rw-r--r--target/linux/README.md4
4 files changed, 36 insertions, 34 deletions
diff --git a/.compat_copy b/.compat_copy
index 96ce13f..c3b124d 100644
--- a/.compat_copy
+++ b/.compat_copy
@@ -1,8 +1,4 @@
#!/bin/bash
-# This can be redefined, the default is:
COMPAT_SRC="$HOME/devel/compat-drivers/"
-
-EXTRA_COPY=""
-EXTRA_COPY="$EXTRA_COPY scripts/alx-enable"
-EXTRA_COPY="$EXTRA_COPY linux-next-pending/0002-backport-alx.patch"
+EXTRA_COPY="patches/unified-drivers/network/0001-backport-alx.patch"
diff --git a/.gitignore b/.gitignore
index 22245ef..ce09aed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,18 +1,23 @@
-/Module.symvers
-/System.map
-/include/linux/compat_autoconfig.h
+target/linux/Module.symvers
+target/linux/System.map
+target/linux/include/linux/compat_autoconfig.h
-compat/
-udev/
-include/
-scripts/
+target/linux/compat/
+target/linux/udev/
+target/linux/include/
+target/linux/scripts/
-compat_base_tree
-compat_base_tree_version
-compat_version
-config.mk
+target/linux/.compat_base
+target/linux/.compat_base_tree
+target/linux/.compat_base_tree_version
+target/linux/.compat_version
+target/linux/config.mk
+target/linux/.config.mk_md5sum.txt
-linux-next-pending/
+target/linux/.compat_autoconf*
+
+target/linux/src
+target/linux/patches/
!.gitignore
diff --git a/Makefile b/Makefile
index bb12f14..73ba311 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,7 @@ $(error "The path to this compat-drivers directory has spaces in it." \
endif
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-wireless\"" \
@@ -65,12 +66,20 @@ all: help
help:
@echo Possible build options:
@echo
- @echo make linux - Builds alx for any Linux kernel 2.6.28 - 3.4
+ @echo make linux-src - Transforms code for integration into linux-next
+ @echo make linux - Builds alx for any Linux kernel 2.6.28 - 3.x
$(COMPAT_CONFIG): ;
+# Convert unified driver code to Linux, always targeting linux-next
+linux-src:
+ @cp -a src target/linux/
+
+# Uses compat-drivers to provide backport functionality
+# to support the linux-next driver down to all supported
+# compat-drivers kernels.
linux: $(CREL_CHECK)
- @patch -p6 -d src/ < linux-next-pending/0002-backport-alx.patch
+ @patch -p6 -d target/linux/src/ < unified-drivers/network/0001-backport-alx.patch
$(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules
@touch $@
@@ -101,17 +110,6 @@ install-scripts:
@# All the scripts we can use
@mkdir -p $(DESTDIR)/usr/lib/compat-drivers/
@install scripts/modlib.sh $(DESTDIR)/usr/lib/compat-drivers/
- @# This is to allow switching between drivers without blacklisting
- @install scripts/alx-enable $(DESTDIR)/usr/sbin/
- @if [ $(shell modinfo atl1c > /dev/null 2>&1 && echo 1) ]; then \
- echo ;\
- echo -n "Note: atl1c detected, we're going to disable it. " ;\
- echo "If you would like to enable it later you can run:" ;\
- echo " sudo alx-load atl1c" ;\
- echo ;\
- echo Running alx-enable alx...;\
- $(DESTDIR)/usr/sbin/alx-enable alx;\
- 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
@@ -137,7 +135,7 @@ install-scripts:
uninstall:
@# New location, matches upstream
@rm -rf $(KLIB)/$(KMODDIR)/compat/
- @rm -rf $(KLIB)/$(KMODDIR)/drivers/net/alx.ko*
+ @rm -rf $(KLIB)/$(KMODDIR)/drivers/net/ethernet/atheros/alx/alx.ko*
@# Lets only remove the stuff we are sure we are providing
@# on the misc directory.
@/sbin/depmod -a
@@ -146,12 +144,11 @@ uninstall:
clean:
$(MAKE) -C $(KLIB_BUILD) M=$(PWD) clean
@rm -f $(CREL_PRE)*
+ @rm -rf target/linux/src/
unload:
@./scripts/unload.sh
-
-
-.PHONY: all clean install uninstall unload modules Makefile linux
+.PHONY: all clean install uninstall unload modules Makefile linux linux-src
endif
diff --git a/target/linux/README.md b/target/linux/README.md
new file mode 100644
index 0000000..0de5aab
--- /dev/null
+++ b/target/linux/README.md
@@ -0,0 +1,4 @@
+# alx Ethernet driver code targeted for linux-next
+
+This directory provides the transformed code for
+integration into linux-next.