Porting network drivers working on linux to Minix

266 views
Skip to first unread message

ASSOGBA Emery

unread,
Aug 3, 2016, 12:26:15 PM8/3/16
to min...@googlegroups.com
Hi everyone,

I am planning to work on porting some of Ethernet network card's drivers working on Linux to Minix 3.3.0 specially e1000e, i40e ...

So first I just want to know if someone else is working on such tasks or has planned to work on that.
Second I have a question on setting the development environment. I will have my laptop running Ubuntu 16.04. I will install Minix 3.3.0 on another laptop which has a network card not supported yet by Minix 3.3.0. My first aim will be to make this network card work.
So How can I send modified file from my Ubuntu  laptop to my Minix laptop when the network card doesn't work?
If someone has a useful Howto to use serial line or another useful stuff instead of the network card, I am interested.
__________________________________________________________________________________
Emery K. Assogba
Entrepreneur, Ingenieur Informaticien, Doctorant
www.ptgfengineering.com
"You can do it if you believe you can"

"Don't tell the world what you can do, Show it"
Napoleon Hill

David van Moolenbroek

unread,
Aug 3, 2016, 1:56:04 PM8/3/16
to minix3
Hi Emery,


On Wednesday, August 3, 2016 at 6:26:15 PM UTC+2, ASSOGBA Emery wrote:
I am planning to work on porting some of Ethernet network card's drivers working on Linux to Minix 3.3.0 specially e1000e, i40e ...

That is awesome. Please do start from 3.4.0rc2 though: after the 3.3.0 release, the network driver interface has changed heavily. Specifically, with the new libnetdriver library, it should now be much simpler to write a network driver than on 3.3.0. Also, network drivers that are not written against libnetdriver will no longer be considered for merging. Unfortunately I haven't got around to writing the documentation for the libnetdriver interface yet, but looking at the existing drivers and the libnetdriver source code should provide a lot of information to start from. I believe you have 3.4.0rc2 on a CD already!.. but as always the ISO is also also available from:

  http://download.minix3.org/iso/snapshot/

As for setting up a development environment: on one machine I have written a network driver that I then used to copy its source off that machine, which was fairly satisfying, but not necessarily the most convenient way of doing things. It kind of depends on the hardware available and what you want to transfer. For example, it may be possible to transfer files using CDs or even raw floppies. I don't think anyone has transferred files over serial in a while, but I could be wrong..

Regards,
David

Jean-Baptiste Boric

unread,
Aug 3, 2016, 4:20:29 PM8/3/16
to minix3
I am planning to work on porting some of Ethernet network card's drivers working on Linux to Minix 3.3.0 specially e1000e, i40e ...

That is awesome.

I think it would be awesome too but I'm having second thoughts about porting stuff from Linux. Not really for technical reasons but rather because of the MINIX project's policy on GPL. Currently the official rule as I understand it is "no GPL-licensed stuff in the src repository", so according to them at least the Linux driver bits will have to be stashed somewhere else, which is not ideal and prone to bitrot.

Personally for that job I would use NetBSD's RUMP since it's BSD licensed. More specifically buildrump.sh (also known as misc/rump in pkgsrc) since making RUMP work directly from within the src repository would probably be very tricky to do and buildrump.sh is basically RUMP meets build.sh.

As for setting up a development environment: on one machine I have written a network driver that I then used to copy its source off that machine, which was fairly satisfying, but not necessarily the most convenient way of doing things. It kind of depends on the hardware available and what you want to transfer. For example, it may be possible to transfer files using CDs or even raw floppies. I don't think anyone has transferred files over serial in a while, but I could be wrong..

There is another possibility. If the destination laptop has IOMMU you can use KVM's PCI passthrough to turn over a PCI device from the host to a QEMU guest.

A while ago I managed to export a few devices on my laptop and they appeared in MINIX's /proc/pci. I didn't actually *try* to use them since there were no MINIX drivers for these devices, but it should work in theory.

David van Moolenbroek

unread,
Aug 3, 2016, 4:23:43 PM8/3/16
to minix3
Hello,


I think it would be awesome too but I'm having second thoughts about porting stuff from Linux.

Oops yes good point; I somehow missed that part. Linux/GPL-derived code is out of the question. If anything, port from NetBSD (using RUMP is not necessary though..). Writing drivers from scratch is also really not that hard..

Regards,
David

ASSOGBA Emery

unread,
Jul 7, 2017, 8:36:58 AM7/7/17
to min...@googlegroups.com

Hi Jean Baptiste,
Excuse me because my answer comes very late. I had lot of things to do.
Thank you for your answers. My laptop supports IOMMU. But I don't know how to use KVM's PCI passthrough to turn over a PCI device from the host to a QEMU guest.
Can you tell me how to do that? I think it Will be very hepfull to me. Because debugging drivers in real hardware is not easy.
Thanks.
EKA.

--
You received this message because you are subscribed to the Google Groups "minix3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minix3+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jean-Baptiste Boric

unread,
Jul 8, 2017, 2:49:54 PM7/8/17
to minix3
Hi,

It's been a while and good documentation is hard to come by. Thankfully, Arch usually has excellent documentation on everything, check out https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF. Beware, it's quite extensive.
Reply all
Reply to author
Forward
0 new messages