<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hello Everyone,<br>
</p>
<p><br>
</p>
<p>I am working on Ubuntu 16.04. I try to install EtherCAT Master 1.5.2 following the instructions in Chapter 9 of this documentation :<br>
</p>
<p><br>
</p>
<p><a href="http://www.etherlab.org/download/ethercat/ethercat-1.5.2.pdf">http://www.etherlab.org/download/ethercat/ethercat-1.5.2.pdf</a><br>
</p>
<p><br>
</p>
<p>During the installation, I encountered a few errors trying to build the modules with generic driver ("sudo make modules" in 9.2). To overcome them, I introduced two modifications in the devices/generic.c file:<br>
</p>
<p><br>
</p>
<p>1. I changed </p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">a</span><span style="font-size: 12pt;">lloc_netdev(sizeof(ec_gen_device_t *), &null,
</span><span style="font-size: 12pt;">ether_setup);</span><span style="font-size: 12pt;"> </span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">t</span><span style="font-size: 12pt;">o </span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;"></span><span style="font-size: 12pt;">alloc_netdev(sizeof(ec_gen_device_t *), &null, NET_NAME_UNKNOWN, ether_setup);</span><span style="font-size: 12pt;"></span><br>
</p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">as stated in here:</span></p>
<p><br>
</p>
<p><a href="http://lists.etherlab.org/pipermail/etherlab-dev/2014/000435.html">http://lists.etherlab.org/pipermail/etherlab-dev/2014/000435.html</a><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>2. I also had a problem with <br>
</p>
<p><br>
</p>
<p>sock_create_kern(PF_PACKET, SOCK_RAW, htons(ETH_P_ETHERCAT), &dev->socket);<br>
</p>
<p><br>
</p>
<p>which required a different number of arguments, the first one being of type struct net* . I tentatively (not sure if I am right) fixed it by changing it to:<br>
</p>
<p><br>
</p>
<p>sock_create_kern(dev->netdev, PF_PACKET, SOCK_RAW, htons(ETH_P_ETHERCAT), &dev->socket);<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>This allowed me to build the modules without any further errors. I proceeded with the installation, until executing "sudo make modules_install" from 9.4<br>
</p>
<p>I ended up receiving this :<br>
</p>
<p><br>
</p>
<div>sudo make modules_install</div>
<div>make -C "/usr/src/linux-headers-4.4.0-22-generic" M="/home/big_mag/ethercat-1.5.2" \</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>INSTALL_MOD_DIR="ethercat" modules_install</div>
<div>make[1]: Entering directory '/usr/src/linux-headers-4.4.0-22-generic'</div>
<div> INSTALL /home/big_mag/ethercat-1.5.2/devices/ec_generic.ko</div>
<div>At main.c:222:</div>
<div>- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175</div>
<div>- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178</div>
<div>sign-file: certs/signing_key.pem: No such file or directory</div>
<div> INSTALL /home/big_mag/ethercat-1.5.2/examples/mini/ec_mini.ko</div>
<div>At main.c:222:</div>
<div>- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175</div>
<div>- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178</div>
<div>sign-file: certs/signing_key.pem: No such file or directory</div>
<div> INSTALL /home/big_mag/ethercat-1.5.2/master/ec_master.ko</div>
<div>At main.c:222:</div>
<div>- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175</div>
<div>- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178</div>
<div>sign-file: certs/signing_key.pem: No such file or directory</div>
<div> DEPMOD 4.4.0-22-generic</div>
<div>make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-22-generic'</div>
<div><br>
</div>
<div>Nevertheless I tried to continue with next steps. After "sudo /etc/init.d/ethercat start" I receive the following:<br>
</div>
<div><br>
</div>
<div>
<div>Starting EtherCAT master 1.5.2 modprobe: FATAL: Module ec_master not found in directory /lib/modules/4.4.0-22-generic</div>
<div> failed</div>
<div><br>
The file "ec_master.ko" is located in /lib/modules/4.4.0-22-generic/ethercat/master/<br>
</div>
<div><br>
</div>
<div>I am essentially stuck here, so I will be grateful about any explanation what is going on.<br>
</div>
<div><br>
</div>
<div>Thanks in advance for any help.<br>
</div>
<div><br>
</div>
<div>Jakub SIkorski<br>
<br>
</div>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>