Ethercat installation from repositories - how to step by step

More
02 May 2023 04:08 #270447 by CORBETT
Rod,

I don't have time tonight to check things out, but when trying to install Ethercat I was getting the NO PUBKEY error, so think the KEY needs updating.

This had to have just happened as I did a quick build of Bullseye with a 2.9 RIP and had no problem a week ago for a different controller. Plus did 2 builds on Buster last month. I am completely overloaded with work, so will not have any time to check things out on Andreas openSUSE page but will check back in case you get to it first. I was going to double check with another Buster build, but don't have time. Just wanted to put it out there in case others are having a problem with the error.

Thanks,
Robert

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

More
02 May 2023 06:56 #270450 by rodw
I had issues too. It seems  some of our Debian repos have been disabled by one of their users. But if you click through, the debs seem to be available for download. You might need to  register as a user ( I am) 
build.opensuse.org/repositories/home:bon...ce:EtherLab/ethercat
The following user(s) said Thank You: CORBETT

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

More
07 May 2023 01:33 #270838 by CORBETT
Rod,

Ok I decided to go and compile the code from the "official" IgH EtherCAT site that Florian, Richard, and Andreas maintain.  I just finished a bit ago, but just wanted to say it was still there and working.  I haven't done it this way since way back with Wheezy.  After EC-Debianize I never wasted time on compiling as it was just too easy... "sudo update-ethercat-config".

I will check out the DEB in a few days as I just wanted to ease my mind that it could be done still.  Plus, this is the official code just like Andreas had on the repo.  I was getting nervous there for a second as I have too much time and money in our equipment.  Glad to see the "ethercat-master". 

Thanks,
Robert

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

More
07 May 2023 03:50 #270839 by rodw
Robert,  I am not across what you did

did you just

git clone https://gitlab.com/etherlab.org/ethercat.git

Odd they show that on their site but no build instructions so do you just  follow this?
gitlab.com/etherlab.org/ethercat/-/blob/master/INSTALL.md

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

More
09 May 2023 12:36 #271023 by 0x2102
@rodw / all: did it every work for you to upgrade the kernel on a running EtherCAT system?

I wanted to give Kernel 6.3 a try ...Kernel works, but dkms fails to build the EtherCAT driver for 6.3

cnc@lcnc-dev:/var/lib/dkms/ethercat-dkms/1.5.2/build$ cat make.log
DKMS make.log for ethercat-dkms-1.5.2 for kernel 6.3.1-rt11-linuxcnc (x86_64)
Tue 09 May 2023 02:24:50 PM CEST
make: Entering directory '/usr/src/linux-headers-6.3.1-rt11-linuxcnc'
  CC [M]  /var/lib/dkms/ethercat-dkms/1.5.2/build/devices/generic.o
  CC [M]  /var/lib/dkms/ethercat-dkms/1.5.2/build/master/cdev.o
  CC [M]  /var/lib/dkms/ethercat-dkms/1.5.2/build/master/coe_emerg_ring.o
  CC [M]  /var/lib/dkms/ethercat-dkms/1.5.2/build/master/datagram.o
  CC [M]  /var/lib/dkms/ethercat-dkms/1.5.2/build/master/datagram_pair.o
  CC [M]  /var/lib/dkms/ethercat-dkms/1.5.2/build/examples/mini/mini.o
  CC [M]  /var/lib/dkms/ethercat-dkms/1.5.2/build/master/device.o
  CC [M]  /var/lib/dkms/ethercat-dkms/1.5.2/build/master/domain.o
  CC [M]  /var/lib/dkms/ethercat-dkms/1.5.2/build/master/flag.o
  LD [M]  /var/lib/dkms/ethercat-dkms/1.5.2/build/examples/mini/ec_mini.o
  CC [M]  /var/lib/dkms/ethercat-dkms/1.5.2/build/master/fmmu_config.o
/var/lib/dkms/ethercat-dkms/1.5.2/build/master/cdev.c: In function ‘eccdev_mmap’:
/var/lib/dkms/ethercat-dkms/1.5.2/build/master/cdev.c:246:19: error: assignment of read-only member ‘vm_flags’
  246 |     vma->vm_flags |= VM_DONTDUMP; /* Pages will not be swapped out */
      |                   ^~
make[2]: *** [scripts/Makefile.build:252: /var/lib/dkms/ethercat-dkms/1.5.2/build/master/cdev.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  LD [M]  /var/lib/dkms/ethercat-dkms/1.5.2/build/devices/ec_generic.o
make[1]: *** [scripts/Makefile.build:494: /var/lib/dkms/ethercat-dkms/1.5.2/build/master] Error 2
make: *** [Makefile:2025: /var/lib/dkms/ethercat-dkms/1.5.2/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.3.1-rt11-linuxcnc'

cnc@lcnc-dev:/var/lib/dkms/ethercat-dkms/1.5.2/build$ uname -a
Linux lcnc-dev 6.1.0-0.deb11.5-rt-amd64 #1 SMP PREEMPT_RT Debian 6.1.12-1~bpo11+1 (2023-03-05) x86_64 GNU/Linux

 
The following user(s) said Thank You: xwhatsit

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

More
09 May 2023 12:49 #271025 by 0x2102
Seems like there is already a merge request pending to address this:

I have modified the source code cdev.c and dkms was able to build the driver.

gitlab.com/igh-vh/ethercat/-/commit/27db...69e4f3a8fc469326f09d
The following user(s) said Thank You: CORBETT

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

More
09 May 2023 18:56 - 09 May 2023 18:57 #271056 by rodw
Great feedback. I guess it will be merged shortly. In the meantime, you could checkout the fix_vm_set_flags branch
Also overnight the PREEMPT_RT team released the v6.3.1-rt13 patch set which is now available at kernel.org
They say this will be back ported to 6.1 if it works out.
I might try and build 6.3.1
 
Last edit: 09 May 2023 18:57 by rodw.

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

More
09 May 2023 23:38 #271073 by CORBETT
Rod,

Yep Yep, just cloned the git repo, built and installed.  When I say compile, I am simply referring to the process as before Andreas put up the repository you could only get ethercat by doing EC-Debianize or compile the IgH code.  Back when I did it on Wheezy it was mercurial not git, but still same basic principle... but yeah, I have put it on a couple of times since the last post and it is rock solid... it's up every time, no having to restart the service.

Yeah, I am not referring to true compiling from scratch.  Everything is much easier now... when I was a teen in late 80's I had to learn UNIX for my father's company server (Texas Instruments, 286 architecture, monochrome monitors, no hdd, tape only, and a whopping 15K of RAM... Kilobytes not Mega, our cost $22,000; UNIX was $6,000 alone)... I hated it, felt there should be an easier way (GUI with point & click), but now glad that I went through that hell.  I can halfway get around in Linux, but Linux is not UNIX.  I am not a programmer or developer, only picked up the manuals and figured out how to operate the thing.  Today is much easier as you can get on the internet and find out how things work, back then it was pure hell to get things working.  I can remember when we received our IBM XT with twin 5-1/4 floppies, it was a huge step up with the floppies alone as got rid of the tape.  Even though 5-1/4 floppies were bigger in physical size to a 3-1/2, it still was way smaller than that huge tape.  What is funny back then is that there were computer courses for just learning how to send email as it wasn't easy at all.  I remember the most complicated thing to do in the day was to add a video card, you didn't have anything on the monitor as the card hadn't been installed yet, so you would have to write out all the commands and do everything in order perfectly and then when you rebooted, hoped that you saw something on the monitor (monochrome green letters LOL= Login at:).  I don't miss any of it at all, what a lot of work back then just to have a payroll server.

I am impressed with how far things have advanced... in the 90's I use to cream over a Pentium II 333 Slot1 chip LOL.  Even LCNC has came a long way since back in the early 2000's with EMC (I still have my EMC BDI disc & EMC2 disc).  I am truly impressed with QTDRAGON-HD as that really makes LCNC look like a high quality control at this point.  Even Norbert's Gmoccapy was impressive way back when, but Persei has built something really beautiful with Dragon.  I love open source and what all of this has evolved into, just awesome.  Just never enough time to do all that is available now...
The following user(s) said Thank You: rodw

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

More
09 May 2023 23:48 #271074 by rodw

Rod,

  Everything is much easier now... when I was a teen in late 80's I had to learn UNIX for my father's company server (Texas Instruments, 286 architecture, monochrome monitors, no hdd, tape only, and a whopping 15K of RAM... Kilobytes not Mega, our cost $22,000; UNIX was $6,000 alone)... 

I remember those days. At college our mainframe gave each terminal 11k and we programmed in basic. Sometimes we'd enter the data using mark sense cards and a pencil.. Then they bought a couple of Apple II pcs with 48k of Ram and 170 k floppy....... I remember paying $1k for a 40 Mb HDD. 

It seems like Igh just dropped the Bookworm repo but they are still making the debs on their buildbot. You just need to login with google to get access. I suspect it is something to do with the later kernels. The days of the PREEMPT_RT patch are numbered. That will be awesome when its all  in mainline...


 
The following user(s) said Thank You: CORBETT

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

More
20 May 2023 06:03 #271709 by CORBETT
@ 0x2102
How did Kernel 6.3 work.  I had seen on John Thornton's site that latency was problematic after 5.10 with using Ethernet on Mesa cards, so I wasn't sure if that would affect EtherCAT as well.


@ Rod Webster

I remember those days. At college our mainframe gave each terminal 11k and we programmed in basic. Sometimes we'd enter the data using mark sense cards and a pencil.. Then they bought a couple of Apple II pcs with 48k of Ram and 170 k floppy....... I remember paying $1k for a 40 Mb HDD. 



Ouch, so you felt the pain also  , yeah I am glad things have gotten affordable.  Speaking of HDD's, I can't remember what year it was, but we picked up a 4Gb drive and I remember telling my Dad: "We will never fill it up" LOL LOL LOL, well I was completely wrong...  Yeah, Texas Instruments sent Basic with the computer, I never did get deep into it as I was just trying to get around Unix alone, but I do remember doing a few of the simple little programs in basic on a commodore computer back in the mid 80's right before we got the TI server.

Yeah I still haven't checked out the DEB's as I am still overloaded with work and don't have time to tinker... I'm really under the gun now.

But, since I last posted and over last weekend, I have built 8 complete systems using Bullseye, with LCNC 2.9 RIP, IgH EtherCAT build, Sasha's Driver, Touchscreen with Dragon_HD GUI all working without issues, fires right up everytime.  I have gotten the builds down pat to the point that not having to do any work arounds for anything other than the realtime.mk fix.  Didn't do the Mutex fix, but don't think that is needed anymore since RTAI was dropped by Sasha. I am going to look at the realtime.mk fix a little bit more when I have time.  Just copied what Stormholt had.  Even have the libethercat.so linked correctly so that it works out of the box without editing the /.profile.  I'm setting them up like I have the current 2.8 deployment at each machine so that when you turn on the disconnect to the machine it will automatically fire up LCNC with Dragon.  That way no one has to do anything but start work.  I still have more HAL to write but wanted to make sure E-cat worked with Dragon, and simply did a couple of pins to make sure.  The only thing I have left is figuring out how to have a NGC file load automatically like you would in Axis.  I tried the same way as Axis under the [DISPLAY] section and adding OPEN_FILE = /full/path/to/filename.ngc but it didn't work like Axis does. Plus Jim and/or Chris Morley may not have it set up to work. When I have time, I'm going to post on the qtvcp section to find out.  I simply want the current production job to load so that a basic machine operator can go right to work without screwing around wasting time.  Right at the moment that machine operator is me LOL LOL LOL.

I just made a quick setup in HAL using a EL7041 and stepper as a spindle motor.  I am checking out [SPINDLE] code as it was implemented in 2.9, plus a few other things I wanted to look at.  I was pretty content as was using AXIS with Devils Pie, so it made a nice full screen... but after 
seeing Jim's Dragon_HD GUI, I was impressed and decided to step up to Bullseye & 2.9... plus I need to keep somewhat updated. (I still 
had one of them running wheezy with 2.7).

 

 
Attachments:

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

Time to create page: 0.294 seconds
Powered by Kunena Forum