Improved handling and installation of the modules' symbol versions.

This commit is contained in:
Florian Pose 2010-02-16 15:08:54 +01:00
parent 94485eeec1
commit 69da1f1cb2
11 changed files with 45 additions and 46 deletions

View File

@ -84,9 +84,11 @@ if ENABLE_TTY
$(MAKE) -C tty modules_install
endif
dist_pkgdata_DATA = $(LINUX_SYMVERS)
clean-local:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" clean
@rm -f Modules.symvers
@rm -f $(LINUX_SYMVERS)
mydist:
hg log --style=changelog $(srcdir) > ChangeLog
@ -100,25 +102,25 @@ dist-hook:
mrproper: clean cleandoc
rm -rf \
$(LINUX_SYMVERS) \
*~ \
ChangeLog \
Doxyfile \
Kbuild \
Makefile \
Makefile.in \
TAGS \
aclocal.m4 \
autoconf \
autom4te.cache \
ChangeLog \
config.h \
config.h.in \
config.log \
config.status \
configure \
configure.in \
Doxyfile \
Kbuild \
libtool \
Makefile \
Makefile.in \
Module.symvers \
stamp-h1 \
TAGS
stamp-h1
doc:
doxygen Doxyfile

3
NEWS
View File

@ -59,8 +59,7 @@ Changes since 1.4.0:
* Changed EC_MAX_SII_SIZE to 4096.
* 'ethercat xml' creates valid XML <EtherCATInfoList> for more than one slave
(thanks to E. Burgstaller).
* Module symbol versions file for ec_master.ko is installed to
prefix/modules/ec_master.symvers.
* Module symbol versions file is installed to $prefix/share/ethercat.
* Added 'ethercat eoe' command to display Ethernet over EtherCAT statistics.
* Added 'ethercat cstruct' command to output PDO information in C language.
* Significantly improved EoE bandwidth by running EoE processing in a kthread.

View File

@ -101,6 +101,27 @@ AC_SUBST(LINUX_KERNEL_VERSION,[$linuxversion])
AC_SUBST(LINUX_MOD_PATH,[/lib/modules/$kernelrelease/ethercat])
AC_MSG_RESULT([$LINUX_SOURCE_DIR (Kernel $LINUX_KERNEL_RELEASE)])
#------------------------------------------------------------------------------
# Determine the name of the symbol version file
#------------------------------------------------------------------------------
AC_MSG_CHECKING([for Linux symbol version file])
symvers=
for file in Module.symvers Modules.symvers; do
if test -f "$LINUX_SOURCE_DIR/$file"; then
symvers=$file
break
fi
done
AC_SUBST(LINUX_SYMVERS,[$symvers])
if test -n "$symvers"; then
AC_MSG_RESULT([$LINUX_SYMVERS])
else
AC_MSG_RESULT(["(none)"])
fi
#------------------------------------------------------------------------------
# Generic Ethernet driver
#------------------------------------------------------------------------------

View File

@ -70,7 +70,7 @@ ifeq (@ENABLE_R8169@,1)
endif
KBUILD_EXTRA_SYMBOLS := \
@abs_top_builddir@/Module.symvers \
@abs_top_builddir@/master/Module.symvers
@abs_top_builddir@/$(LINUX_SYMVERS) \
@abs_top_builddir@/master/$(LINUX_SYMVERS)
#------------------------------------------------------------------------------

View File

@ -51,7 +51,7 @@ ifeq (@ENABLE_E1000@,1)
endif
KBUILD_EXTRA_SYMBOLS := \
@abs_top_builddir@/Module.symvers \
@abs_top_builddir@/master/Module.symvers
@abs_top_builddir@/$(LINUX_SYMVERS) \
@abs_top_builddir@/master/$(LINUX_SYMVERS)
#------------------------------------------------------------------------------

View File

@ -38,7 +38,7 @@ ec_dc_rtai_sample-objs := dc_rtai_sample.o
EXTRA_CFLAGS := -I@RTAI_DIR@/include
KBUILD_EXTRA_SYMBOLS := \
@abs_top_builddir@/Module.symvers \
@abs_top_builddir@/master/Module.symvers
@abs_top_builddir@/$(LINUX_SYMVERS) \
@abs_top_builddir@/master/$(LINUX_SYMVERS)
#------------------------------------------------------------------------------

View File

@ -36,7 +36,7 @@ obj-m := ec_mini.o
ec_mini-objs := mini.o
KBUILD_EXTRA_SYMBOLS := \
@abs_top_builddir@/Module.symvers \
@abs_top_builddir@/master/Module.symvers
@abs_top_builddir@/$(LINUX_SYMVERS) \
@abs_top_builddir@/master/$(LINUX_SYMVERS)
#------------------------------------------------------------------------------

View File

@ -38,7 +38,7 @@ ec_rtai_sample-objs := rtai_sample.o
EXTRA_CFLAGS := -I@RTAI_DIR@/include
KBUILD_EXTRA_SYMBOLS := \
@abs_top_builddir@/Module.symvers \
@abs_top_builddir@/master/Module.symvers
@abs_top_builddir@/$(LINUX_SYMVERS) \
@abs_top_builddir@/master/$(LINUX_SYMVERS)
#------------------------------------------------------------------------------

View File

@ -40,7 +40,7 @@ ec_tty_example-objs := \
CFLAGS_tty.o := -I$(src)
KBUILD_EXTRA_SYMBOLS := \
@abs_top_builddir@/Module.symvers \
@abs_top_builddir@/master/Module.symvers
@abs_top_builddir@/$(LINUX_SYMVERS) \
@abs_top_builddir@/master/$(LINUX_SYMVERS)
#------------------------------------------------------------------------------

View File

@ -82,18 +82,4 @@ modules_install:
clean-local:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" clean
modulesdir=@prefix@/modules
SYMVERS=$(top_builddir)/Module.symvers
SYMVERSS=$(top_builddir)/Modules.symvers
install-data-local:
for symvers in $(SYMVERS) $(SYMVERSS); do \
if test -f $$symvers; then \
mkdir -p $(DESTDIR)$(modulesdir) && \
cp -vf $$symvers \
$(DESTDIR)$(modulesdir)/ec_master.symvers; \
break; \
fi; \
done
#------------------------------------------------------------------------------

View File

@ -48,13 +48,4 @@ modules_install:
clean-local:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" clean
modulesdir=@prefix@/modules
SYMVERS=`echo $(top_builddir)/Module*.symvers`
install-data-local:
@test -n "$(SYMVERS)" && \
mkdir -p $(DESTDIR)$(modulesdir) && \
cp -vf $(SYMVERS) \
$(DESTDIR)$(modulesdir)/ec_tty.symvers
#------------------------------------------------------------------------------