Beckhoff ethercat 64 with bit linuxcnc, How to install.

More
28 Jul 2021 18:41 #216141 by rollfree
I don't understand where your problem is.
I use a special EtherCAT driver for RTL8139 cards on many systems, always without problems. These cards are today almost free and the driver is OK. So I think it's a good choice.

It is definitely a good idea to use special native drivers and not "generic", if possible. This will result in less system load and higher reliability.

So when configuring ./configure, turn on --enable-8139too.
After compiling and installing check, if in the directory /lib/modules/<version_of_your_kernel>/ethercat/devices exists the file ec_8139too.ko.
And everything has to work.

Please Log in or Create an account to join the conversation.

More
28 Jul 2021 19:32 - 28 Jul 2021 19:45 #216145 by foxington
My problem is there, where I want not to use "generic" driver for realtek 8193 pci card but when I edited ethercat-config and replace 
DEVICE_MODULES="generic"
with
DEVICE_MODULES="8139too"

then I update ethercat config it can not to change driver and tells me
Updating EtherCAT master confiuration
modinfo: ERROR: Module ec_8139too not found.
update-initramfs: Generating /boot/initrd.img-4.19.0-11-rt-amd64

and I do not know why it not want to allow natural driver... defenetly there are missing thats files which you said before... in that folder  
/lib/modules/<version_of_your_kernel>/ethercat/devices
are not any 8139too, e1000e etc files...

how will restart configuring subroutine? 
​​​Do you have any experiences with it please?
Last edit: 28 Jul 2021 19:45 by foxington.

Please Log in or Create an account to join the conversation.

More
28 Jul 2021 21:57 - 28 Jul 2021 21:58 #216151 by rollfree
The name of the special EtherCAT driver for the RTL8139 card is ec_8139too.ko. This file must be located in the directory of your specific kernel:
/lib/modules/<version_of_your_kernel>/ethercat/devices

At the same time, it must be listed in the list of usable modules:
/lib/modules/<version_of_your_kernel>/modules.dep
Where it will be written by the command "depmod". But the Makefile installer should arrange this.

To create this ec_8139too.ko driver there, you need to enter it in the "configure" command:
./configure --enable-8139too
And then you must compile and install everything:
make all modules
make modules_install install
depmod

If the ec_8139too.ko driver is not in the appropriate directory, "DEVICE_MODULES=8139too" cannot be configured.

If you asked something else and I didn't understand, I'm sorry.
Last edit: 28 Jul 2021 21:58 by rollfree.
The following user(s) said Thank You: Grotius, foxington

Please Log in or Create an account to join the conversation.

More
29 Jul 2021 11:15 #216209 by Grotius
Hi,

I expierenced the same problem as Foxington a time ago. But never solved this and simply used the generic type.
 

Please Log in or Create an account to join the conversation.

More
30 Jul 2021 18:18 #216374 by foxington
when I went to
lib/modules/'uname -r'/
and
ls
there is no folder with name "ethercat" just these are there
cnc@debian:/usr/lib/modules/4.19.0-11-rt-amd64$ ls
build              modules.builtin      modules.devname  modules.symbols.bin
kernel             modules.builtin.bin  modules.order    source
modules.alias      modules.dep          modules.softdep  updates
modules.alias.bin  modules.dep.bin      modules.symbols
when I did small research I found in this folder
/lib/modules/'uname -r'/kernel/drivers/net/ethernet/realtek/
with these files
$ ls
8139cp.ko  8139too.ko  r8169.ko
but I found next file with something more similar then files upper at this link
cnc@debian:/etc/modules-load.d$ ls
ethercat.conf  modules.conf
and when oper ethercat.conf there are files with "ec_ " beginning but I do not know on what they fors?
ec_master
ec_generic

Please Log in or Create an account to join the conversation.

More
30 Jul 2021 19:40 #216387 by db1981
Hello foxington,

can you explain, following which way you installed ethercat ?

ec-debianize or compiling the igh master by your own?

the realtek drivers needs to be build at compile time....

Please Log in or Create an account to join the conversation.

More
30 Jul 2021 21:50 #216402 by rollfree
Did you do (Y/N and with what result):
- ./configure --enable-8139too
- make all modules
- make modules_install install
- depmod

Please Log in or Create an account to join the conversation.

More
31 Jul 2021 09:56 #216437 by foxington
db1981

I just downloaded the hybrid ISO file like " tommylight ​​​​ " told me in this answer

https://forum.linuxcnc.org/27-driver-boards/35591-beckhoff-ethercat-64-with-bit-linuxcnc-how-to-install?start=200#211106
with preinstalled ethecat from this link as a most fastest way.
https://sourceforge.net/projects/linux-debian-bullseye-11-rtos/
 

And because When I want to installed ethercat myself by commands it never - never works as it was described and I did not know why... 

I followed this guides :
  • https://github.com/grotius-cnc/install_script
  • https://forum.linuxcnc.org/27-driver-boards/35591-beckhoff-ethercat-64-with-bit-linuxcnc-how-to-install?start=110#184991
  • https://forum.linuxcnc.org/27-driver-boards/35591-beckhoff-ethercat-64-with-bit-linuxcnc-how-to-install?start=30#135811
but it is my fail I think therefore... 
Every time I want to started with installation I began with

1. blank 2.8.0 buster preemt-rt 
2. kept root pasword empty during installation
3. update and upgarade to actual releases
4. for example I used this install guide 
https://github.com/grotius-cnc/install_script
5.
./setup.sh reboot ./setup1.sh
6. ethercat works but I never found this file 
 /home/user/linuxcnc-ethercat/src/lcec_conf
7. and when I created files around like "ethercat.hal" where I want to call "lcec_conf" I can not find the folder where "lcec_conf" is located yet...

​​​​​​
rollfree

no I have never used this commands before. I am not most advanced user of Linux +  ethercat I just learning it and I want to learn it soo much becouse it is a future...

​​​​​​​
understanding right, I have disbled that driver and therefore It want not to use it.
I need just add driver for 8139too network card "ec_8139too" to some list of enabled drivers which it loads on for using?

Please Log in or Create an account to join the conversation.

More
31 Jul 2021 18:23 - 31 Jul 2021 18:38 #216473 by db1981
Hello,i am writing the following on a windows machine out of my head, i can't test this live at the moment......
Every time I want to started with installation I began with

1. blank 2.8.0 buster preemt-rt 
2. kept root pasword empty during installation
3. update and upgarade to actual releases
4. for example I used this install guide github.com/grotius-cnc/install_script5../setup.sh reboot ./setup1.sh6. ethercat works but I never found this file 
 /home/user/linuxcnc-ethercat/src/lcec_conf

  ok, we will start after point 5:
-cd ec-debianize/etherlabmaster/debian -open the file rules with an editor, edit line 8 "--disable-8139too" to "--enable-8139too"

-open the file etherlabmaster.dkms, add the following in front of the two "Post_xxxx" lines at file end.
BUILT_MODULE_NAME[2]="devices/8139too"
DEST_MODULE_NAME[2]="ec_8139too"
DEST_MODULE_LOCATION[2]="/updates/dkms"
 
-go to ec-debianize/etherlabmaster ->type "dpkg-buildpackage" , i hope this will run without errors...
-cd... to ec-debianize there should be three deb packages.

-install the three packages with "sudo dpkg -i"
sudo dpkg -i etherlabmaster_1.5.2+20190904hg33b922p8ea394-1_amd64.deb
sudo dpkg -i etherlabmaster-dbgsym_1.5.2+20190904hg33b922p8ea394-1_amd64.deb
sudo dpkg -i etherlabmaster-dev_1.5.2+20190904hg33b922p8ea394-1_amd64.deb


i am not shure if the file names will be exact the same ....

-change the driver in etc/default/ethercat to 8139too
-sudo update-ethercat-config
-reboot

-go to your linuxcnc folder , "cd scripts" , ". ./rip-environment"
-go to your linuxcnc-ethercat folder , "make clean", "make install" 


Maybe it will work now, if there are error messages tell me.


 
Last edit: 31 Jul 2021 18:38 by db1981. Reason: formatting horror
The following user(s) said Thank You: foxington

Please Log in or Create an account to join the conversation.

More
04 Aug 2021 14:00 - 04 Aug 2021 16:20 #216911 by foxington
thanks a lot for cooperation...
I did next steps after point 5. -

5.1  in the file  " /home/cnc/install_script/ec-debianize/etherlabmaster/debian/rules  "
I changed 8 row to this
"CONFFLAGS += --enable-kernel --enable-generic --enable-ccat --enable-8139too --disable-e100 --disable-e1000 --enable-e1000e --disable-r8169 --enable-hrtimer --enable-rtmutex"

5.2 the file " etherlabmaster.dkms " will looks like-

"# DKMS configuration for the etherlabmaster modules

# The version is replaced at build time by dh_dkms invoked in debian/rules.
PACKAGE_NAME="etherlabmaster"
PACKAGE_VERSION="#MODULE_VERSION#"

BUILT_MODULE_NAME[0]="master/ec_master"
DEST_MODULE_NAME[0]="ec_master"
DEST_MODULE_LOCATION[0]="/updates/dkms"

AUTOINSTALL=yes

MAKE[0]="make -C \${kernel_source_dir} M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build modules"
CLEAN="make -C \${kernel_source_dir} M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build clean"

BUILT_MODULE_NAME[1]="devices/ccat/ec_ccat"
DEST_MODULE_NAME[1]="ec_ccat"
DEST_MODULE_LOCATION[1]="/updates/dkms"

BUILT_MODULE_NAME[2]="devices/ec_generic"
DEST_MODULE_NAME[2]="ec_generic"
DEST_MODULE_LOCATION[2]="/updates/dkms"

BUILT_MODULE_NAME[3]="examples/mini/ec_mini"
DEST_MODULE_NAME[3]="ec_mini"
DEST_MODULE_LOCATION[3]="/updates/dkms"

BUILT_MODULE_NAME[4]="devices/8139too"
DEST_MODULE_NAME[4]="ec_8139too"
DEST_MODULE_LOCATION[4]="/updates/dkms"

BUILT_MODULE_NAME[5]="devices/e1000e"
DEST_MODULE_NAME[5]="ec_e1000e"
DEST_MODULE_LOCATION[5]="/updates/dkms"

POST_BUILD="postbld \${kernel_source_dir} $dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build"
POST_REMOVE="postrm \${kernel_source_dir} $dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build"
"

5.3 went in folder
"home/cnc/install_script/ec-debianize/etherlabmaster"

and did

"dpkg-buildpackage"

and after his answer
"
root@debian:/home/cnc/install_script/ec-debianize/etherlabmaster# dpkg-buildpackage
dpkg-buildpackage: info: source package etherlabmaster
dpkg-buildpackage: info: source version 1.5.2+20190904hg33b922p8ea394-1
dpkg-buildpackage: info: source distribution lucid
dpkg-buildpackage: info: source changed by Sascha Ittner <This email address is being protected from spambots. You need JavaScript enabled to view it.>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
 debian/rules clean
dh clean --with autoreconf,dkms
   dh_auto_clean
    make -j1 distclean
make[1]: Entering directory '/home/cnc/install_script/ec-debianize/etherlabmaster'
 cd . && /bin/bash /home/user/Desktop/Skynet/ec-debianize/etherlabmaster/autoconf/missing automake-1.16 --gnu Makefile
/bin/bash: /home/user/Desktop/Skynet/ec-debianize/etherlabmaster/autoconf/missing: No such file or directory
make[1]: *** [Makefile:454: Makefile.in] Error 127
make[1]: Leaving directory '/home/cnc/install_script/ec-debianize/etherlabmaster'
dh_auto_clean: make -j1 distclean returned exit code 2
make: *** [debian/rules:15: clean] Error 2
dpkg-buildpackage: error: debian/rules clean subprocess returned exit status 2"

5.4 in the folder

"/home/cnc/install_script/ec-debianize"

it had
"
root@debian:/home/cnc/install_script/ec-debianize# ls
etherlabmaster
etherlabmaster_1.5.2+20190904hg33b922p8ea394-1_amd64.buildinfo
etherlabmaster_1.5.2+20190904hg33b922p8ea394-1_amd64.changes
etherlabmaster_1.5.2+20190904hg33b922p8ea394-1_amd64.deb
etherlabmaster_1.5.2+20190904hg33b922p8ea394-1.debian.tar.xz
etherlabmaster_1.5.2+20190904hg33b922p8ea394-1.dsc
etherlabmaster_1.5.2+20190904hg33b922p8ea394.orig.tar.gz
etherlabmaster-dbgsym_1.5.2+20190904hg33b922p8ea394-1_amd64.deb
etherlabmaster-dev_1.5.2+20190904hg33b922p8ea394-1_amd64.deb
get_source.sh
README.debianize"

5.5 name are same if I am not wrong and I did ...
"
sudo dpkg -i etherlabmaster_1.5.2+20190904hg33b922p8ea394-1_amd64.deb
log
Warning: Spoiler!

sudo dpkg -i etherlabmaster-dbgsym_1.5.2+20190904hg33b922p8ea394-1_amd64.deb
log
Warning: Spoiler!

sudo dpkg -i etherlabmaster-dev_1.5.2+20190904hg33b922p8ea394-1_amd64.deb
Warning: Spoiler!

"
5.6 went to file
"/etc/default/ethercat"

and I changed row 100 to
"DEVICE_MODULES="8139too""

5.7 did
"sudo update-ethercat-config"
but resault is same all the time...
"root@debian:~# sudo update-ethercat-config
Updating EtherCAT master confiuration
modinfo: ERROR: Module ec_8139too not found.
update-initramfs: Generating /boot/initrd.img-4.19.0-17-rt-amd64
done."

what should be problem now please?

thanks for helping!!!
Last edit: 04 Aug 2021 16:20 by foxington. Reason: formating of text

Please Log in or Create an account to join the conversation.

Time to create page: 0.260 seconds
Powered by Kunena Forum