Skip to contentSkip to conversation

can-utils: Fix build with kernel headers >= 5.2

PATCH New Khem Raj 1 participant 5 messages Aug 29, 2019

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/5 can-utils: Fix build with kernel headers >= 5.2

---
 ...o-find-SIOCGSTAMP-with-latest-kernel.patch | 106 ++++++++++++++++++
 .../socketcan/can-utils_git.bb                |   4 +-
 2 files changed, 109 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/socketcan/can-utils/0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch
meta-oe/recipes-extended/socketcan/can-utils/0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch new file +106 -0
new file mode 100644
index 0000000000..cbf3aee10f
@@ -0,0 +1,106 @@
+From 20981c8a328747f823b7eef68d0c2812b3eaed30 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Sun, 14 Jul 2019 21:50:43 +0200
+Subject: [PATCH] fix include to find SIOCGSTAMP with latest kernel
+
+In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115
+the asm-generic/sockios.h header no longer defines SIOCGSTAMP.
+Instead it provides only SIOCGSTAMP_OLD.
+
+The linux/sockios.h header now defines SIOCGSTAMP using either
+SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. This linux only
+header file is not pulled so we get a build failure.
+
+canlogserver.c: In function 'main':
+canlogserver.c:404:21: error: 'SIOCGSTAMP' undeclared (first use in this function); did you mean 'SIOCGRARP'?
+     if (ioctl(s[i], SIOCGSTAMP, &tv) < 0)
+                     ^~~~~~~~~~
+                     SIOCGRARP
+canlogserver.c:404:21: note: each undeclared identifier is reported only once for each function it appears in
+
+Fixes:
+ - http://autobuild.buildroot.org/results/363de7d9bf433be8bc47ba4ee52ae0bb80fa9021
+
+Upstream-Status: Backport [https://github.com/linux-can/can-utils/commit/e9590b1ca75d360eaf3211bebd86058214d48064]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ canlogserver.c | 1 +
+ cansniffer.c   | 1 +
+ isotpdump.c    | 1 +
+ isotpperf.c    | 1 +
+ isotpsniffer.c | 1 +
+ slcanpty.c     | 1 +
+ 6 files changed, 6 insertions(+)
+
+diff --git a/canlogserver.c b/canlogserver.c
+index e3350b7..f53165c 100644
+--- a/canlogserver.c
++++ b/canlogserver.c
+@@ -61,6 +61,7 @@
+ 
+ #include <linux/can.h>
+ #include <linux/can/raw.h>
++#include <linux/sockios.h>
+ #include <signal.h>
+ #include <errno.h>
+ 
+diff --git a/cansniffer.c b/cansniffer.c
+index 7b0a3fa..bf7d72e 100644
+--- a/cansniffer.c
++++ b/cansniffer.c
+@@ -61,6 +61,7 @@
+ 
+ #include <linux/can.h>
+ #include <linux/can/bcm.h>
++#include <linux/sockios.h>
+ 
+ #include "terminal.h"
+ 
+diff --git a/isotpdump.c b/isotpdump.c
+index b2b650a..36d8af3 100644
+--- a/isotpdump.c
++++ b/isotpdump.c
+@@ -55,6 +55,7 @@
+ 
+ #include <linux/can.h>
+ #include <linux/can/raw.h>
++#include <linux/sockios.h>
+ #include "terminal.h"
+ 
+ #define NO_CAN_ID 0xFFFFFFFFU
+diff --git a/isotpperf.c b/isotpperf.c
+index db3a2b7..5852a57 100644
+--- a/isotpperf.c
++++ b/isotpperf.c
+@@ -56,6 +56,7 @@
+ 
+ #include <linux/can.h>
+ #include <linux/can/raw.h>
++#include <linux/sockios.h>
+ 
+ #define NO_CAN_ID 0xFFFFFFFFU
+ #define PERCENTRES 2 /* resolution in percent for bargraph */
+diff --git a/isotpsniffer.c b/isotpsniffer.c
+index f42e18b..d7a4c66 100644
+--- a/isotpsniffer.c
++++ b/isotpsniffer.c
+@@ -55,6 +55,7 @@
+ 
+ #include <linux/can.h>
+ #include <linux/can/isotp.h>
++#include <linux/sockios.h>
+ #include "terminal.h"
+ 
+ #define NO_CAN_ID 0xFFFFFFFFU
+diff --git a/slcanpty.c b/slcanpty.c
+index 431ca68..7dfaf5c 100644
+--- a/slcanpty.c
++++ b/slcanpty.c
+@@ -40,6 +40,7 @@
+ 
+ #include <linux/can.h>
+ #include <linux/can/raw.h>
++#include <linux/sockios.h>
+ 
+ /* maximum rx buffer len: extended CAN frame with timestamp */
+ #define SLC_MTU (sizeof("T1111222281122334455667788EA5F\r")+1)
meta-oe/recipes-extended/socketcan/can-utils_git.bb +3 -1
index a2d62c3667..db5055fedd 100644
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://include/linux/can.h;endline=43;md5=390a2c9a3c5e3595a0
 
 DEPENDS = "libsocketcan"
 
-SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=git;branch=master"
+SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=git;branch=master \
+           file://0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch \
+           "
 SRCREV = "4c8fb05cb4d6ddcd67299008db54af423f86fd05"
 
 PV = "0.0+gitr${SRCPV}"
Signature · 1 line
2.23.0
author
#1 lore raw

PATCH 2/5 android-tools: update license md5sum for BSD-2-Clause

The text has changed in OE-Core common licenses

---
 .../recipes-devtools/android-tools/android-tools_5.1.1.r37.bb   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb +1 -1
index d84fcaecc9..34b0b7a3b6 100644
@@ -4,7 +4,7 @@ LICENSE = "Apache-2.0 & GPL-2.0 & BSD-2-Clause & BSD-3-Clause"
 LIC_FILES_CHKSUM = " \
     file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10 \
     file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
-    file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=8bef8e6712b1be5aa76af1ebde9d6378 \
+    file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=cb641bc04cda31daea161b1bc15da69f \
     file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \
 "
 DEPENDS = "libbsd libpcre zlib libcap"
Signature · 1 line
2.23.0
author
#2 lore raw

PATCH 3/5 can-isotp: Update to latest tip

In reply to Khem Raj

Fixes build with 5.2 kernel headers

For complete changes see [1]

[1] https://github.com/hartkopp/can-isotp/compare/6003f999...b31bce9

---
 meta-oe/recipes-extended/socketcan/can-isotp_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-extended/socketcan/can-isotp_git.bb +1 -1
index 6ce3cab112..5df44f21f4 100644
@@ -1,6 +1,6 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=72d977d697c3c05830fdff00a7448931"
-SRCREV = "6003f9997587e6a563cebf1f246bcd0eb6deff3d"
+SRCREV = "b31bce98d65f894aad6427bcf6f3f7822e261a59"
 PV = "1.0+git${SRCPV}"
 
 SRC_URI = "git://github.com/hartkopp/can-isotp.git;protocol=https"
Signature · 1 line
2.23.0
author
#3 lore raw

PATCH 4/5 linux-atm: Fix build with kernel headers 5.2+

In reply to Khem Raj
---
 ...-Include-linux-sockios.h-for-SIOCGST.patch | 59 +++++++++++++++++++
 .../linux-atm/linux-atm_2.5.2.bb              |  1 +
 2 files changed, 60 insertions(+)
 create mode 100644 meta-networking/recipes-support/linux-atm/linux-atm/0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch
meta-networking/recipes-support/linux-atm/linux-atm/0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch new file +59 -0
new file mode 100644
index 0000000000..a54869db89
@@ -0,0 +1,59 @@
+From 4456e13880803a300e4b6f263ad22a37481b5df5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 29 Aug 2019 09:33:43 -0700
+Subject: [PATCH] saaldump,atmdump: Include linux/sockios.h for SIOCGSTAMP
+
+In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115
+the asm-generic/sockios.h header no longer defines SIOCGSTAMP.
+Instead it provides only SIOCGSTAMP_OLD.
+
+The linux/sockios.h header now defines SIOCGSTAMP using either
+SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. This linux only
+header file is not pulled so we get a build failure.
+
+Fixes
+../../../linux-atm-2.5.2/src/maint/atmdump.c:142:18: error: use of undeclared identifier 'SIOCGSTAMP'
+            if (ioctl(s,SIOCGSTAMP,&stamp) < 0) {
+                        ^
+1 error generated.
+make[3]: *** [Makefile:623: atmdump.o] Error 1
+make[3]: *** Waiting for unfinished jobs....
+../../../linux-atm-2.5.2/src/maint/saaldump.c:169:14: error: use of undeclared identifier 'SIOCGSTAMP'
+        if (ioctl(s,SIOCGSTAMP,&stamp) < 0) {
+                    ^
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/maint/atmdump.c  | 2 +-
+ src/maint/saaldump.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/maint/atmdump.c b/src/maint/atmdump.c
+index 8b17826..9e4853b 100644
+--- a/src/maint/atmdump.c
++++ b/src/maint/atmdump.c
+@@ -5,7 +5,7 @@
+ #if HAVE_CONFIG_H
+ #include <config.h>
+ #endif
+-
++#include <linux/sockios.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <unistd.h>
+diff --git a/src/maint/saaldump.c b/src/maint/saaldump.c
+index 83bdde9..69429a8 100644
+--- a/src/maint/saaldump.c
++++ b/src/maint/saaldump.c
+@@ -5,7 +5,7 @@
+ #if HAVE_CONFIG_H
+ #include <config.h>
+ #endif
+-
++#include <linux/sockios.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+-- 
+2.23.0
+
meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb +1 -0
index 9ed7ca613b..e594906c33 100644
@@ -12,6 +12,7 @@ SRC_URI = "http://nchc.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BPN}-${P
            file://0001-ttcp-Add-printf-format-string.patch \
            file://0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch \
            file://0001-IFNAMSIZ-is-defined-in-net-if.h.patch \
+           file://0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch \
 "
 
 SRC_URI_append_libc-musl = " file://musl-no-on_exit.patch"
Signature · 1 line
2.23.0
author
#4 lore raw

PATCH 5/5 drbd: Upgrade to 9.0.19-1

In reply to Khem Raj
---
 .../drbd/{drbd_9.0.18-1.bb => drbd_9.0.19-1.bb}              | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
 rename meta-networking/recipes-support/drbd/{drbd_9.0.18-1.bb => drbd_9.0.19-1.bb} (84%)
meta-networking/recipes-support/drbd/drbd_9.0.19-1.bb renamed from meta-networking/recipes-support/drbd/drbd_9.0.18-1.bb +2 -3
similarity index 84%
rename from meta-networking/recipes-support/drbd/drbd_9.0.18-1.bb
rename to meta-networking/recipes-support/drbd/drbd_9.0.19-1.bb
index 6fb621a1f4..6683781af5 100644
@@ -11,9 +11,8 @@ DEPENDS = "virtual/kernel"
 SRC_URI = "http://www.linbit.com/downloads/drbd/9.0/drbd-${PV}.tar.gz \
            file://check_existence_of_modules_before_installing.patch \
            "
-
-SRC_URI[md5sum] = "f2e6eaa92861252af0b564f0100f1859"
-SRC_URI[sha256sum] = "d6b4188ed01d8555c78b04b5e31532d5990ca98bf063230f3e949ee8a7338d58"
+SRC_URI[md5sum] = "bd1202eaaf81641752d0c9b003b10f6c"
+SRC_URI[sha256sum] = "5b3d2bcb99542940e40af903dea783cf04524e9f41cc530e210d2c15ef84fa58"
 
 inherit module
 
Signature · 1 line
2.23.0