1 # Installation j1939 for AGL
3 #### Minimum kernel version : 4.19
5 ## Compilation of kernel j1939
7 ##### Clone linux-can-next repository on kernel.org
10 git clone https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/
13 ##### Checkout on j1939 branch
19 ##### Add the compilation of the j1939
24 - Can bus subsystem support
44 ###### CentOS/RHEL/Oracle/Scientific and Fedora Linux
47 grub2-mkconfig -o /boot/grub2/grub.cfg
48 grubby --set-default /boot/vmlinuz-...
52 ###### Debian/Ubuntu Linux
59 ##### Check if the installation is correct
65 If no errors are generated you have successfully install a kernel with j1939 module.
67 You can have a problem with header file, to check that go in the file /usr/include/linux/can.h
70 vi /usr/include/linux/can.h
73 If in the struct sockaddr_can you don't see j1939, the header are not upgrade.
75 So you need to do this manually, go to you're linux-can-next repository and do the following command:
78 cp include/uapi/linux/can.h /usr/include/linux/can.h
79 cp include/uapi/linux/can/j1939.h /usr/include/linux/can/
82 ## Enable support at build time
84 To enable J1939 support, the binding must be built with -DWITH_FEATURE_J1939=ON.
85 If using the autobuild script, add CONFIGURE_ARGS="-DWITH_FEATURE_J1939=ON" to the command used.