Etherlab
EtherLAB developed an EtherCAT master software that runs as a Linux kernel module. As a result, it is far faster than user-space implementation. However, building the Ethercat Master implementation with a Linux kernel requires to build it using the appropriate kernel version. As we build it with PREEMPT-RT, we shall have the appropriate version for the kernel, the PREEMPT-RT patch and Etherlab. It seems that the 2.6.33 release of the kernel meet these requirements.
Building a new kernel
You need the following files:
- The Linux kernel: http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.33.tar.bz2
- The PREEMPT-RT patch : http://www.kernel.org/pub/linux/kernel/projects/rt/2.6.33/older/patch-2.6.33-rt8.bz2
- The EtherLAB implementation, take the current HEAD revision : http://www.etherlab.org/en/ethercat/index.php
Then, follow these instructions to build the kernel:
- Untar the kernel sources.
tar jxvf linux-2.6.33.tar.bz2
- Unzip the PREEMPT-RT patch
bunzip2 patch-2.6.33-rt8.bz2
- Patch the kernel sources
cd linux-2.6.33 && patch -p1 < patch-2.6.33-rt8
- Copy the configuration file into the linux kernel directory :
cp -f config-2.6.33-preemptrt linux-2.6.33/.config
A configuration file has been put in the TASTE subversion repository, you can find it here : https://tecsw.estec.esa.int/svn/taste/trunk/linux-distro/config/config-2.6.33-preemptrt . Be careful, if you configure everything by yourself, you have to make sure to disable ACPI settings and enable the RT nature of the kernel. See links below, the PREEMPT-RT HOWTO
- Build the kernel sources and headers :
cd linux-2.6.33 && make-kpkg --rootcmd fakeroot --initrd --config menuconfig kernel_image kernel_source kernel_headers
- Install the kernel:
dpkg -i linux-image* linux-headers*
- Reboot
Installing the EtherLAB/EtherCAT implementation
- Untar the EtherLAB archive.
tar jxvf etherlabmaster....
- Enter the directory
cd etherlabmaster....
- Bootstrap the sources
./bootstrap
- Configure the build
./configure --enable-r8169 --enable-8139too --enable-e100 --enable-e1000 --enable-e1000e --enable-generic
- Build everything:
make all install modules modules_install install
- EtherLAB is installed in /opt. Read the INSTALL file for configuration aspects.
Links
- EtherLAB: http://www.etherlab.org/en/ethercat/index.php
- PREEMPT-RT HOWTO: https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO
沒有留言:
張貼留言
注意:只有此網誌的成員可以留言。