tass-belgium / picotcp

PicoTCP is a free TCP/IP stack implementation
Other
1.19k stars 222 forks source link

investigate integration with libopencm3 #384

Open frederikvs opened 8 years ago

frederikvs commented 8 years ago

libopencm3 is a firmware library for various ARM microcontrollers, and from what I hear it should include ethernet drivers. We should investigate how easy it would be to integrate this with picoTCP.

This sort of thing is probably best kept in a separate repository though.

One major question is license compatibility. libopencm3 is LGPLv3, we're GPLv2. According to gnu.org, "I want to license my code under GPLv2 only ; I want to use a library under LGPLv3 : NO" Which is kind of daft, LGPL is intended so you can use a library even in a closed source, proprietary project, but if you use one of their old licenses, you're not allowed to...?

maximevince commented 8 years ago

An STM Ethernet driver for picotcp + libopencm3 is work in progress in the Frosted repo: https://github.com/insane-adding-machines/frosted/commit/8e0d2916daaf9f1fd80e47e86ea5a94ba8f7436c

danielinux commented 8 years ago

This has been widely discussed in the libopencm3-devel mailing list back in November. Please have a look at the thread here: https://sourceforge.net/p/libopencm3/mailman/message/34624717/

It looks like LGPL3 exception at point 1. drops all the claims of GPL3 section 3 for derived works:

  1. Exception to Section 3 of the GNU GPL.

  You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

Making it possible to link the library with a non-compatible license as soon as the two codebase are separated.

But, heh, IANAL.

CC: @maximevince @insane-adding-machines @libopencm3 @karlp

danielinux commented 8 years ago

A working usb-ethernet driver for picotcp+libopencm3 on stm32F4 is available in the frosted repository as well: https://github.com/insane-adding-machines/frosted/blob/master/kernel/drivers/usb_ethernet.c