<div dir="ltr">Hi Jakub,<div><br></div><div> I was able to resolve sock_create_kern by changing it to:</div><div><br></div><div>
<p class=""><span class="">ret = sock_create_kern(&init_net, PF_PACKET, SOCK_RAW, htons(ETH_P_ETHERCAT),</span></p>
<p class=""><span class=""> &dev->socket);</span></p><p class=""> Not sure if this will fix your issue.</p><p class=""><span class="">Thanks</span></p><p class=""><span class="">-Ravi Shankar R</span></p><p class=""><span class=""><br></span></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 1, 2016 at 7:22 PM, <span dir="ltr"><<a href="mailto:j.sikorski@utwente.nl" target="_blank">j.sikorski@utwente.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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" target="_blank">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" target="_blank">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 style="white-space:pre-wrap"></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>
</div>
<br>_______________________________________________<br>
etherlab-users mailing list<br>
<a href="mailto:etherlab-users@etherlab.org">etherlab-users@etherlab.org</a><br>
<a href="http://lists.etherlab.org/mailman/listinfo/etherlab-users" rel="noreferrer" target="_blank">http://lists.etherlab.org/mailman/listinfo/etherlab-users</a><br>
<br></blockquote></div><br></div>