Systems that lack a MMU cannot use fork() to create the child process.
The patch does not compile the affected programs on MMU-less systems.
Co-developed-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
It works on dev coredump data generated by the mcp251xfd driver in
case of failures, as well as on regmap based register dumps.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
The PTX flavour canutils have a useful utility for generating a sequence of CAN
frames with an incrementing payload and checking such a sequence for missed and
reordered frames.
Recently, it has helped finding a regression in the kernel pfifo_fast qdisc,
which led to reordered frames.
To bring the utility to a greater audience, import the current state, including
its history, into the linux-can set of utilities.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Using j*smthng* for j1939-related tools is not very good for 2 reasons:
1. j prefix is not very informative;
2. jcat name is used by journal cat tool from popular sleuthkit toolkit;
2`. jacd sounds very similar to jackd.
2``. Possible future name conflicts for new tools.
Thus I renamed j* to j1939\1 to deal with this issue.
Signed-off-by: Alexander GQ Gerasiov <gq@cs.msu.su>
canaddr2str() from testj1939 and libj1939's libj1939_addr2str provide
the same functionality. Remove the local helper function and use
libj1939_addr2str instead.
Signed-off-by: Bastian Stender <bst@pengutronix.de>
The can-j1939 kernel part only follows & validates inbound & outbound
address claim packets. Jacd implements the part that chooses an address
and emits the address claim packet.
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
jsr sends data on <stdin> to j1939, and received j1939 data
is put on <stdout>.
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
libj1939 provides a parser for struct sockaddr_can with j1939 info
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This is necessary so this header gets included when running make dist.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This adds an algorithm for calculating the exact number of bits a CAN
frame occupies on the bus and uses this algorithm in canbusload. It
also moves the other methods for CAN frame length calculation, already
present in canbusload, to the new file.
The added algorithm calculates the exact number of stuffed bit in a
CAN frame. Note that in order to calculate that correctly, we must
also know the frame's CRC. Hence, the algorithm also includes CRC
calculation routine.
The correctness of the algorithm was verified on an oscilloscope for
several different SFF and EFF frames.
Currently only CAN frames are supported. For CANFD frames, a different
algorithm is needed. CANFD uses different CRC polynomials and
calculates the CRC from the staffed bit-stream (CAN calculates CRC
from de-stuffed bit-stream).
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This makes it possible to import header from the kernel more easily, e.g.:
cd $path_to_linux_repo
make headers_install
rsync -a --exclude .\* usr/include/linux/can* $path_to_can_utils/include/linux
[mkl: also move isotp.h although Uwe skipped it as it is not
part of the upstream kernel; adapt commit log accordingly]
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This header doesn't exist in the Linux tree and it's unused by can-utils,
so drop it.
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
These seem to have never been used. They entered can-utils in commit
77de10356f (include: import kernel header files into tree) and already
back then only consisted in an #include of a non-existing file.
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>