Complete Yocto mirror with license table for TQMa6UL (2038-compliance)

- 264 license table entries with exact download URLs (224/264 resolved)
- Complete sources/ directory with all BitBake recipes
- Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl)
- Full traceability for Softwarefreigabeantrag
- GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4
- License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
Siggi (OpenClaw Agent)
2026-03-01 20:58:18 +00:00
commit 16accb6b24
15086 changed files with 1292356 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=72d977d697c3c05830fdff00a7448931"
SRCREV = "7626d0a0707391970080d493ce69638719938da7"
PV = "1.0+git"
SRC_URI = "git://github.com/hartkopp/can-isotp.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
inherit module
EXTRA_OEMAKE += "KERNELDIR=${STAGING_KERNEL_DIR}"
do_install:append() {
install -Dm 644 ${S}/include/uapi/linux/can/isotp.h ${D}${includedir}/linux/can/isotp.h
}
SKIP_RECIPE[can-isotp] ?= "Not needed with kernel 5.10+"

View File

@@ -0,0 +1,70 @@
From 7d59157d4d570ba994f7dd07243ac5fb1c541410 Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Wed, 27 Sep 2023 16:15:52 +0200
Subject: [PATCH] lib: snprintf_can_error_frame(): don't bail out if
CAN_ERR_CNT is set
If CAN_ERR_CNT is set, the snprintf_can_error_frame() bails out, as it
cannot decode CAN_ERR_CNT.
Fixes: 21fb43532e80 ("lib: snprintf_can_error_frame: print counter errors if CAN_ERR_CNT is set")
Upstream-Status: Backport [https://github.com/linux-can/can-utils/commit/7d59157d4d570ba994f7dd07243ac5fb1c541410]
---
lib.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/lib.c b/lib.c
index d665c69..0201e94 100644
--- a/lib.c
+++ b/lib.c
@@ -499,6 +499,7 @@ static const char *error_classes[] = {
"bus-off",
"bus-error",
"restarted-after-bus-off",
+ "error-counter-tx-rx",
};
static const char *controller_problems[] = {
@@ -636,6 +637,19 @@ static int snprintf_error_prot(char *buf, size_t len, const struct canfd_frame *
return n;
}
+static int snprintf_error_cnt(char *buf, size_t len, const struct canfd_frame *cf)
+{
+ int n = 0;
+
+ if (len <= 0)
+ return 0;
+
+ n += snprintf(buf + n, len - n, "{{%d}{%d}}",
+ cf->data[6], cf->data[7]);
+
+ return n;
+}
+
void snprintf_can_error_frame(char *buf, size_t len, const struct canfd_frame *cf,
const char* sep)
{
@@ -679,13 +693,14 @@ void snprintf_can_error_frame(char *buf, size_t len, const struct canfd_frame *c
n += snprintf_error_ctrl(buf + n, len - n, cf);
if (mask == CAN_ERR_PROT)
n += snprintf_error_prot(buf + n, len - n, cf);
+ if (mask == CAN_ERR_CNT)
+ n += snprintf_error_cnt(buf + n, len - n, cf);
classes++;
}
}
- if (cf->can_id & CAN_ERR_CNT || cf->data[6] || cf->data[7]) {
- n += snprintf(buf + n, len - n, "%s", sep);
- n += snprintf(buf + n, len - n, "error-counter-tx-rx{{%d}{%d}}",
- cf->data[6], cf->data[7]);
+ if (!(cf->can_id & CAN_ERR_CNT) && (cf->data[6] || cf->data[7])) {
+ n += snprintf(buf + n, len - n, "%serror-counter-tx-rx", sep);
+ n += snprintf_error_cnt(buf + n, len - n, cf);
}
}
--
2.43.0

View File

@@ -0,0 +1,422 @@
From 05eb82fc959328f851d4b939d394529ac377de19 Mon Sep 17 00:00:00 2001
From: TyK <tisyang@gmail.com>
Date: Mon, 27 Nov 2023 10:59:21 +0800
Subject: [PATCH] timestamp formatting: always use 64-bit for timestamp
formatting.
Using C99 `unsigned long long` to format `struct timeval`'s `tv_sec`
and `tv_usec`, fix incorrect print on some 32bit platform which
are using time64.
Upstream-Status: Backport [https://github.com/linux-can/can-utils/commit/ceda93bd5c56927c72d48dcaa30e17d6ecea86b8]
---
asc2log.c | 38 +++++++++++++++++++++++---------------
candump.c | 6 +++---
canlogserver.c | 4 ++--
canplayer.c | 11 +++++++----
isotpdump.c | 8 ++++----
isotpperf.c | 4 ++--
isotpsniffer.c | 6 +++---
j1939cat.c | 4 ++--
j1939spy.c | 6 +++---
log2asc.c | 11 +++++++----
slcanpty.c | 4 ++--
11 files changed, 58 insertions(+), 44 deletions(-)
diff --git a/asc2log.c b/asc2log.c
index ea6b486..4eb3609 100644
--- a/asc2log.c
+++ b/asc2log.c
@@ -73,7 +73,7 @@ void print_usage(char *prg)
void prframe(FILE *file, struct timeval *tv, int dev, struct canfd_frame *cf, unsigned int max_dlen, char *extra_info) {
- fprintf(file, "(%lu.%06lu) ", tv->tv_sec, tv->tv_usec);
+ fprintf(file, "(%llu.%06llu) ", (unsigned long long)tv->tv_sec, (unsigned long long)tv->tv_usec);
if (dev > 0)
fprintf(file, "can%d ", dev-1);
@@ -141,11 +141,14 @@ void eval_can(char* buf, struct timeval *date_tvp, char timestamps, char base, i
char dir[3]; /* 'Rx' or 'Tx' plus terminating zero */
char *extra_info;
int i, items;
+ unsigned long long sec, usec;
/* check for ErrorFrames */
- if (sscanf(buf, "%lu.%lu %d %s",
- &read_tv.tv_sec, &read_tv.tv_usec,
+ if (sscanf(buf, "%llu.%llu %d %s",
+ &sec, &usec,
&interface, tmp1) == 4) {
+ read_tv.tv_sec = sec;
+ read_tv.tv_usec = usec;
if (!strncmp(tmp1, "ErrorFrame", strlen("ErrorFrame"))) {
@@ -165,18 +168,20 @@ void eval_can(char* buf, struct timeval *date_tvp, char timestamps, char base, i
/* check for CAN frames with (hexa)decimal values */
if (base == 'h')
- items = sscanf(buf, "%lu.%lu %d %s %2s %c %x %x %x %x %x %x %x %x %x",
- &read_tv.tv_sec, &read_tv.tv_usec, &interface,
+ items = sscanf(buf, "%llu.%llu %d %s %2s %c %x %x %x %x %x %x %x %x %x",
+ &sec, &usec, &interface,
tmp1, dir, &rtr, &dlc,
&data[0], &data[1], &data[2], &data[3],
&data[4], &data[5], &data[6], &data[7]);
else
- items = sscanf(buf, "%lu.%lu %d %s %2s %c %x %d %d %d %d %d %d %d %d",
- &read_tv.tv_sec, &read_tv.tv_usec, &interface,
+ items = sscanf(buf, "%llu.%llu %d %s %2s %c %x %d %d %d %d %d %d %d %d",
+ &sec, &usec, &interface,
tmp1, dir, &rtr, &dlc,
&data[0], &data[1], &data[2], &data[3],
&data[4], &data[5], &data[6], &data[7]);
+ read_tv.tv_sec = sec;
+ read_tv.tv_usec = usec;
if (items < 7 ) /* make sure we've read the dlc */
return;
@@ -246,6 +251,7 @@ void eval_canfd(char* buf, struct timeval *date_tvp, char timestamps, int dplace
char *extra_info;
char *ptr;
int i;
+ unsigned long long sec, usec;
/* The CANFD format is mainly in hex representation but <DataLength>
and probably some content we skip anyway. Don't trust the docs! */
@@ -255,19 +261,21 @@ void eval_canfd(char* buf, struct timeval *date_tvp, char timestamps, int dplace
100000 214 223040 80000000 46500250 460a0250 20011736 20010205 */
/* check for valid line without symbolic name */
- if (sscanf(buf, "%lu.%lu %*s %d %2s %s %hhx %hhx %x %d ",
- &read_tv.tv_sec, &read_tv.tv_usec, &interface,
+ if (sscanf(buf, "%llu.%llu %*s %d %2s %s %hhx %hhx %x %d ",
+ &sec, &usec, &interface,
dir, tmp1, &brs, &esi, &dlc, &dlen) != 9) {
/* check for valid line with a symbolic name */
- if (sscanf(buf, "%lu.%lu %*s %d %2s %s %*s %hhx %hhx %x %d ",
- &read_tv.tv_sec, &read_tv.tv_usec, &interface,
+ if (sscanf(buf, "%llu.%llu %*s %d %2s %s %*s %hhx %hhx %x %d ",
+ &sec, &usec, &interface,
dir, tmp1, &brs, &esi, &dlc, &dlen) != 9) {
/* no valid CANFD format pattern */
return;
}
}
+ read_tv.tv_sec = sec;
+ read_tv.tv_usec = usec;
/* check for allowed (unsigned) value ranges */
if ((dlen > CANFD_MAX_DLEN) || (dlc > CANFD_MAX_DLC) ||
@@ -427,12 +435,12 @@ int main(int argc, char **argv)
FILE *infile = stdin;
FILE *outfile = stdout;
static int verbose;
- static struct timeval tmp_tv; /* tmp frame timestamp from ASC file */
static struct timeval date_tv; /* date of the ASC file */
static int dplace; /* decimal place 4, 5 or 6 or uninitialized */
static char base; /* 'd'ec or 'h'ex */
static char timestamps; /* 'a'bsolute or 'r'elative */
int opt;
+ unsigned long long sec, usec;
while ((opt = getopt(argc, argv, "I:O:v?")) != -1) {
switch (opt) {
@@ -505,12 +513,12 @@ int main(int argc, char **argv)
gettimeofday(&date_tv, NULL);
}
if (verbose)
- printf("date %lu => %s", date_tv.tv_sec, ctime(&date_tv.tv_sec));
+ printf("date %llu => %s", (unsigned long long)date_tv.tv_sec, ctime(&date_tv.tv_sec));
continue;
}
/* check for decimal places length in valid CAN frames */
- if (sscanf(buf, "%lu.%s %s ", &tmp_tv.tv_sec, tmp2,
+ if (sscanf(buf, "%llu.%s %s ", &sec, tmp2,
tmp1) != 3)
continue; /* dplace remains zero until first found CAN frame */
@@ -529,7 +537,7 @@ int main(int argc, char **argv)
/* so try to get CAN frames and ErrorFrames and convert them */
/* check classic CAN format or the CANFD tag which can take both types */
- if (sscanf(buf, "%lu.%lu %s ", &tmp_tv.tv_sec, &tmp_tv.tv_usec, tmp1) == 3){
+ if (sscanf(buf, "%llu.%llu %s ", &sec, &usec, tmp1) == 3){
if (!strncmp(tmp1, "CANFD", 5))
eval_canfd(buf, &date_tv, timestamps, dplace, outfile);
else
diff --git a/candump.c b/candump.c
index 82f75b1..4ae8864 100644
--- a/candump.c
+++ b/candump.c
@@ -224,7 +224,7 @@ static inline void sprint_timestamp(const char timestamp, const struct timeval *
{
switch (timestamp) {
case 'a': /* absolute with timestamp */
- sprintf(ts_buffer, "(%010lu.%06lu) ", tv->tv_sec, tv->tv_usec);
+ sprintf(ts_buffer, "(%010llu.%06llu) ", (unsigned long long)tv->tv_sec, (unsigned long long)tv->tv_usec);
break;
case 'A': /* absolute with date */
@@ -234,7 +234,7 @@ static inline void sprint_timestamp(const char timestamp, const struct timeval *
tm = *localtime(&tv->tv_sec);
strftime(timestring, 24, "%Y-%m-%d %H:%M:%S", &tm);
- sprintf(ts_buffer, "(%s.%06lu) ", timestring, tv->tv_usec);
+ sprintf(ts_buffer, "(%s.%06llu) ", timestring, (unsigned long long)tv->tv_usec);
}
break;
@@ -251,7 +251,7 @@ static inline void sprint_timestamp(const char timestamp, const struct timeval *
diff.tv_sec--, diff.tv_usec += 1000000;
if (diff.tv_sec < 0)
diff.tv_sec = diff.tv_usec = 0;
- sprintf(ts_buffer, "(%03lu.%06lu) ", diff.tv_sec, diff.tv_usec);
+ sprintf(ts_buffer, "(%03llu.%06llu) ", (unsigned long long)diff.tv_sec, (unsigned long long)diff.tv_usec);
if (timestamp == 'd')
*last_tv = *tv; /* update for delta calculation */
diff --git a/canlogserver.c b/canlogserver.c
index 51d548f..349d64e 100644
--- a/canlogserver.c
+++ b/canlogserver.c
@@ -408,8 +408,8 @@ int main(int argc, char **argv)
idx = idx2dindex(addr.can_ifindex, s[i]);
- sprintf(temp, "(%lu.%06lu) %*s ",
- tv.tv_sec, tv.tv_usec, max_devname_len, devname[idx]);
+ sprintf(temp, "(%llu.%06llu) %*s ",
+ (unsigned long long)tv.tv_sec, (unsigned long long)tv.tv_usec, max_devname_len, devname[idx]);
sprint_canframe(temp+strlen(temp), &frame, 0, maxdlen);
strcat(temp, "\n");
diff --git a/canplayer.c b/canplayer.c
index 51adc77..96346ce 100644
--- a/canplayer.c
+++ b/canplayer.c
@@ -259,6 +259,7 @@ int main(int argc, char **argv)
int txidx; /* sendto() interface index */
int eof, txmtu, i, j;
char *fret;
+ unsigned long long sec, usec;
while ((opt = getopt(argc, argv, "I:l:tin:g:s:xv?")) != -1) {
switch (opt) {
@@ -419,11 +420,12 @@ int main(int argc, char **argv)
eof = 0;
- if (sscanf(buf, "(%lu.%lu) %s %s", &log_tv.tv_sec, &log_tv.tv_usec,
- device, ascframe) != 4) {
+ if (sscanf(buf, "(%llu.%llu) %s %s", &sec, &usec, device, ascframe) != 4) {
fprintf(stderr, "incorrect line format in logfile\n");
return 1;
}
+ log_tv.tv_sec = sec;
+ log_tv.tv_usec = usec;
if (use_timestamps) { /* throttle sending due to logfile timestamps */
@@ -505,11 +507,12 @@ int main(int argc, char **argv)
break;
}
- if (sscanf(buf, "(%lu.%lu) %s %s", &log_tv.tv_sec, &log_tv.tv_usec,
- device, ascframe) != 4) {
+ if (sscanf(buf, "(%llu.%llu) %s %s", &sec, &usec, device, ascframe) != 4) {
fprintf(stderr, "incorrect line format in logfile\n");
return 1;
}
+ log_tv.tv_sec = sec;
+ log_tv.tv_usec = usec;
/*
* ensure the fractions of seconds are 6 decimal places long to catch
diff --git a/isotpdump.c b/isotpdump.c
index d22725e..e9e96ce 100644
--- a/isotpdump.c
+++ b/isotpdump.c
@@ -361,7 +361,7 @@ int main(int argc, char **argv)
switch (timestamp) {
case 'a': /* absolute with timestamp */
- printf("(%lu.%06lu) ", tv.tv_sec, tv.tv_usec);
+ printf("(%llu.%06llu) ", (unsigned long long)tv.tv_sec, (unsigned long long)tv.tv_usec);
break;
case 'A': /* absolute with date */
@@ -372,7 +372,7 @@ int main(int argc, char **argv)
tm = *localtime(&tv.tv_sec);
strftime(timestring, 24, "%Y-%m-%d %H:%M:%S",
&tm);
- printf("(%s.%06lu) ", timestring, tv.tv_usec);
+ printf("(%s.%06llu) ", timestring, (unsigned long long)tv.tv_usec);
} break;
case 'd': /* delta */
@@ -388,8 +388,8 @@ int main(int argc, char **argv)
diff.tv_sec--, diff.tv_usec += 1000000;
if (diff.tv_sec < 0)
diff.tv_sec = diff.tv_usec = 0;
- printf("(%lu.%06lu) ", diff.tv_sec,
- diff.tv_usec);
+ printf("(%llu.%06llu) ", (unsigned long long)diff.tv_sec,
+ (unsigned long long)diff.tv_usec);
if (timestamp == 'd')
last_tv =
diff --git a/isotpperf.c b/isotpperf.c
index 154d5cd..ad0dc2a 100644
--- a/isotpperf.c
+++ b/isotpperf.c
@@ -403,9 +403,9 @@ int main(int argc, char **argv)
/* check devisor to be not zero */
if (diff_tv.tv_sec * 1000 + diff_tv.tv_usec / 1000){
- printf("%lu.%06lus ", diff_tv.tv_sec, diff_tv.tv_usec);
+ printf("%llu.%06llus ", (unsigned long long)diff_tv.tv_sec, (unsigned long long)diff_tv.tv_usec);
printf("=> %lu byte/s", (fflen * 1000) /
- (diff_tv.tv_sec * 1000 + diff_tv.tv_usec / 1000));
+ (unsigned long)(diff_tv.tv_sec * 1000 + diff_tv.tv_usec / 1000));
} else
printf("(no time available) ");
diff --git a/isotpsniffer.c b/isotpsniffer.c
index 2b6de40..f976149 100644
--- a/isotpsniffer.c
+++ b/isotpsniffer.c
@@ -101,7 +101,7 @@ void printbuf(unsigned char *buffer, int nbytes, int color, int timestamp,
switch (timestamp) {
case 'a': /* absolute with timestamp */
- printf("(%lu.%06lu) ", tv->tv_sec, tv->tv_usec);
+ printf("(%llu.%06llu) ", (unsigned long long)tv->tv_sec, (unsigned long long)tv->tv_usec);
break;
case 'A': /* absolute with date */
@@ -111,7 +111,7 @@ void printbuf(unsigned char *buffer, int nbytes, int color, int timestamp,
tm = *localtime(&tv->tv_sec);
strftime(timestring, 24, "%Y-%m-%d %H:%M:%S", &tm);
- printf("(%s.%06lu) ", timestring, tv->tv_usec);
+ printf("(%s.%06llu) ", timestring, (unsigned long long)tv->tv_usec);
}
break;
@@ -128,7 +128,7 @@ void printbuf(unsigned char *buffer, int nbytes, int color, int timestamp,
diff.tv_sec--, diff.tv_usec += 1000000;
if (diff.tv_sec < 0)
diff.tv_sec = diff.tv_usec = 0;
- printf("(%lu.%06lu) ", diff.tv_sec, diff.tv_usec);
+ printf("(%llu.%06llu) ", (unsigned long long)diff.tv_sec, (unsigned long long)diff.tv_usec);
if (timestamp == 'd')
*last_tv = *tv; /* update for delta calculation */
diff --git a/j1939cat.c b/j1939cat.c
index 4234aad..238c4ff 100644
--- a/j1939cat.c
+++ b/j1939cat.c
@@ -148,8 +148,8 @@ static void j1939cat_print_timestamp(struct j1939cat_priv *priv, const char *nam
if (!(cur->tv_sec | cur->tv_nsec))
return;
- fprintf(stderr, " %s: %lu s %lu us (seq=%03u, send=%07u)",
- name, cur->tv_sec, cur->tv_nsec / 1000,
+ fprintf(stderr, " %s: %llu s %llu us (seq=%03u, send=%07u)",
+ name, (unsigned long long)cur->tv_sec, (unsigned long long)cur->tv_nsec / 1000,
stats->tskey, stats->send);
fprintf(stderr, "\n");
diff --git a/j1939spy.c b/j1939spy.c
index e49ed14..56950ea 100644
--- a/j1939spy.c
+++ b/j1939spy.c
@@ -268,14 +268,14 @@ int main(int argc, char **argv)
goto abs_time;
} else if ('a' == s.time) {
abs_time:
- printf("(%lu.%04lu)", tdut.tv_sec, tdut.tv_usec / 100);
+ printf("(%llu.%04llu)", (unsigned long long)tdut.tv_sec, (unsigned long long)tdut.tv_usec / 100);
} else if ('A' == s.time) {
struct tm tm;
tm = *localtime(&tdut.tv_sec);
- printf("(%04u%02u%02uT%02u%02u%02u.%04lu)",
+ printf("(%04u%02u%02uT%02u%02u%02u.%04llu)",
tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec,
- tdut.tv_usec/100);
+ (unsigned long long)tdut.tv_usec/100);
}
}
printf(" %s ", libj1939_addr2str(&src));
diff --git a/log2asc.c b/log2asc.c
index a1cf364..85634f8 100644
--- a/log2asc.c
+++ b/log2asc.c
@@ -190,6 +190,7 @@ int main(int argc, char **argv)
FILE *infile = stdin;
FILE *outfile = stdout;
static int maxdev, devno, i, crlf, fdfmt, nortrdlc, d4, opt, mtu;
+ unsigned long long sec, usec;
while ((opt = getopt(argc, argv, "I:O:4nfr?")) != -1) {
switch (opt) {
@@ -259,18 +260,20 @@ int main(int argc, char **argv)
if (buf[0] != '(')
continue;
- if (sscanf(buf, "(%lu.%lu) %s %s %s", &tv.tv_sec, &tv.tv_usec,
+ if (sscanf(buf, "(%llu.%llu) %s %s %s", &sec, &usec,
device, ascframe, extra_info) != 5) {
/* do not evaluate the extra info */
extra_info[0] = 0;
- if (sscanf(buf, "(%lu.%lu) %s %s", &tv.tv_sec, &tv.tv_usec,
+ if (sscanf(buf, "(%llu.%llu) %s %s", &sec, &usec,
device, ascframe) != 4) {
fprintf(stderr, "incorrect line format in logfile\n");
return 1;
}
}
+ tv.tv_sec = sec;
+ tv.tv_usec = usec;
if (!start_tv.tv_sec) { /* print banner */
start_tv = tv;
@@ -305,9 +308,9 @@ int main(int argc, char **argv)
tv.tv_sec = tv.tv_usec = 0;
if (d4)
- fprintf(outfile, "%4lu.%04lu ", tv.tv_sec, tv.tv_usec/100);
+ fprintf(outfile, "%4llu.%04llu ", (unsigned long long)tv.tv_sec, (unsigned long long)tv.tv_usec/100);
else
- fprintf(outfile, "%4lu.%06lu ", tv.tv_sec, tv.tv_usec);
+ fprintf(outfile, "%4llu.%06llu ", (unsigned long long)tv.tv_sec, (unsigned long long)tv.tv_usec);
if ((mtu == CAN_MTU) && (fdfmt == 0))
can_asc(&cf, devno, nortrdlc, extra_info, outfile);
diff --git a/slcanpty.c b/slcanpty.c
index fa97cd6..fc86d4f 100644
--- a/slcanpty.c
+++ b/slcanpty.c
@@ -363,8 +363,8 @@ int can2pty(int pty, int socket, int *tstamp)
if (ioctl(socket, SIOCGSTAMP, &tv) < 0)
perror("SIOCGSTAMP");
- sprintf(&buf[ptr + 2*frame.can_dlc], "%04lX",
- (tv.tv_sec%60)*1000 + tv.tv_usec/1000);
+ sprintf(&buf[ptr + 2*frame.can_dlc], "%04llX",
+ (unsigned long long)(tv.tv_sec%60)*1000 + tv.tv_usec/1000);
}
strcat(buf, "\r"); /* add terminating character */
--
2.43.0

View File

@@ -0,0 +1,53 @@
SUMMARY = "Linux CAN network development utilities"
LICENSE = "GPL-2.0-only & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://include/linux/can.h;endline=44;md5=a9e1169c6c9a114a61329e99f86fdd31"
DEPENDS = "libsocketcan"
SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=https;branch=master \
file://0001-timestamp-formatting-always-use-64-bit-for-timestamp.patch \
file://0001-lib-snprintf_can_error_frame-don-t-bail-out-if-CAN_E.patch \
"
SRCREV = "cfe41963f3425e9adb01a70cfaddedf5e5982720"
S = "${WORKDIR}/git"
inherit autotools pkgconfig update-alternatives
PACKAGES =+ "${PN}-access ${PN}-isotp ${PN}-j1939 ${PN}-cantest ${PN}-slcan ${PN}-log"
FILES:${PN}-access = " \
${bindir}/cangw \
${bindir}/canlogserver \
${bindir}/bcmserver \
${bindir}/socketcand \
${bindir}/cannelloni \
"
FILES:${PN}-isotp = "${bindir}/isotp*"
FILES:${PN}-j1939 = " \
${bindir}/j* \
${bindir}/testj1939 \
"
FILES:${PN}-cantest = " \
${bindir}/canbusload \
${bindir}/can-calc-bit-timing \
${bindir}/canfdtest \
"
FILES:${PN}-slcan = "${bindir}/slcan*"
FILES:${PN}-log = "${bindir}/*log*"
ALTERNATIVE:${PN} = "candump cansend cansequence"
ALTERNATIVE_LINK_NAME[candump] = "${bindir}/candump"
ALTERNATIVE_LINK_NAME[cansend] = "${bindir}/cansend"
ALTERNATIVE_LINK_NAME[cansequence] = "${bindir}/cansequence"
# busybox ip fails to configure can interfaces, so we need iproute2 to do so.
# See details in http://www.armadeus.com/wiki/index.php?title=CAN_bus_Linux_driver.
RRECOMMENDS:${PN} += "iproute2"

View File

@@ -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

View File

@@ -0,0 +1,28 @@
SUMMARY = "canutils (PTX flavour)"
HOMEPAGE = "http://www.pengutronix.de"
SECTION = "console/network"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "libsocketcan"
SRCREV = "299dff7f5322bf0348dcdd60071958ebedf5f09d"
SRC_URI = "git://git.pengutronix.de/git/tools/canutils.git;protocol=https;branch=master \
file://0001-canutils-candump-Add-error-frame-s-handling.patch \
"
inherit update-alternatives
S = "${WORKDIR}/git"
inherit autotools pkgconfig
# Busybox ip doesn't support can interface configuration, use the real thing
RDEPENDS:${PN} += "iproute2"
ALTERNATIVE_PRIORITY = "90"
ALTERNATIVE:${PN} = "candump cansend cansequence"
ALTERNATIVE_LINK_NAME[candump] = "${bindir}/candump"
ALTERNATIVE_LINK_NAME[cansend] = "${bindir}/cansend"
ALTERNATIVE_LINK_NAME[cansequence] = "${bindir}/cansequence"

View File

@@ -0,0 +1,18 @@
SUMMARY = "Control basic functions in socketcan from userspace"
HOMEPAGE = "http://www.pengutronix.de"
SECTION = "libs/network"
LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://src/libsocketcan.c;beginline=3;endline=17;md5=97e38adced4385d8fba1ae2437cedee1"
SRCREV = "077def398ad303043d73339112968e5112d8d7c8"
SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
inherit autotools pkgconfig
PACKAGECONFIG ?= ""
PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
PACKAGECONFIG[no-error-log] = "--disable-error-log,--enable-error-log"