]> rtime.felk.cvut.cz Git - lincan.git/commitdiff
LinCAN version and documentation updated to 0.3.5 and build portability fixes.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Sun, 9 Oct 2011 22:10:58 +0000 (00:10 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Sun, 9 Oct 2011 22:10:58 +0000 (00:10 +0200)
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
lincan/README
lincan/include/constants.h
lincan/src/Makefile.std
lincan/utils/can-proxy.c

index b6944ae25a5f60dbb5271e1157dc40db8755c2a9..6d171ab49bb9787511225e3e4ccfb76f6716a284 100644 (file)
@@ -1,19 +1,18 @@
 
 
-               Linux CAN Driver (LinCAN) version 0.3.4
+               Linux CAN Driver (LinCAN) version 0.3.5
+               part of OrtCAN project <http://ortcan.sourceforge.net/>
                Pavel Pisa <pisa@cmp.felk.cvut.cz>
                Pavel Pisa <pisa@cmp.felk.cvut.cz>
-                       OCERA team member <http://www.ocera.org>
-                       Real-time Systems Laboratory <http://rtlab.felk.cvut.cz/>
-                       Department of Control Engineering, FEE CTU
-
+               Department of Control Engineering (DCE) FEE CTU <http://dce.fel.cvut.cz/en/>
+               DCE Real-Time Systems group CAN resources  <http://rtime.felk.cvut.cz/can/>
 
 INTRODUCTION
 ============
 The LinCAN is an implementation of the Linux CAN-bus device driver supporting
 more CAN controller chips and many CAN interface boards. Its development
 
 INTRODUCTION
 ============
 The LinCAN is an implementation of the Linux CAN-bus device driver supporting
 more CAN controller chips and many CAN interface boards. Its development
-has long history already. The OCERA version of the driver has new better
+has long history already. The OCERA/OrtCAN version of the driver has new better
 designed internal structure, adds new features (as support for open by multiple
 applications, select system call) and other enhancements.
 designed internal structure, adds new features (as support for open by multiple
 applications, select system call) and other enhancements.
-  
+
 The driver consist of four main layers:
   - chip level manipulation routines
   - board specific support
 The driver consist of four main layers:
   - chip level manipulation routines
   - board specific support
@@ -28,8 +27,11 @@ The driver originates in The Linux Lab Project
   http://www.llp.fu-berlin.de/
 then it has been first rewritten by Arnaud Westenberg
   http://home.wanadoo.nl/arnaud/
   http://www.llp.fu-berlin.de/
 then it has been first rewritten by Arnaud Westenberg
   http://home.wanadoo.nl/arnaud/
-now it is developed and maintained as part of OCERA framework
+The driver code undergone major redesign in a frame of the OCERA IST project
   http://www.ocera.org/
   http://www.ocera.org/
+Actual driver version is maintained togther with other CAN/CANopen
+components as part of the OrtCAN project
+  http://ortcan.sourceforge.net/
 
 I am unable to contact previous maintainer Arnaud Westenberg
 (arnaud@wanadoo.nl). If you know something about him, I like
 
 I am unable to contact previous maintainer Arnaud Westenberg
 (arnaud@wanadoo.nl). If you know something about him, I like
@@ -85,14 +87,11 @@ lincan-0.3.3        Some more fixes of SJA1000 buss-of recovery,
 lincan-0.3.4   Some more fixes of SJA1000 buss-of recovery,
 (March 2009)   Many enhancements and fixes. Tested up to 2.6.28 Linux kernel.
 
 lincan-0.3.4   Some more fixes of SJA1000 buss-of recovery,
 (March 2009)   Many enhancements and fixes. Tested up to 2.6.28 Linux kernel.
 
+lincan-0.3.5   Make system updates to build under latest Linux kernels,
+(October 2011) LinCAN core builds and tested with 2.6.35 and 3.0 Linux kernels.
+
 The actual version of driver have been latest tested it with
 The actual version of driver have been latest tested it with
-  - PC104 Advantech PCM3680 dual channel board on 2.4 RT-Linux enabled kernel
-  - PiKRON ISA card on 2.4.and 2.6 Linux kernels
-  - PiKRON CAN extension board for PiMCX1 ARM BCC on 2.6 Linux kernels
-  - BfaD DIMM PC card on 2.4 RT-Linux enabled kernel
-  - KVASER pcican-q on 2.6 Linux kernel
-  - MICROSPACE msmcan on 2.4 Linux and RT-Linux enabled kernel
-  - Unicontrols PCAN ("unican"),PCAN-PCI ("unican-pci"), VCAN  ("unican-vme")
+  - KVASER pcican-q on 2.6 and 3.0 Linux kernel
   - EMS CPC-PCI cards ("ems_cpcpci")
   - virtual board tested on all systems as wel
 It takes more time to test driver with more cards.
   - EMS CPC-PCI cards ("ems_cpcpci")
   - virtual board tested on all systems as wel
 It takes more time to test driver with more cards.
@@ -103,35 +102,24 @@ variants is prepared in the sources.
 SOURCES AND URLs
 ================
 
 SOURCES AND URLs
 ================
 
-The LinCAN driver component page at OCERA web site
-(not updated to the new version yet)
+The actual driver version, development sources and mailing list
+can be found on OrtCAN project pages
 
 
-  http://www.ocera.org/download/components/WP7/lincan-0.3.1.html
-  
-List of related communication components
-  
-  http://www.ocera.org/download/components/WP7/index.html
+  http://ortcan.sourceforge.net/
 
 
-The obtaining LinCAN and other CAN related components
-from OCERA CVS repository at SourceForge
+Please send comments, bug-fixes and enhancements directly to
+Pavel Pisa <pisa@cmp.felk.cvut.cz> or to OrtCAN discussion
+forums <http://sourceforge.net/projects/ortcan/forums> 
+and or mailinglist found on OrtCAN project page.
 
 
-  EXTCVS=":pserver:anonymous@cvs.ocera.sourceforge.net:/cvsroot/ocera"
-  cvs -d$EXTCVS login
-  cvs -z3 -d$EXTCVS co ocera/components/comm/can
-  
-Web access into CVS
+The original LinCAN driver component page at OCERA web site
+(not updated to the new version yet)
 
 
-  http://ocera.cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ocera/ocera/components/comm/can/lincan/
+  http://www.ocera.org/download/components/WP7/lincan-0.3.1.html
 
 
-Experimental directory at maintainer's (Pavel Pisa's) pages 
+List of related communication components
 
 
-  http://cmp.felk.cvut.cz/~pisa/can/
-  http://cmp.felk.cvut.cz/~pisa/can/lincan-YYMMDD.tar.gz
-  
-Please send comments, bug-fixes and enhancements directly to
-Pavel Pisa <pisa@cmp.felk.cvut.cz> or to OCERA discussion
-forum <https://sourceforge.net/forum/forum.php?forum_id=170893> 
-and lists <ocera-development@lists.sourceforge.net>
+  http://www.ocera.org/download/components/WP7/index.html
 
 Driver documentation can be found at
 
 
 Driver documentation can be found at
 
@@ -146,59 +134,65 @@ COMPILATION of LinCAN releases
 ==============================
 
 Just type 'make' at the command line and driver module should compile
 ==============================
 
 Just type 'make' at the command line and driver module should compile
-without errors for current running kernel. 
+without errors for current running kernel.
 
 
-More information can be found in driver documentation at
+More detailed information can be found in driver documentation at
+  http://ortcan.sourceforge.net/lincan/
+Local maintainer site holds some usesfull information as well
   http://cmp.felk.cvut.cz/~pisa/can/
   http://cmp.felk.cvut.cz/~pisa/can/lincandoc-X.Y.pdf
   http://cmp.felk.cvut.cz/~pisa/can/
   http://cmp.felk.cvut.cz/~pisa/can/lincandoc-X.Y.pdf
-  
-Some releases use experimental OMK make system, which requires
+
+The LinCAN releases use OMK make system, which requires
 recent GNU make program version 3.81beta1 and above.
 Makefiles can be switched to old ones by script
 
   sh ./switch-omk2std
   make
 
 recent GNU make program version 3.81beta1 and above.
 Makefiles can be switched to old ones by script
 
   sh ./switch-omk2std
   make
 
-If you have problem to obtain recent GNU make program,
 
 
- ftp://alpha.gnu.org/gnu/make/make-3.81beta4.tar.bz2
+COMPILATION from OrtCAN project GIT repository tree
+===================================================
 
 
-you can use our local copy
+There are more options to build LinCAN driver.
+The first one is to use stand-alone driver module build.
+The other option is to build LinCAN driver as part of the
+whole OrtCAN tree.
 
 
-  http://cmp.felk.cvut.cz/~pisa/can/make-3.81beta1.tar.gz
+The latest version of stand-alone LinCAN sources can be
+obtained from GIT repository and build by next commands
 
 
+  git clone git://ortcan.git.sourceforge.net/gitroot/ortcan/lincan
+  cd lincan
+  ./build-lincan.sh
 
 
-COMPILATION from CVS sources without full OCERA tree
-====================================================
-  
----------------------------------------------------------------------------
-Obtaining CVS sources of the CAN components only
----------------------------------------------------------------------------
-  cvs -d:pserver:anonymous@ocera.cvs.sourceforge.net:/cvsroot/ocera login
-  cvs -z3 -d:pserver:anonymous@ocera.cvs.sourceforge.net:/cvsroot/ocera co
-         ocera/components/comm/can
+The other option is to build LinCAN driver as part of the whole
+OrtCAN tree
 
 
----------------------------------------------------------------------------
-Commands to build OCERA CVS CAN components outside OCERA tree
----------------------------------------------------------------------------
-  cd ocera/components/comm/can
-  ./switch2standalone
+  git clone git://ortcan.git.sourceforge.net/gitroot/ortcan/ortcan
+  cd ortcan/
+  git submodule update --init
+  make default-config
   make
 
   make
 
-The selection of required features and options can be specified before make 
-command invocation. Lines containing required changes to config.omk-default 
-file should be stored in config.omk file. The config.omk is not altered by 
-OMK system and options defined there override values defined in 
-config.omk-default file. GNU make program version 3.81beta1 or newer is 
-required by OMK make-system. If this is problem, LinCAN driver can be 
-compiled with use of old style Makefiles as well.
-
----------------------------------------------------------------------------
-Old style Makefiles compilation of the LinCAN driver only
----------------------------------------------------------------------------
-  cd ocera/components/comm/can/lincan
-  ./switch-omk2std
-  make
+COMPILATION options
+===================
+
+The options are defined in "config.omk" file for OMK based builds.
+File is looked for at directory where are build top directory,
+files "Makefile.rules" and "config.omk-default"
+located. To select card which is not enabled by default
+add line of next format to the "config.omk" file
+
+  CONFIG_OC_LINCAN_CARD_tscan1=y
+
+The cross-compilation and build against non-default kernel
+can be selected in "config.omk" file as well
+
+  LINUX_DIR=/usr/src/linux-2.6-mpc5200-build
+  CC=powerpc-linux-gnu-gcc
+  CXX=powerpc-linux-gnu-g++
+  AR=powerpc-linux-gnu-ar
+  LD=powerpc-linux-gnu-ld
 
 
 INSTALLATION
 
 
 INSTALLATION
index 82383c265967650914e1e6a204a7aab35cfbd07c..351b1030e2080da7af1581b783aec1293f961702 100644 (file)
@@ -44,7 +44,7 @@
 /* Version of the driver */
 #define CAN_DRV_VER_MAJOR 0
 #define CAN_DRV_VER_MINOR 3
 /* Version of the driver */
 #define CAN_DRV_VER_MAJOR 0
 #define CAN_DRV_VER_MINOR 3
-#define CAN_DRV_VER_PATCH 4
+#define CAN_DRV_VER_PATCH 5
 #define CAN_DRV_VER ((CAN_DRV_VER_MAJOR<<16) | (CAN_DRV_VER_MINOR<<8) | CAN_DRV_VER_PATCH)
 
 /* Default driver major number, see /usr/src/linux/Documentation/devices.txt */
 #define CAN_DRV_VER ((CAN_DRV_VER_MAJOR<<16) | (CAN_DRV_VER_MINOR<<8) | CAN_DRV_VER_PATCH)
 
 /* Default driver major number, see /usr/src/linux/Documentation/devices.txt */
index 037766c4550a30e5ec1452c7351742cf9fe70083..49c49563bc54247625678d29940f76671e00d136 100644 (file)
@@ -103,6 +103,10 @@ ifeq ($(KERNEL_VERSION),)
 KERNEL_VERSION=$(shell grep UTS_RELEASE ${KERNEL_LOCATION}/include/linux/utsrelease.h | \
                  sed 's/[^"]*"\(.*\)\{1\}"/\1/')
 endif
 KERNEL_VERSION=$(shell grep UTS_RELEASE ${KERNEL_LOCATION}/include/linux/utsrelease.h | \
                  sed 's/[^"]*"\(.*\)\{1\}"/\1/')
 endif
+ifeq ($(KERNEL_VERSION),)
+KERNEL_VERSION=$(shell grep UTS_RELEASE ${KERNEL_LOCATION}/include/generated/utsrelease.h | \
+                 sed 's/[^"]*"\(.*\)\{1\}"/\1/')
+endif
 
 #$(warning KERNEL_VERSION = $(KERNEL_VERSION))
 
 
 #$(warning KERNEL_VERSION = $(KERNEL_VERSION))
 
@@ -143,7 +147,7 @@ endif
 # Target object file if any
 # this must be undefined for 2.5.xx kernels
 ifndef KERNEL_MODULE_V26
 # Target object file if any
 # this must be undefined for 2.5.xx kernels
 ifndef KERNEL_MODULE_V26
-O_TARGET     = can.o
+O_TARGET     = lincan.o
 endif
 # Regular object files
 O_OBJS      += $(SUPPORTED_CARDS:%=%.o)
 endif
 # Regular object files
 O_OBJS      += $(SUPPORTED_CARDS:%=%.o)
@@ -166,9 +170,11 @@ LX_OBJS      =
 EXTRA_CFLAGS +=
 
 # Linux 2.4.2 and newer build system needs next
 EXTRA_CFLAGS +=
 
 # Linux 2.4.2 and newer build system needs next
-can-objs = $(O_OBJS)
+lincan-objs = $(O_OBJS)
+ifndef KERNEL_MODULE_V26
 obj-y = $(O_OBJS)
 obj-y = $(O_OBJS)
-obj-m = can.o
+endif
+obj-m = lincan.o
 
 ifndef KERNEL_MODULE_V26
 FINAL_MODULE_OBJS=$(obj-m)
 
 ifndef KERNEL_MODULE_V26
 FINAL_MODULE_OBJS=$(obj-m)
@@ -194,8 +200,8 @@ make_this_module: lincan_config.h
        echo Linux kernel version $(KERNEL_VERSION)
        echo Linux kernel sources $(KERNEL_LOCATION)
        echo Module target $(obj-m)
        echo Linux kernel version $(KERNEL_VERSION)
        echo Linux kernel sources $(KERNEL_LOCATION)
        echo Module target $(obj-m)
-       echo Module objects $(can-objs)
-       DIR=`pwd`; (cd $(KERNEL_LOCATION); make SUBDIRS=$$DIR modules)
+       echo Module objects $(lincan-objs)
+       DIR=`pwd`; (cd $(KERNEL_LOCATION); make M=$$DIR SUBDIRS=$$DIR modules)
 
 make_this_module_dep:
        DIR=`pwd`; (cd $(KERNEL_LOCATION); make SUBDIRS=$$DIR dep)
 
 make_this_module_dep:
        DIR=`pwd`; (cd $(KERNEL_LOCATION); make SUBDIRS=$$DIR dep)
index d9dbcddf75744db94416d8fdc8caea8009486102..d2c6e82f8d921e8f69491cfa558d717daaa0070b 100644 (file)
@@ -169,7 +169,7 @@ void show_usage(void) {
        "-i     : intercative (send CAN packets typed by user)\n"
        "-o file.log : log all traffic to a file\n"
        "-p port : send CAN packets arriving at UDP port\n"
        "-i     : intercative (send CAN packets typed by user)\n"
        "-o file.log : log all traffic to a file\n"
        "-p port : send CAN packets arriving at UDP port\n"
-       "-c     : use select() for CAN (driver can-0.7.1-pi3.4 or newer)\n"
+       "-c     : use select()\n"
        "-q     : quiet\n"
        "-h     : this help\n"
        "UDP arriving at specified port causes can-proxy to forward all CAN\n"
        "-q     : quiet\n"
        "-h     : this help\n"
        "UDP arriving at specified port causes can-proxy to forward all CAN\n"