Ethercat installation from repositories - how to step by step

More
3 years 4 months ago - 3 years 4 months ago #273801 by buzzFab
Rod, I have previously followed your guide with a intel i7 bookworm amd64 and everything worked but the system has too much jitter for my liking. I recently got a OPi5+ and Royka made a bookwork image for it that runs with very low jitter . Now I am trying to follow your guide again but on the OPi5+. I get this far and then errors.
Code:
cnc@orangepi5plus:~$ sudo apt install -y linux-headers-$(uname -r) Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package linux-headers-5.10.110-rockchip-rk3588 E: Couldn't find any package by glob 'linux-headers-5.10.110-rockchip-rk3588' cnc@orangepi5plus:~$ sudo apt install -y linux-headers Reading package lists... Done Building dependency tree... Done Reading state information... Done Package linux-headers is a virtual package provided by:   linux-headers-legacy-sun50iw9 23.02.2   linux-headers-legacy-rockchip-rk3588 23.02.2   linux-headers-legacy-media 23.02.2   linux-headers-edge-sunxi64 23.02.2   linux-headers-edge-rockchip64 23.02.2   linux-headers-edge-rockchip-rk3588 23.02.2   linux-headers-edge-rk35xx 23.02.2   linux-headers-edge-rk3568-odroid 23.02.2   linux-headers-edge-mvebu64 23.02.2   linux-headers-edge-meson64 23.02.2   linux-headers-edge-media 23.02.2   linux-headers-edge-bcm2711 23.02.2   linux-headers-edge-arm64 23.02.2   linux-headers-current-virtual 23.02.2   linux-headers-current-sunxi64 23.02.2   linux-headers-current-rockchip64 23.02.2   linux-headers-current-mvebu64 23.02.2   linux-headers-current-meson64 23.02.2   linux-headers-current-media 23.02.2   linux-headers-current-bcm2711 23.02.2   linux-headers-current-arm64 23.02.2 You should explicitly select one to install. E: Package 'linux-headers' has no installation candidate cnc@orangepi5plus:~$ lsb_release -a No LSB modules are available. Distributor ID:    Debian Description:    Armbian 23.05.0-trunk Bookworm Release:    12 Codename:    bookworm
Do you know which headers file I should install or maybe point me right direction?

Eric
Last edit: 3 years 4 months ago by buzzFab.

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

More
3 years 4 months ago #273802 by rodw
I've been watching your progress. In the armbian environment, the headers should be built as part of the process so I'm surprised you could not just install linux-headers

My suggestion would be to change your armbian build parameters to just build a kernel (instead of an image) and the headers and the image will be created in the output folder. Install with  dpkg -i linux-headers-xxxxx.deb
The following user(s) said Thank You: buzzFab

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

More
3 years 4 months ago - 3 years 4 months ago #273824 by buzzFab
Rodw, I think I figured it out with a header file from royka. next issue seems to not just be related to the orangepi. i get this far and it fails.
Code:
cnc@pm833tv-cnc:~$ sudo systemctl start ethercat.service Job for ethercat.service failed because the control process exited with error code. See "systemctl status ethercat.service" and "journalctl -xeu ethercat.service" for details.

I then decided to try the whole thing over again from a fresh install on a intel core i7, I used your guide here.

docs.google.com/document/d/1jeV_4VKzVmOI...I_PhCm1x7oiw8VcLFdiY

i get to the exact same line and it gives me the same error on amd64 as it does on arm64
Code:
cnc@pm833tv-cnc:~$ sudo systemctl start ethercat.service Job for ethercat.service failed because the control process exited with error code. See "systemctl status ethercat.service" and "journalctl -xeu ethercat.service" for details. cnc@pm833tv-cnc:~$ systemctl status ethercat.service × ethercat.service - EtherCAT Master Kernel Modules Loaded: loaded (/lib/systemd/system/ethercat.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Sun 2023-06-18 22:28:29 PDT; 4min 22s ago Process: 17371 ExecStart=/usr/sbin/ethercatctl start (code=exited, status=1/FAILURE) Main PID: 17371 (code=exited, status=1/FAILURE) CPU: 33ms cnc@pm833tv-cnc:~$ journalctl -xeu ethercat.service Hint: You are currently not seeing messages from other users and the system. Users in groups 'adm', 'systemd-journal' can see all messages. Pass -q to turn off this notice.

when i scroll back up in the terminal i also noticed that before i got this far there were already errors
Code:
sudo apt-get install ethercat-dkms libethercat libethercat-dev ethercat-master

spat out these errors

Code:
Setting up build-essential (12.9) ... Setting up ethercat-dkms (1.5.2-42~git04f202a3) ... Loading new ethercat-dkms-1.5.2 DKMS files... Deprecated feature: REMAKE_INITRD (/usr/src/ethercat-dkms-1.5.2/dkms.conf) Building for 6.1.0-9-rt-amd64 Building initial module for 6.1.0-9-rt-amd64 Deprecated feature: REMAKE_INITRD (/var/lib/dkms/ethercat-dkms/1.5.2/source/dkms.conf) Error! Bad return status for module build on kernel: 6.1.0-9-rt-amd64 (x86_64) Consult /var/lib/dkms/ethercat-dkms/1.5.2/build/make.log for more information. Adding Module to DKMS build system Error! DKMS tree already contains: ethercat-dkms-1.5.2 You cannot add the same module/version combo more than once. Doing initial module build Deprecated feature: REMAKE_INITRD (/var/lib/dkms/ethercat-dkms/1.5.2/source/dkms.conf) Error! Bad return status for module build on kernel: 6.1.0-9-rt-amd64 (x86_64) Consult /var/lib/dkms/ethercat-dkms/1.5.2/build/make.log for more information. Installing initial module Deprecated feature: REMAKE_INITRD (/var/lib/dkms/ethercat-dkms/1.5.2/source/dkms.conf) Error! Bad return status for module build on kernel: 6.1.0-9-rt-amd64 (x86_64) Consult /var/lib/dkms/ethercat-dkms/1.5.2/build/make.log for more information. Done. Setting up libethercat (1.5.2-42~git04f202a3) ... Setting up libethercat-dev (1.5.2-42~git04f202a3) ... Setting up ethercat-master (1.5.2-42~git04f202a3) ... ethercat.service is a disabled or a static unit, not starting it. Processing triggers for man-db (2.11.2-2) ... Processing triggers for libc-bin (2.36-9) ... cnc@pm833tv-cnc:~$

in the past on this PC i was able to complete the whole guide and get a working ethercat master but i can not repeat that anymore
Last edit: 3 years 4 months ago by buzzFab.
The following user(s) said Thank You: song_gy

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

More
3 years 4 months ago #273825 by rodw
I saw this over the weekend. check the comands they say for warnings. Stretch the window to read it all.. 

Also this fixed mine (sudo apt install kmod if not found)
sudo depmod

I did get it installed on a bookworm RC4 that I upgraded to the final release

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

More
3 years 4 months ago #273826 by rodw
Also my instructions are depreceated as its in the 2.9 docs now with a newer install..ISO
linuxcnc.org/docs/2.9/html/getting-start...etting-linuxcnc.html

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

More
3 years 4 months ago #273846 by rodw
As Corbett  stated earlier, the debs are broken. 
The solution is to build from source.
I've documented the steps in the attachment and have tested it on a new instance of debian Bookworm installed as per the 2.9 docs
I'll do this up in another seperate post in th enext couple of days.

Warning: Spoiler!
Attachments:
The following user(s) said Thank You: cncLab, TimP

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

Time to create page: 4.889 seconds
Powered by Kunena Forum