Re: CAN bus support

From: Philip Paeps <philip_at_freebsd.org>
Date: Sun, 10 Nov 2024 03:40:05 UTC
On 2024-11-10 06:23:49 (+0800), Jessica Clarke wrote:
> On 9 Nov 2024, at 21:57, Kevin Bowling <kevin.bowling@kev009.com> 
> wrote:
>> A FreeBSD vendor is interested in interacting with CAN bus on 
>> FreeBSD.
>>
>> A convenient starting point would be NetBSD's can(4)
>> (https://man.netbsd.org/can.4) which implements something very 
>> similar
>> to Linux' SocketCAN
>> (https://www.kernel.org/doc/Documentation/networking/can.txt) to
>> provide the protocol/interface and then writing a driver for their
>> controller.
>>
>> Is there other interest or concern about the topic?
>
> A year or two back philip@ did some work for us on this as we had some
> companies in the Digital Security by Design program interested in 
> using
> CheriBSD with CANbus things. It never quite got finished though, but
> would presumably be a good place to start? IIRC it took the same
> approach of porting NetBSD’s code.

Yeah.  I remember I got the NetBSD code to compile, but not much more 
than that.  The NetBSD code is very old, and an awkward fit.  I don't 
think it's particularly actively maintained in NetBSD either.

My memory is very fuzzy, but I think I remember thinking a userland 
implementation would fit better.  I don't think I ever made any progress 
there.

Unfortunately, I don't have any code / works in progress from the time.

Philip