I got a response from the VW Open Source person, Oliver HartKopp. For
now, I will just forward it as is to the entire list:
-------- Forwarded Message --------
Subject: Re: SocketCAN in NuttX?
Date: Fri, 17 Jan 2020 17:12:30 +0100
From: Oliver Hartkopp <socket...@hartkopp.net>
To: Gregory Nutt <spudan...@gmail.com>
Hi Gregory,
that's a cool idea and I definitely support your idea to support
SocketCAN for NuttX!
First the GPL version of the Linux kernel is GPL-2.0-only as GPLv3 would
require many things that are hard to fulfill in embedded devices.
The code of SocketCAN is GPLv2/BSDv3 dual license as you can see on top
of the different files, e.g. linux/net/can/af_can.c:
// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
And the reason why I made it a dual license was because of people like you.
Please read the license text e.g. in af_can.c
e.g.
* The provided data structures and external interfaces from this code
* are not restricted to be used by modules with a GPL compatible license.
The code just becomes a GPLv2 code when it is used in a GPLv2 context,
e.g. the Linux kernel.
The idea of having a standard socket interface for CAN is not bound to
Linux but might be used in BSD or even Windows. We had a Windows NT
implementation as proof-of-concept which we didn't publish as there was
no interest on CAN hardware manufacturers side to support the CAN
network interface for their HW - which would have killed their vendor
Lock-in ...
All contributors that contributed to the SocketCAN core should know that
this code is dual licensed.
There are Linux specific interfaces into the kernel to handle socket
buffers (skbs) and other registering stuff which would not work in your
environment.
But the socket API and the CAN specific implementations for filter lists
or using a network-style CAN driver interface could be usable as-is.
IANAL too - but you should make your legal guys checking what happens to
BSD3 code when you want to use it in an ASF context.
Would be great to see the SocketCAN API in other operating systems which
would make it very easy to port CAN applications too.
The can-utils user space tools in
https://github.com/linux-can/can-utils
are dual licensed too - in most of the cases.
For the same reason ;-)
Best regards,
Oliver
On 17/01/2020 16.20, Gregory Nutt wrote:
Hi, Oliver,
I learned about you through the VW site:
https://www.volkswagenag.com/en/news/stories/2019/11/the-open-source-missioner.html#
. My name is Gregory Nutt and I am the creator of the NuttX Embedded RTOS.
I want to discuss with you about using SocketCAN in the NuttX RTOS. I
have had a request from the NXP drone group asking to add support for
SocketCAN in NuttX. NuttX has a nicely layered network and I believe
that the code would drop in very simply. The NXP engineering team are
advocating "lifting" the code from Linux since it has a dual GPLv3,
BSD-3 license. But I think that there could be problems with that.
NuttX very recently became part of the Apache Software Foundation (ASF)
which is very careful with licensing and I think they will object to
that idea (with some good reason). The primary concerns that they would
have would be, I think:
* I think legal would interpret the code in Linux to be under the
GPLv3 license. GPL is, of course, incompatible with the Apache
license and could never come into Apache NuttX. I think they would
want to get the code from another location. Is there a sanitized,
non-Linux implementation available somewhere. I see github.com
repositories, but they appear to be Linux code as well.
* Even to include third party code code with a compatible license, the
ASF would probably require a software grant. The Apache software
grant doesn't mean the VW would be giving the software to NuttX,
only that it is granting the rights to use the software.
I am not an attorney. I have asked for advice from Apache legal, but I
have not yet received that advice. I am just anticipating what they
will say based on past experience.
There is a fairly large number of developers using the existing
character driver CAN in NuttX: ROS2, PX4-based drones, German motorcyle
manufactuers, uavcan, etc. Having SocketCAN in the OS would be a great
enhancement to the RTOS and would extend interest in SocketCAN to a
larger audience.
Looking forward to your response,
Gregory Nutt