2014年7月17日 星期四

Build EtherLAB master kernel

http://taste.tuxfamily.org/wiki/index.php?title=Build_EtherLAB_master_kernel

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:
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

  1. Untar the EtherLAB archive.
tar jxvf etherlabmaster....
  1. Enter the directory
cd etherlabmaster....
  1. Bootstrap the sources
./bootstrap
  1. Configure the build
./configure --enable-r8169 --enable-8139too --enable-e100 --enable-e1000 --enable-e1000e --enable-generic
  1. Build everything:
make all install modules modules_install install
  1. EtherLAB is installed in /opt. Read the INSTALL file for configuration aspects.

Links

沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。