package/igh-ethercat: backport upstream fix to build with Linux >= 6.19.0
PATCH 1/2 package/igh-ethercat: backport upstream fix to build with Linux >= 6.19.0
Fixes:
https://autobuild.buildroot.org/results/9b270904b2f7cf9eaa661c98370c582a61ff2342/
--- .../0002-Linux-6.19.0-support.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 package/igh-ethercat/0002-Linux-6.19.0-support.patch
package/igh-ethercat/0002-Linux-6.19.0-support.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 2c947e90d93d9c5a0129b62744de9720b48d2a17 Mon Sep 17 00:00:00 2001 +From: Nicola Fontana <[email protected]> +Date: Sun, 8 Mar 2026 15:39:41 +0100 +Subject: [PATCH] Linux 6.19.0 support + +Commit 89aec171d9d1ab168e43fcf9754b82e4c0aef9b9 (part of linux kernel +6.19.0-rc1) introduced an arbitrarily sized sockaddr struct to be used +instead of the classical one. + +Closes #200 + +Upstream: https://gitlab.com/etherlab.org/ethercat/-/commit/c42c9cf8bc31c56cc20ae630605495e3f19f3f9a +Signed-off-by: Thomas Petazzoni <[email protected]> +--- + devices/generic.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/devices/generic.c b/devices/generic.c +index f6cef9b5..a08af54b 100644 +--- a/devices/generic.c ++++ b/devices/generic.c +@@ -234,7 +234,11 @@ int ec_gen_device_create_socket( + sa.sll_family = AF_PACKET; + sa.sll_protocol = htons(ETH_P_ETHERCAT); + sa.sll_ifindex = desc->ifindex; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 19, 0) ++ ret = kernel_bind(dev->socket, (struct sockaddr_unsized *) &sa, sizeof(sa)); ++#else + ret = kernel_bind(dev->socket, (struct sockaddr *) &sa, sizeof(sa)); ++#endif + if (ret) { + printk(KERN_ERR PFX "Failed to bind() socket to interface" + " (ret = %i).\n", ret); +-- +2.55.0 +
Signature · 6 lines
2.55.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/igh-ethercat: bump to 1.6.12
The two patches are upstream, so they can be dropped.
From NEWS.md:
Version 1.6.12
- Backported CCAT fixes from Beckhoff
Version 1.6.11
- Protect datagram receiving mechanism against re-ordering
- Prevent creating datagrams that are too large for one frame
- Reacted to stmmac API changed during Linux 6.12
- Adapted debug ring to kernel 5.6+ time API changes
- Use str.read() to read into char* (deprecated in C++20)
- Unload ec_bhf before loading CCAT
- Added cpplint checks in pre-commit and CI tests.
- Improved and formatted markdown documents and added pre-commit checks
Version 1.6.10
- Added RasPi 5 macb (Cadence GEM / RP1) driver for kernel 6.18.
- Added igb and igc for kernel 6.8
- Security fixes against malicious subdevices
- Protected rec_size calculation in FoE.
- Check for malicious EoE frame details.
- Avoid writing invalid MAC onto r8169 NIC on removal
- Fixed insufficient re-allocation of SoE request buffer.
Version 1.6.9
- Protect datagram injection mechanism against re-ordering.
- Fixed for genet and igb drivers for openSUSE Leap 16.0 kernel 6.12.
- tty: Implemented new timer interface since kernel 6.15.
- Do not require .config to exist in kernel sources.
- Fix: Attach slaves before calculating DCs.
- Discard EoE traffic in CoE statemachine, if EoE is disabled.
- Support for Linux 6.19
- Added --with-kmod-dir and --with-ip-cmd configuration switches to specify the paths of the tools used in the ethercatctl script.
- Changed the default path of the ip command to /sbin/ip.
--- ...new-timer-interface-since-kernel-6.1.patch | 63 ------------------- .../0002-Linux-6.19.0-support.patch | 36 ----------- package/igh-ethercat/igh-ethercat.hash | 2 +- package/igh-ethercat/igh-ethercat.mk | 2 +- 4 files changed, 2 insertions(+), 101 deletions(-) delete mode 100644 package/igh-ethercat/0001-tty-Implemented-new-timer-interface-since-kernel-6.1.patch delete mode 100644 package/igh-ethercat/0002-Linux-6.19.0-support.patch
package/igh-ethercat/0001-tty-Implemented-new-timer-interface-since-kernel-6.1.patch deleted +0 -63
@@ -1,63 +0,0 @@ -From e32e99f8b8ec02a340ad3b93cc8abd36781ff568 Mon Sep 17 00:00:00 2001 -From: Bernd Kuhls <[email protected]> -Date: Sun, 15 Mar 2026 20:06:42 +0100 -Subject: [PATCH] tty: Implemented new timer interface since kernel 6.15 - -Upstream: https://gitlab.com/etherlab.org/ethercat/-/merge_requests/187 - -Signed-off-by: Bernd Kuhls <[email protected]> ---- - examples/tty/tty.c | 4 ++++ - tty/module.c | 8 ++++++++ - 2 files changed, 12 insertions(+) - -diff --git a/examples/tty/tty.c b/examples/tty/tty.c -index 4d47a49..e5b4d52 100644 ---- a/examples/tty/tty.c -+++ b/examples/tty/tty.c -@@ -233,7 +233,11 @@ static void __exit cleanup_mini_module(void) - { - printk(KERN_INFO PFX "Stopping...\n"); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0) -+ timer_delete_sync(&timer); -+#else - del_timer_sync(&timer); -+#endif - - free_serial_devices(); - -diff --git a/tty/module.c b/tty/module.c -index 2b7b22b..12ad1e7 100644 ---- a/tty/module.c -+++ b/tty/module.c -@@ -292,7 +292,11 @@ static int ec_tty_init(ec_tty_t *t, int minor, - - static void ec_tty_clear(ec_tty_t *tty) - { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0) -+ timer_delete_sync(&tty->timer); -+#else - del_timer_sync(&tty->timer); -+#endif - tty_unregister_device(tty_driver, tty->minor); - } - -@@ -367,10 +371,14 @@ static void ec_tty_wakeup(struct timer_list *t) - static void ec_tty_wakeup(unsigned long data) - #endif - { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0) -+ ec_tty_t *tty = timer_container_of(tty, t, timer); -+#else - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) - ec_tty_t *tty = from_timer(tty, t, timer); - #else - ec_tty_t *tty = (ec_tty_t *) data; -+#endif - #endif - size_t to_recv; - --- -2.47.3 -
package/igh-ethercat/0002-Linux-6.19.0-support.patch deleted +0 -36
@@ -1,36 +0,0 @@ -From 2c947e90d93d9c5a0129b62744de9720b48d2a17 Mon Sep 17 00:00:00 2001 -From: Nicola Fontana <[email protected]> -Date: Sun, 8 Mar 2026 15:39:41 +0100 -Subject: [PATCH] Linux 6.19.0 support - -Commit 89aec171d9d1ab168e43fcf9754b82e4c0aef9b9 (part of linux kernel -6.19.0-rc1) introduced an arbitrarily sized sockaddr struct to be used -instead of the classical one. - -Closes #200 - -Upstream: https://gitlab.com/etherlab.org/ethercat/-/commit/c42c9cf8bc31c56cc20ae630605495e3f19f3f9a -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - devices/generic.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/devices/generic.c b/devices/generic.c -index f6cef9b5..a08af54b 100644 ---- a/devices/generic.c -+++ b/devices/generic.c -@@ -234,7 +234,11 @@ int ec_gen_device_create_socket( - sa.sll_family = AF_PACKET; - sa.sll_protocol = htons(ETH_P_ETHERCAT); - sa.sll_ifindex = desc->ifindex; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 19, 0) -+ ret = kernel_bind(dev->socket, (struct sockaddr_unsized *) &sa, sizeof(sa)); -+#else - ret = kernel_bind(dev->socket, (struct sockaddr *) &sa, sizeof(sa)); -+#endif - if (ret) { - printk(KERN_ERR PFX "Failed to bind() socket to interface" - " (ret = %i).\n", ret); --- -2.55.0 -
package/igh-ethercat/igh-ethercat.hash +1 -1
@@ -1,4 +1,4 @@ # Locally computed -sha256 e9b97d4a8c3a1224fe9119ada448f4024bacea2ca940a811073170e42d828b76 igh-ethercat-1.6.8.tar.gz +sha256 1fd0c5746980de42b4c1d476d4bd20f5525a9b3fe6e6ff50032bc565c82dc85c igh-ethercat-1.6.12.tar.gz sha256 231f7edcc7352d7734a96eef0b8030f77982678c516876fcb81e25b32d68564c COPYING sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LESSER
package/igh-ethercat/igh-ethercat.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -IGH_ETHERCAT_VERSION = 1.6.8 +IGH_ETHERCAT_VERSION = 1.6.12 IGH_ETHERCAT_SITE = $(call gitlab,etherlab.org,ethercat,$(IGH_ETHERCAT_VERSION)) IGH_ETHERCAT_LICENSE = GPL-2.0 (IgH EtherCAT master), LGPL-2.1 (libraries) IGH_ETHERCAT_LICENSE_FILES = COPYING COPYING.LESSER
Signature · 6 lines
2.55.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] package/igh-ethercat: bump to 1.6.12
Quoted 42 lines · Thomas Petazzoni via buildroot
The two patches are upstream, so they can be dropped.
From NEWS.md:
Version 1.6.12
- Backported CCAT fixes from Beckhoff
Version 1.6.11
- Protect datagram receiving mechanism against re-ordering
- Prevent creating datagrams that are too large for one frame
- Reacted to stmmac API changed during Linux 6.12
- Adapted debug ring to kernel 5.6+ time API changes
- Usestr.read()to read into char* (deprecated in C++20)
- Unloadec_bhfbefore loading CCAT
- Added cpplint checks in pre-commit and CI tests.
- Improved and formatted markdown documents and added pre-commit checksVersion 1.6.10
- Added RasPi 5 macb (Cadence GEM / RP1) driver for kernel 6.18.
- Added igb and igc for kernel 6.8
- Security fixes against malicious subdevices
- Protectedrec_sizecalculation in FoE.
- Check for malicious EoE frame details.
- Avoid writing invalid MAC onto r8169 NIC on removal
- Fixed insufficient re-allocation of SoE request buffer.Version 1.6.9
- Protect datagram injection mechanism against re-ordering.
- Fixed for genet and igb drivers for openSUSE Leap 16.0 kernel 6.12.
- tty: Implemented new timer interface since kernel 6.15.
- Do not require .config to exist in kernel sources.
- Fix: Attach slaves before calculating DCs.
- Discard EoE traffic in CoE statemachine, if EoE is disabled.
- Support for Linux 6.19
- Added--with-kmod-dirand--with-ip-cmdconfiguration switches to specify the paths of the tools used in theethercatctlscript.
- Changed the default path of theipcommand to/sbin/ip.
Quoted 1 line
Signed-off-by Thomas Petazzoni <[email protected]>
Applied to next, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 6 lines · Thomas Petazzoni via buildroot
Fixes:
https://autobuild.buildroot.org/results/9b270904b2f7cf9eaa661c98370c582a61ff2342/
Signed-off-by Thomas Petazzoni <[email protected]>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot