[RTnet-developers] [PATCH 2/6] Add e1000e driver to the build
Brought to you by:
bet-frogger,
kiszka
From: Arnout V. (Essensium/Mind) <ar...@mi...> - 2011-10-06 20:35:53
|
From: "Arnout Vandecappelle (Essensium/Mind)" <ar...@mi...> Signed-off-by: Stefan Kral <st...@re...> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <ar...@mi...> --- configure.ac | 12 ++++++ drivers/experimental/GNUmakefile.am | 4 ++ drivers/experimental/Kconfig | 3 + drivers/experimental/e1000e/GNUmakefile.am | 55 +++++++++++++++++++++++++++ drivers/experimental/e1000e/Makefile | 37 ------------------ drivers/experimental/e1000e/Makefile.kbuild | 9 ++++ 6 files changed, 83 insertions(+), 37 deletions(-) create mode 100644 drivers/experimental/e1000e/GNUmakefile.am delete mode 100644 drivers/experimental/e1000e/Makefile create mode 100644 drivers/experimental/e1000e/Makefile.kbuild diff --git a/configure.ac b/configure.ac index 86a72fd..16678bc 100644 --- a/configure.ac +++ b/configure.ac @@ -1019,6 +1019,16 @@ AC_ARG_ENABLE(e1000-new, AC_MSG_RESULT([${CONFIG_RTNET_DRV_E1000_NEW:-n}]) AM_CONDITIONAL(CONFIG_RTNET_DRV_E1000_NEW,[test "$CONFIG_RTNET_DRV_E1000_NEW" = "y"]) +AC_MSG_CHECKING([whether to build new Intel PRO/1000 PCEe (Gigabit) driver (experimental)]) +AC_ARG_ENABLE(e1000-e, + AS_HELP_STRING([--enable-e1000-e], [build new Intel PCEe PRO/1000 driver]), + [case "$enableval" in + y | yes) CONFIG_RTNET_DRV_E1000_E=y ;; + *) CONFIG_RTNET_DRV_E1000_E=n ;; + esac]) +AC_MSG_RESULT([${CONFIG_RTNET_DRV_E1000_E:-n}]) +AM_CONDITIONAL(CONFIG_RTNET_DRV_E1000_E,[test "$CONFIG_RTNET_DRV_E1000_E" = "y"]) + AC_MSG_CHECKING([whether to build AT91 Ethernet [AT91RM9200] driver]) AC_ARG_ENABLE(at91ether, AS_HELP_STRING([--enable-at91ether], [build AT91 Ethernet driver]), @@ -1440,6 +1450,7 @@ if test x$CONFIG_KBUILD = xy; then drivers/experimental \ drivers/experimental/rt2500 \ drivers/experimental/e1000 \ + drivers/experimental/e1000e \ \ stack \ stack/packet \ @@ -1523,6 +1534,7 @@ AC_CONFIG_FILES([ \ drivers/experimental/GNUmakefile \ drivers/experimental/rt2500/GNUmakefile \ drivers/experimental/e1000/GNUmakefile \ + drivers/experimental/e1000e/GNUmakefile \ \ stack/GNUmakefile \ stack/include/GNUmakefile \ diff --git a/drivers/experimental/GNUmakefile.am b/drivers/experimental/GNUmakefile.am index 8b90fc9..7cf0a57 100644 --- a/drivers/experimental/GNUmakefile.am +++ b/drivers/experimental/GNUmakefile.am @@ -41,6 +41,10 @@ if CONFIG_RTNET_DRV_E1000_NEW OPTDIRS += e1000 endif +if CONFIG_RTNET_DRV_E1000_E +OPTDIRS += e1000e +endif + rt_3c59x.o: libkernel_3c59x.a $(LD) --whole-archive $< -r -o $@ diff --git a/drivers/experimental/Kconfig b/drivers/experimental/Kconfig index f8dab6e..9b309ff 100644 --- a/drivers/experimental/Kconfig +++ b/drivers/experimental/Kconfig @@ -11,6 +11,9 @@ config RTNET_DRV_R8169 config RTNET_DRV_E1000_NEW bool "New Intel(R) PRO/1000 (Gigabit)" + +config RTNET_DRV_E1000_E + bool "New Intel(R) PRO/1000 PCIe (Gigabit)" source "drivers/experimental/rt2500/Kconfig" diff --git a/drivers/experimental/e1000e/GNUmakefile.am b/drivers/experimental/e1000e/GNUmakefile.am new file mode 100644 index 0000000..0daf050 --- /dev/null +++ b/drivers/experimental/e1000e/GNUmakefile.am @@ -0,0 +1,55 @@ +moduledir = $(DESTDIR)$(RTNET_MODULE_DIR) +modext = $(RTNET_MODULE_EXT) + +EXTRA_LIBRARIES = libkernel_e1000.a + +libkernel_e1000_a_CPPFLAGS = \ + $(RTEXT_KMOD_CFLAGS) \ + -I$(top_srcdir)/stack/include \ + -I$(top_builddir)/stack/include + +libkernel_e1000_a_SOURCES = \ + 82571.c \ + defines.h \ + e1000.h \ + es2lan.c \ + hw.h \ + ich8lan.c \ + lib.c \ + netdev.c \ + param.c \ + phy.c + +OBJS = rt_e1000e$(modext) + +rt_e1000e.o: libkernel_e1000.a + $(LD) --whole-archive $< -r -o $@ + +all-local: all-local$(modext) + +# 2.4 build +all-local.o: $(OBJS) + +# 2.6 build +all-local.ko: @RTNET_KBUILD_ENV@ +all-local.ko: $(libkernel_e1000_a_SOURCES) FORCE + $(RTNET_KBUILD_CMD) + +install-exec-local: $(OBJS) + $(mkinstalldirs) $(moduledir) + $(INSTALL_DATA) $^ $(moduledir) + +uninstall-local: + for MOD in $(OBJS); do $(RM) $(moduledir)/$$MOD; done + +clean-local: $(libkernel_e1000_a_SOURCES) + $(RTNET_KBUILD_CLEAN) + +distclean-local: + $(RTNET_KBUILD_DISTCLEAN) + +EXTRA_DIST = Makefile.kbuild + +DISTCLEANFILES = Makefile + +.PHONY: FORCE diff --git a/drivers/experimental/e1000e/Makefile b/drivers/experimental/e1000e/Makefile deleted file mode 100644 index 360c913..0000000 --- a/drivers/experimental/e1000e/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -################################################################################ -# -# Intel PRO/1000 Linux driver -# Copyright(c) 1999 - 2008 Intel Corporation. -# -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. -# -# This program is distributed in the hope 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. -# -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Linux NICS <lin...@in...> -# e1000-devel Mailing List <e10...@li...> -# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 -# -################################################################################ - -# -# Makefile for the Intel(R) PRO/1000 ethernet driver -# - -obj-$(CONFIG_E1000E) += e1000e.o - -e1000e-objs := 82571.o ich8lan.o es2lan.o \ - lib.o phy.o param.o ethtool.o netdev.o - diff --git a/drivers/experimental/e1000e/Makefile.kbuild b/drivers/experimental/e1000e/Makefile.kbuild new file mode 100644 index 0000000..b606069 --- /dev/null +++ b/drivers/experimental/e1000e/Makefile.kbuild @@ -0,0 +1,9 @@ +EXTRA_CFLAGS += \ + $(rtext_kmod_cflags) \ + -I$(top_srcdir)/stack/include \ + -I$(top_builddir)/stack/include \ + -I$(srcdir) + +obj-m += $(build_targets) + +rt_e1000e-objs := $(build_objs) -- 1.7.6.3 |