summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-extended/socketcan
diff options
context:
space:
mode:
authorDave Cobbley <david.j.cobbley@linux.intel.com>2018-08-14 20:05:37 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-23 04:26:31 +0300
commiteb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch)
treede291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-oe/recipes-extended/socketcan
parent9c3cf826d853102535ead04cebc2d6023eff3032 (diff)
downloadopenbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-extended/socketcan')
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb12
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils_git.bb16
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/socketcan/canutils/0001-canutils-candump-Add-error-frame-s-handling.patch94
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb20
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.10.bb14
5 files changed, 156 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb b/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb
new file mode 100644
index 0000000000..3c019eb7ce
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb
@@ -0,0 +1,12 @@
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=72d977d697c3c05830fdff00a7448931"
+SRCREV = "d1248b0f22ea8dc3b9d84a61bd35a83309bdb4b4"
+PV = "1.0+git${SRCPV}"
+
+SRC_URI = "git://github.com/hartkopp/can-isotp.git;protocol=https"
+
+S = "${WORKDIR}/git"
+
+inherit module
+
+EXTRA_OEMAKE += "KERNELDIR=${STAGING_KERNEL_DIR}"
diff --git a/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils_git.bb b/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils_git.bb
new file mode 100644
index 0000000000..a2d62c3667
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils_git.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Linux CAN network development utilities"
+DESCRIPTION = "Linux CAN network development"
+LICENSE = "GPLv2 & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://include/linux/can.h;endline=43;md5=390a2c9a3c5e3595a069ac1436553ee7"
+
+DEPENDS = "libsocketcan"
+
+SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=git;branch=master"
+SRCREV = "4c8fb05cb4d6ddcd67299008db54af423f86fd05"
+
+PV = "0.0+gitr${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
diff --git a/meta-openembedded/meta-oe/recipes-extended/socketcan/canutils/0001-canutils-candump-Add-error-frame-s-handling.patch b/meta-openembedded/meta-oe/recipes-extended/socketcan/canutils/0001-canutils-candump-Add-error-frame-s-handling.patch
new file mode 100644
index 0000000000..fcc38e0617
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/socketcan/canutils/0001-canutils-candump-Add-error-frame-s-handling.patch
@@ -0,0 +1,94 @@
+From bab595e38295dcafcfc17a011d3d51f2df1618e6 Mon Sep 17 00:00:00 2001
+From: AnilKumar Ch <anilkumar@ti.com>
+Date: Tue, 10 Jan 2012 18:55:11 +0530
+Subject: [PATCH] canutils: candump: Add error frame's handling
+
+This patch adds the error handling capability to candump utility
+by adding error flags for displaying all kind of error frames
+like tx_timeout, lost arbitration, controller problems, buserrors,
+bus warnings etc.
+
+Usage of candump for error frame display on console:
+candump [<can-interface>] [Options]
+Ex: candump can0 --error
+
+This patch is created on top of canutils-4.0.6 tag from
+http://git.pengutronix.de/?p=tools/canutils.git
+
+Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+Upstream-Status: Backport
+
+ src/candump.c | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/src/candump.c b/src/candump.c
+index 259d442..c16425b 100644
+--- a/src/candump.c
++++ b/src/candump.c
+@@ -20,6 +20,7 @@
+
+ #include <linux/can.h>
+ #include <linux/can/raw.h>
++#include <linux/can/error.h>
+
+ extern int optind, opterr, optopt;
+
+@@ -40,6 +41,7 @@ static void print_usage(char *prg)
+ " -p, --protocol=PROTO\t" "CAN protocol (default CAN_RAW = %d)\n"
+ " --filter=id:mask[:id:mask]...\n"
+ "\t\t\t" "apply filter\n"
++ " -e, --error\t\t" "dump error frames along with data frames\n"
+ " -h, --help\t\t" "this help\n"
+ " -o <filename>\t\t" "output into filename\n"
+ " -d\t\t\t" "daemonize\n"
+@@ -86,6 +88,11 @@ int main(int argc, char **argv)
+ int nbytes, i;
+ int opt, optdaemon = 0;
+ uint32_t id, mask;
++ int error = 0;
++ can_err_mask_t err_mask = (CAN_ERR_TX_TIMEOUT | CAN_ERR_LOSTARB |
++ CAN_ERR_CRTL | CAN_ERR_PROT |
++ CAN_ERR_TRX | CAN_ERR_ACK | CAN_ERR_BUSOFF |
++ CAN_ERR_BUSERROR);
+
+ signal(SIGPIPE, SIG_IGN);
+
+@@ -95,6 +102,7 @@ int main(int argc, char **argv)
+ { "protocol", required_argument, 0, 'p' },
+ { "type", required_argument, 0, 't' },
+ { "filter", required_argument, 0, FILTER_OPTION },
++ { "error", no_argument, 0, 'e' },
+ { "version", no_argument, 0, VERSION_OPTION},
+ { 0, 0, 0, 0},
+ };
+@@ -121,6 +129,10 @@ int main(int argc, char **argv)
+ proto = strtoul(optarg, NULL, 0);
+ break;
+
++ case 'e':
++ error = 1;
++ break;
++
+ case 'o':
+ optout = optarg;
+ break;
+@@ -186,6 +198,14 @@ int main(int argc, char **argv)
+ }
+ }
+
++ if (error) {
++ if (setsockopt(s, SOL_CAN_RAW, CAN_RAW_ERR_FILTER, &err_mask,
++ sizeof(err_mask)) != 0) {
++ perror("setsockopt");
++ exit(1);
++ }
++ }
++
+ if (optdaemon)
+ daemon(1, 0);
+ else {
+--
+1.8.3.1
+
diff --git a/meta-openembedded/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb b/meta-openembedded/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb
new file mode 100644
index 0000000000..e1508af857
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb
@@ -0,0 +1,20 @@
+SUMMARY = "canutils (PTX flavour)"
+HOMEPAGE = "http://www.pengutronix.de"
+SECTION = "console/network"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+DEPENDS = "libsocketcan"
+
+SRCREV = "299dff7f5322bf0348dcdd60071958ebedf5f09d"
+SRC_URI = "git://git.pengutronix.de/git/tools/canutils.git;protocol=git \
+ file://0001-canutils-candump-Add-error-frame-s-handling.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+# Busybox ip doesn't support can interface configuration, use the real thing
+RDEPENDS_${PN} += "iproute2"
diff --git a/meta-openembedded/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.10.bb b/meta-openembedded/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.10.bb
new file mode 100644
index 0000000000..60ca580168
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.10.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Control basic functions in socketcan from userspace"
+HOMEPAGE = "http://www.pengutronix.de"
+SECTION = "libs/network"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://src/libsocketcan.c;beginline=3;endline=17;md5=97e38adced4385d8fba1ae2437cedee1"
+
+SRCREV = "51f1610160a1707f026f8c2d714a6f7aa3ca232b"
+
+SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig