CAN j1939 support in Linux Kernel 4.x - linux

Any one have ported CAN J1939 stack on the kernel 4.x series?
We had ported it into 3.10 kernel based on the link "http://elinux.org/J1939".
Now I want to port it into the kernel version 4.1.15. I understand there was some changes happens in the 4.x kernel network layer and my current patches shows some errors?
Have anyone already ported this into 4.x kernel? or from where can I get the patches for new Kernel ?
Please advice me?
Thanks,
Shabeer

I saw it done in Yocto for some kernels. Though, if you google for it you may find the following link: http://elinux.org/J1939. I checked repositories, it contains a branch for v4.1 version.

Related

what if kernel version is different from module build

Suppose I build a module in kernel 2.6.32-431, but I load it successfully in kernel 2.6.32-432. Can this module work properly? Or is it harm to system?
With such a little difference between kernel versions (2.6.32-431 vs 2.6.32-432) and by passing checksum check (see e.g. this answer about checksum in Linux kernel modules), your module will very likely operate correctly.
Of course, no one can be sure about correctness.
The version of your kernel is 2.6.32.
The number you see after the dash (-432) is an iteration of patchsets applied by your distribution's developers. Most of those changes likely are security patches.
Moreover, 2.6.32 kernel is an LTS release, which normally doesn't accept anything, but security updates and fixes for severe issues.
So, you should not worry that module compiled with 2.6.32-431 kernel sources won't work on 2.6.32-432 kernel.
What you should really worry about is that 2.6.32 kernel is not supported since February 2016.
As long as your changes complied successfully under the module build in your new kernel version, it should not be a problem. It should work normally 99%.

Bugs in BlueZ 5 LE functionality in linux versions before 4.10

I'm new to bluetooth. I'm using tools provided by BlueZ 5 on linux kernel 3.10 and I am wondering the stability of BlueZ running on kernel 3.10. I found an answer on Stackoverflow says
there are bugs in LE functionality in versions before 4.101. You can't
use Bluez 5.x in kernels that old
BlueZ Compatible kernel version
Does anyone know where I can find the bugs that answer is referring to? Or any suggestion of using BlueZ on Linux kernel 3.10? Thanks in advance.

Writing a touchpad driver for Linux based on published specs

A friend of mine bought a laptop that unfortunately comes with an unsupported touchpad. The good news is that it comes with full documentation.
Is this documentation enough to make a driver with multi-touch support?
Is it advisable to base the driver from another (similar) touchpad driver as a starting point? If so, which one shall I use?
As far as I know, this controller is already supported by Linux. Just make sure your kernel version is recent enough to have the driver/input/mouse/byd.c source file, and that it is enabled by checking for the presence of the CONFIG_MOUSE_PS2_BYD token in your kernel configuration.

AODV implementation for Kernel 3.8 or above

I am working on a research project where I will be creating a proactive protocol similar to AODV. Creating the protocol from the scratch will be a tedious and time consuming task and it will be time saving If I implement the protocol from already working AODV.
I can find AODV for old linux kernel such as 2.6.x such as famous AODV-uu from http://sourceforge.net/projects/aodvuu/. They are not compiling properly against the newer version for kernel version 3.8 and above. Does anyone have know AODV for latest kernel or does anyone AODV-uu for latest kernel version. Any help is very much appreciated.
AODV -UU is the only source. Are you going to implement your protocol in real time or in stimulation?
There is no development in Aodv kernel version. If u wish make use of aodv existing code and compile it for newer kernel version.

Best linux distribution to do Kernel Module programming

I want to do kernel module programming. But, all sources tell that linux distributions patch the original kernel and that module codes might not run on them. If this is true, what should i do.I tried making lfs using ubuntu but errors cropped up at almost every step. I saw somewhere that arch, gentoo, Ubuntu Server without any packages selected during the installation, slackware, susestudio etc. are vanilla distributions. So, can i use them for module programming?
Please suggest keeping in mind that i need a GUI in the distribution.
Can this be followed?
PS: I have a intel core i3 processor and will be running the distros on vmware workstation.
If you want to program kernel modules then it doesn't matter which distribution you choose. You will need to be able to recompile the kernel from source and install a new kernel yourself. Even just for a kernel module you'll want to be able to compile the latest kernel and develop against that, otherwise you won't be able to get the module accepted in to mainline.
An alternative if the module is not to be released is to develop against a particular kernel version. In this instance then the choice of distribution should be chosen based on the target for the module - not the development environment.
So pick a distribution based on what you like:
1) Desktops - (GNOME, KDE, other)
2) Ease of use - (Ubuntu, Fedora, etc vs Arch, Gentoo)
3) Cutting edge vs Stable (Arch, Fedora vs Ubuntu vs Debian, Red Hat, CentOS)
Then head off to kernelbewbies to learn a bit about getting started with kernel programming (where to get the source, how to compile it). Then read Greg Kroah-Hartman's excellent book on linux device drivers. The interfaces will have changed (it's written about version 2.6 of the kernel and version 3.6 is currently being worked on). It can be found online here
You'll also want to learn how to use git. And more importantly how to use git to generate a patch and email it without messing it up! I don't have a website for this but a bit of googling will help.

Resources