Hi Rod,
I followed your installation steps but get stuck early on in the process. I do not know how to resolve. Here's the relevant last part of the terminal output were errors started appearing:
pi@raspberrypi:/tmp $ sudo apt-get install ethercat-dkms libethercat libethercat-dev ethercat-master git
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.20.1-2+deb10u6).
The following NEW packages will be installed:
dkms ethercat-dkms ethercat-master libethercat libethercat-dev
raspberrypi-kernel-headers
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.6 MB of archives.
After this operation, 130 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
ethercat-dkms libethercat ethercat-master libethercat-dev
Install these packages without verification? [y/N] y
Get:1
deb.debian.org/debian
buster/main arm64 dkms all 2.6.1-4 [74.4 kB]
Get:2
archive.raspberrypi.org/debian
buster/main arm64 raspberrypi-kernel-headers arm64 1:1.20220308~buster-1 [9,348 kB]
Get:3
download.opensuse.org/repositories/home:...:/EtherLab/Debian_10
./ ethercat-dkms 1.6.0-3 [1,066 kB]
Get:4
download.opensuse.org/repositories/home:...:/EtherLab/Debian_10
./ libethercat 1.6.0-3 [20.9 kB]
Get:5
download.opensuse.org/repositories/home:...:/EtherLab/Debian_10
./ ethercat-master 1.6.0-3 [115 kB]
Get:6
download.opensuse.org/repositories/home:...:/EtherLab/Debian_10
./ libethercat-dev 1.6.0-3 [19.2 kB]
Fetched 10.6 MB in 9s (1,204 kB/s)
Selecting previously unselected package dkms.
(Reading database ... 114135 files and directories currently installed.)
Preparing to unpack .../0-dkms_2.6.1-4_all.deb ...
Unpacking dkms (2.6.1-4) ...
Selecting previously unselected package ethercat-dkms.
Preparing to unpack .../1-ethercat-dkms_1.6.0-3_all.deb ...
Unpacking ethercat-dkms (1.6.0-3) ...
Selecting previously unselected package libethercat.
Preparing to unpack .../2-libethercat_1.6.0-3_arm64.deb ...
Unpacking libethercat (1.6.0-3) ...
Selecting previously unselected package ethercat-master.
Preparing to unpack .../3-ethercat-master_1.6.0-3_arm64.deb ...
Unpacking ethercat-master (1.6.0-3) ...
Selecting previously unselected package libethercat-dev.
Preparing to unpack .../4-libethercat-dev_1.6.0-3_arm64.deb ...
Unpacking libethercat-dev (1.6.0-3) ...
Selecting previously unselected package raspberrypi-kernel-headers.
Preparing to unpack .../5-raspberrypi-kernel-headers_1%3a1.20220308~buster-1_arm64.deb ...
Unpacking raspberrypi-kernel-headers (1:1.20220308~buster-1) ...
Setting up dkms (2.6.1-4) ...
Setting up raspberrypi-kernel-headers (1:1.20220308~buster-1) ...
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.10.103+
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.10.103-v7+
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.10.103-v7l+
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.10.103-v8+
Setting up ethercat-dkms (1.6.0-3) ...
Loading new ethercat-dkms-1.6.0 DKMS files...
Building for 5.15.65-rt49-v8+
Building initial module for 5.15.65-rt49-v8+
Error! Bad return status for module build on kernel: 5.15.65-rt49-v8+ (aarch64)
Consult /var/lib/dkms/ethercat-dkms/1.6.0/build/make.log for more information.
Adding Module to DKMS build system
Error! DKMS tree already contains: ethercat-dkms-1.6.0
You cannot add the same module/version combo more than once.
Doing initial module build
Error! Bad return status for module build on kernel: 5.15.65-rt49-v8+ (aarch64)
Consult /var/lib/dkms/ethercat-dkms/1.6.0/build/make.log for more information.
Installing initial module
Error! Bad return status for module build on kernel: 5.15.65-rt49-v8+ (aarch64)
Consult /var/lib/dkms/ethercat-dkms/1.6.0/build/make.log for more information.
Done.
Setting up libethercat (1.6.0-3) ...
Setting up libethercat-dev (1.6.0-3) ...
Setting up ethercat-master (1.6.0-3) ...
ethercat.service is a disabled or a static unit, not starting it.
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpt2+rpi1+deb10u1) ...
pi@raspberrypi:/tmp $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether e4:5f:01:f4:67:ed brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether e4:5f:01:f4:67:ee brd ff:ff:ff:ff:ff:ff
inet 192.168.2.17/24 brd 192.168.2.255 scope global dynamic noprefixroute wlan0
valid_lft 85747sec preferred_lft 74947sec
inet6 2a02:a456:e14f:1:bb76:52be:fe2c:1eef/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 252660sec preferred_lft 166260sec
inet6 fe80::d84e:d142:7a9:91bc/64 scope link
valid_lft forever preferred_lft forever
pi@raspberrypi:/tmp $ sudo geany /etc/ethercat.conf
pi@raspberrypi:/tmp $ sudo systemctl enable ethercat.service
Created symlink /etc/systemd/system/multi-user.target.wants/ethercat.service → /lib/systemd/system/ethercat.service.
pi@raspberrypi:/tmp $ 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 -xe" for details.
pi@raspberrypi:/tmp $
Here is the contents of /var/lib/dkms/ethercat-dkms/1.6.0/build/make.log
DKMS make.log for ethercat-dkms-1.6.0 for kernel 5.15.65-rt49-v8+ (aarch64)
Sun 15 Jan 2023 11:15:57 AM CET
make: Entering directory '/usr/src/linux-headers-5.15.65-rt49-v8+'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: aarch64-linux-gnu-gcc (GCC) 8.4.0
You are using: gcc (Debian 8.3.0-6) 8.3.0
CC [M] /var/lib/dkms/ethercat-dkms/1.6.0/build/examples/mini/mini.o
Assembler messages:
Error: unknown architecture `armv8.5-a'
Error: unrecognized option -march=armv8.5-a
make[3]: *** [scripts/Makefile.build:289: /var/lib/dkms/ethercat-dkms/1.6.0/build/examples/mini/mini.o] Error 1
make[2]: *** [scripts/Makefile.build:552: /var/lib/dkms/ethercat-dkms/1.6.0/build/examples/mini] Error 2
make[1]: *** [scripts/Makefile.build:552: /var/lib/dkms/ethercat-dkms/1.6.0/build/examples] Error 2
make: *** [Makefile:1896: /var/lib/dkms/ethercat-dkms/1.6.0/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.65-rt49-v8+'