Commit Graph

2236 Commits

Author SHA1 Message Date
Florian Pose 4b05c861d7 Merge branch 'Fix-16' into 'master'
Fix #16: explicitely check for pkg-config macros

Closes #16

See merge request etherlab.org/ethercat!37
2021-11-30 09:47:49 +00:00
Nicola Fontana 9fb9123a0e Fix #16: explicitely check for pkg-config macros
Without this patch, `./bootstrap` fails with the following error if
pkgconf/pkg-config is not installed:

    lib/Makefile.am:76: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined

This can be triggered by disinstalling `pkgconf/pkg-config`. The problem
here is that the check for `pkg-config` is done at configure level but
`automake` fails at bootstrap level because of the above error.

This basically "fixes" the issue by changing the way in which
`./bootstrap` fails.
2021-10-21 12:58:58 +02:00
Florian Pose 65285fe74c Merge branch '15-ethercat-165-arithmetic-expression-expecting-primary-0-1' into 'master'
Resolve "ethercat: 165: arithmetic expression: expecting primary: " "0" + 1""

Closes #15

See merge request etherlab.org/ethercat!33
2021-09-02 15:11:36 +00:00
Florian Pose 5bd401490f Avoid double quotes in arithmetic expansion. 2021-09-02 11:48:53 +02:00
Florian Pose efa5c32d0f Run pipeline also in stable-1.5. 2021-09-01 09:15:02 +00:00
Florian Pose b9d55e9919 Run pipeline on all branches. 2021-09-01 09:09:15 +00:00
Florian Pose f3a48e21e8 Added missing scope for ostream. 2021-09-01 10:47:48 +02:00
Florian Pose f7abb149c5 Merge branch 'kern-cont' into 'master'
Strictly using KERN_CONT for continued printk() calls to avoid newlines.

See merge request etherlab.org/ethercat!32
2021-08-31 11:37:04 +00:00
Florian Pose 4fe2599530 Strictly using KERN_CONT for continued printk() calls to avoid newlines. 2021-08-31 13:29:16 +02:00
Florian Pose 2d96b626e8 Avoided warning about unreasonable use of strncpy(). 2021-08-25 12:01:03 +02:00
Florian Pose 4d2d4a5481 Avoided warning. 2021-08-25 12:01:03 +02:00
Florian Pose 3781326aba Define set_normal_priority() inside #ifdef EC_EOE. Fixes #12. 2021-08-25 09:45:31 +02:00
Florian Pose 9bde5b2106 Merge branch 'cherry-pick-dde91be4' into 'master'
Merge branch 'fix-make-clean' into 'stable-1.5'

See merge request etherlab.org/ethercat!31
2021-08-24 16:16:40 +00:00
Florian Pose 0e8ee10933 Avoided unused variables. 2021-08-24 18:12:27 +02:00
Florian Pose db12765645 Fixed duplicate ioctl labels. 2021-08-24 18:12:00 +02:00
Florian Pose 3e821677f6 Merge branch 'fix-make-clean' into 'stable-1.5'
Fix make clean

See merge request etherlab.org/ethercat!29

(cherry picked from commit dde91be4be)

89f81d63 Fix make clean
2021-08-24 16:04:49 +00:00
Florian Pose a87ce3bd08 Documentation for interface names. 2021-08-24 17:49:43 +02:00
Florian Pose 0a0117d4b6 Broke long lines. 2021-08-24 17:49:32 +02:00
Florian Pose e480ffbe8b Removed tabs. 2021-08-24 17:49:22 +02:00
Matthias Schoepfer e78bf31962 ethercatctl: allow to use the network device name instead of mac address
In the /etc/ethercat.conf file, the MASTERX_DEVICE string is given as a
mac address or a wildcard. When we want to deploy the (same) software (image)
to a bunch of different hardware, and these computers do have more than one
interface that matches the driver, we need a way to define the device by
network interface name. This allows to also define the network device by name
(e.g. eth0, eno1, ...)

Signed-off-by: Matthias Schoepfer <m.schoepfer@rethinkrobotics.com>
2021-08-24 17:49:09 +02:00
Florian Pose 7facae8e3b First feature flag: AssignToPdi. 2021-08-24 17:48:46 +02:00
Florian Pose 980c8d3025 Find flag method with const char * parameter; added method to header. 2021-08-24 17:48:09 +02:00
Florian Pose 2ee65b6387 Added feature flags to API. 2021-08-24 17:47:15 +02:00
Florian Pose f2e838a664 Also changed license of gloabl headers to LGPL.
Moved definition of EC_SDO_INJECTION_TIMEOUT to master.c.
2021-08-24 17:40:06 +02:00
Florian Pose ab0d009bcc Added export for ecrt_slave_config_reg_pdo_entry_pos(). Fixes #11. 2021-08-24 17:39:54 +02:00
Florian Pose 8e1dc9f593 Corrected license text of master/ioctl.h, because it is included in the userspace library. 2021-08-24 17:39:43 +02:00
Nicola Fontana fd772c310c Do not hardcode paths in scripts
Try to reuse the configured paths as much as possible. Unfortunately, to
be able to fully expand some variable (e.g. `bindir`), these files must
be expanded by make, not by configure. This adds some complexity:

https://www.gnu.org/software/automake/manual/html_node/Scripts.html
2021-08-24 17:39:19 +02:00
Florian Pose 9384cc7010 Fixed problems with shell quotes introduced in 66329e1f. 2021-08-24 17:39:06 +02:00
Florian Pose d479f28ccc Added 4.19 files to Makefile. 2021-08-24 17:38:22 +02:00
Vincenzo Ferraro 9e2dc1b002 igb-4.19 kernel driver 2021-08-24 17:38:14 +02:00
Matthias Schoepfer 1bb6d56fa7 script: run shellcheck on bash / sh scripts
Mostly fixed omitted double quotes, some conversion of $(eval ..) to $(()).
Left the echo -n untouched, shellcheck complains about not being standard in
/bin/sh. Also, seems like some code is dublicated in ethercatctl.in and
init.d/ethercat.in.

Signed-off-by: Matthias Schoepfer <m.schoepfer@rethinkrobotics.com>
2021-08-24 17:37:53 +02:00
Florian Pose 35ed166813 Added some options to widen test coverage. 2021-08-24 17:37:39 +02:00
Kale Yuzik 2b39a6321b Implement fix for kernel error when opening TTY device file on kernel 3.7.0 or greater
Error message: "tty_init_dev: ttyEC driver does not set tty->port. This would crash the kernel. Fix the driver!"
2021-08-24 17:37:21 +02:00
Nicola Fontana 4e6ac827c1 Revive 'make distcheck' 2021-08-24 17:37:01 +02:00
Bjarne von Horn 961fa9edd6 switch to prebuilt container 2021-08-24 17:36:41 +02:00
Florian Pose cf42dd1316 Ignore cmake output. 2021-08-24 17:36:15 +02:00
Bjarne von Horn d755f4a26d Add cmake config module 2021-08-24 17:35:55 +02:00
Nicola Fontana 246fed4d83 Remove empty m4/Makefile.am 2021-08-24 17:35:36 +02:00
Nicola Fontana 802a4fc57b Fix #5: call Kbuild clean only where needed
The problem is both automake and kbuild recurse into subdirectories. In
`make distcheck`, automake cleans its `SUBDIRS` and only then tries to
clean the toplevel one. This in turn will trigger a kbuild clean that
will try to recurse into its own (now empty) subdirectories.

Avoid this issue by removing Kbuild clean from the toplevel.
2021-08-24 17:35:12 +02:00
Nicola Fontana e94f3ec002 Do not define DIST_SUBDIRS when not needed
DIST_SUBDIRS is automatically populated with all possible values of
SUBDIRS in all conditions:

    https://www.gnu.org/software/automake/manual/html_node/SUBDIRS-vs-DIST_005fSUBDIRS.html

This means it is usually not needed to explicitely set it but in
examples/, where some dirs are never added to SUBDIRS.
2021-08-24 17:34:45 +02:00
Nicola Fontana 9c69f5d6dc Disable 8139too in distcheck
The 8139too native driver was enabled by default for historical reasons.
Disable it in `make distcheck` to avoid needing to have a specific linux
source tree ready available.
2021-08-24 17:34:20 +02:00
Florian Pose ff9db35874 Retry responding slaves datagram; more robust to timeouts. 2021-08-24 17:33:58 +02:00
Nicola Fontana 5696f70a8f Fix EXTRA_DIST files for e1000e
In `devices/e1000e/Makefile.am` there was a really sneaky double
backslash that messed up the whole EXTRA_DIST list.
2021-08-24 17:33:30 +02:00
Nicola Fontana 6e8c371c42 Do not include AC_CONFIG_FILES in BUILT_SOURCES
BUILT_SOURCES is used to trigger early generation of files in the `make`
process to workaround dependency problems:

    https://www.gnu.org/software/automake/manual/html_node/Sources.html

AC_CONFIG_FILES are generated by `configure`, so they are already
present in the file system even before `make` is called. Furthermore,
AC_CONFIG_FILES already properly handle dist and clean targets, so no
need to add them to EXTRA_DIST or DISTCLEANFILES:

    https://www.gnu.org/software/automake/manual/html_node/Requirements.html
2021-08-24 17:32:32 +02:00
Florian Pose ddffe4c318 Docs: UTF-8 encoding; latest komascript packages. 2021-08-24 17:26:14 +02:00
Florian Pose 52104d9f52 Added systemd directory switch to docs. 2021-08-24 17:25:54 +02:00
Nicola Fontana 61e75d1f42 Ignore generated libethercat.pc in git 2021-08-24 17:25:41 +02:00
Nicola Fontana db729dc967 Proper systemd support
Follow the directions on integrating systemd with autotools provided by
the systemd documentation itself:

https://www.freedesktop.org/software/systemd/man/daemon.html#Installing%20systemd%20Service%20Files

The snippet has been adapted to better match our coding style, e.g.
directly use of `if` instead of `AS_IF`.
2021-08-24 17:24:58 +02:00
Florian Pose 89a7263155 Fixed format string in tty example. 2021-08-24 17:22:43 +02:00
Nicola Fontana eb96e7fc50 Fix #4: remove sram.h and gpio.h from EXTRA_DIST
`sram.h` is not referenced anywhere (or, better, `grep -ir sram.h` does
not return any matching result) while `gpio.h` is included with
`<linux/gpio.h>`, suggesting the system header file is used.
2021-08-24 17:22:32 +02:00