Skip to content
Snippets Groups Projects
Commit 871f720d authored by Florian Pose's avatar Florian Pose
Browse files

First version of r8169 driver.

parent 5fd5a2d1
No related branches found
No related tags found
No related merge requests found
......@@ -240,6 +240,61 @@ fi
AC_SUBST(KERNEL_E1000,[$kernele1000])
#------------------------------------------------------------------------------
# r8169 driver
#------------------------------------------------------------------------------
AC_ARG_ENABLE([r8169],
AS_HELP_STRING([--enable-r8169],
[Enable r8169 driver]),
[
case "${enableval}" in
yes) enable_r8169=1
;;
no) enable_r8169=0
;;
*) AC_MSG_ERROR([Invalid value for --enable-r8169])
;;
esac
],
[enable_r8169=0] # disabled by default
)
AM_CONDITIONAL(ENABLE_R8169, test "x$enable_r8169" = "x1")
AC_SUBST(ENABLE_R8169,[$enable_r8169])
AC_ARG_WITH([r8169-kernel],
AC_HELP_STRING(
[--with-r8169-kernel=<X.Y.Z>],
[r8169 kernel (only if differing)]
),
[
kernel_r8169=[$withval]
],
[
kernel_r8169=$linuxversion
]
)
if test "x${enable_r8169}" = "x1"; then
AC_MSG_CHECKING([for kernel for r8169 driver])
kernels=`ls -1 ${srcdir}/devices/ | grep -oE "^r8169-.*-" | cut -d "-" -f 2 | uniq`
found=0
for k in $kernels; do
if test "$kernel_r8169" = "$k"; then
found=1
fi
done
if test $found -ne 1; then
AC_MSG_ERROR([kernel $kernel_r8169 not available for r8169 driver!])
fi
AC_MSG_RESULT([$kernel_r8169])
fi
AC_SUBST(KERNEL_R8169,[$kernel_r8169])
#------------------------------------------------------------------------------
# RTAI path (optional)
#------------------------------------------------------------------------------
......
......@@ -50,4 +50,11 @@ ifeq (@ENABLE_E1000@,1)
obj-m += e1000/
endif
ifeq (@ENABLE_R8169@,1)
EC_R8169_OBJ := r8169-@KERNEL_R8169@-ethercat.o
obj-m += ec_r8169.o
ec_r8169-objs := $(EC_R8169_OBJ)
CFLAGS_$(EC_R8169_OBJ) = -DSVNREV=$(REV)
endif
#------------------------------------------------------------------------------
......@@ -50,7 +50,9 @@ noinst_HEADERS = \
e100-2.6.24-orig.c \
e100-2.6.26-ethercat.c \
e100-2.6.26-orig.c \
ecdev.h
ecdev.h \
r8169-2.6.24-ethercat.c \
r8169-2.6.24-orig.c
EXTRA_DIST = \
Kbuild.in
......@@ -72,6 +74,9 @@ endif
if ENABLE_E1000
$(MAKE) -C e1000 modules_install
endif
if ENABLE_R8169
cp $(srcdir)/ec_r8169.ko $(DESTDIR)$(LINUX_MOD_PATH)
endif
clean-local:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" clean
......
This diff is collapsed.
This diff is collapsed.
......@@ -32,11 +32,11 @@ MASTER0_DEVICE=""
# and replace them with the EtherCAT-capable ones, respectively. If a certain
# (EtherCAT-capable) driver is not found, a warning will appear.
#
# Possible values: 8139too, e100, e1000.
# Possible values: 8139too, e100, e1000, r8169.
# Separate multiple drivers with spaces.
#
# Note: The e100 and e1000 drivers are not built by default. Enable them with
# the --enable-<driver> configure switches.
# Note: The e100, e1000 and r8169 drivers are not built by default. Enable them
# with the --enable-<driver> configure switches.
#
DEVICE_MODULES=""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment