Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Aug 2020 00:05:30 +0200
From:      Niclas Zeising <zeising+freebsd@daemonic.se>
To:        net@freebsd.org, freebsd-net@freebsd.org
Subject:   Re: Add support for building Linux-only network drivers
Message-ID:  <7d5c55ab-bbf6-f8bc-954e-eb3739c13b4a@daemonic.se>
In-Reply-To: <20200815215909.GA22866@mcp.nocebo.space>
References:  <20200724070128.GD21738@mcp.nocebo.space> <23f13fd1-e8eb-0a66-03cc-9caf26208e7b@daemonic.se> <20200815215909.GA22866@mcp.nocebo.space>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-08-15 23:59, zerous wrote:
> On Fri, Jul 24, 2020 at 07:42:32PM +0200, Niclas Zeising wrote:
>>
>> Hi!
>> The Linux compatibility layer, aka Linuxolator, is for running userland
>> Linux binaries on FreeBSD.  I think what you're looking for is the Linux
>> KPI, or lkpi.  I believe Mellanox network card drivers are using this, and I
>> know the drm-kmod graphics drivers are.  This might be a starting point for
>> you.
> 
> Hi,
> 
> I was just wondering if I could find more documentation about
> linuxolator. I have been reading up "FreeBSD Device Drivers" and I
> think it will help me in understanding network drivers, but I couldn't
> find much information on the linux kernel api other than a blog on
> drm-kmod (setup).
> 
> 	Naveen
> 

THe linuxolator, as I told you, is for running userland Linux binaries 
on FreeBSD, and has nothing to do with wanting to build Linux-only 
network drivers.
I suggest you look at the code for the lkpi, you can find it here: 
https://github.com/freebsd/freebsd/tree/master/sys/compat/linuxkpi/common
There are also drivers in the tree using it, such as mellanox network 
drivers, I think.
The lkpi is meant to work like on Linux, but you probably need some glue 
to set up modules and so on.
I suggest you start with looking at the relevant code.
Regards
-- 
Niclas



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7d5c55ab-bbf6-f8bc-954e-eb3739c13b4a>