I'm rewriting/reimplementing an open source program/library and need to know about my options for licensing. I'm asking about software rewrites/reimplementations generally and specifically about my current use-case.
As I don't currently need all provided options I'm writing a prototype with minimal functionality that is required for Arduinos. AVRDude is written in C/C++ with YACC config parsing and I'm programming in Python mit PLY parsing. Since C and Python are sometimes rather different syntactically, I need to more or less re-implement everything. I can orientate myself by the logical flow of AVRDude and need to re-use defined constants but everything else is rewritten and optimized for Python. There is no usage of the native AVRDude afterwards.
Examples of code (information) that has to be kept as is (only converted from C to Python):
- logical sequence of commands issued to the chips by a programmer, e. g. STK500
- constants defined with command codes, error codes/returns
Examples of code that is currently being kept relatively unchanged (adopted to Python naturally):
- structures to hold the data for fuses, memory etc.
- bitflag lists but somewhat optimized for Python
- programmer functions with weird pass-by-reference parameters (will be changed later if it works)
- commandline interface (will be later changed more like the one in
Examples of code that is re-implemented by myself:
- config file parsing (currently in own grammer in PLY), naturally not that restrictive compared to the native implemenation by AVRDude (output similar to: avrdude-config-webapp)
- USB device access (for use in Termux on Android, only possible with USB file descriptors)
My questions are:
- What is generally under the licence?
Definitions like error codes etc., functions names, general logic flow? [not?]
A communication to hardware is specified somewhere (documenatition, manuals) and it is only possible in this way.
There are sometimes other implementations out there that can/could be the base for my own code, e. g. on Github with less restrictive licensing.
- Is a rewrite a modification of software or a newly created 'thing'?
Does the licence apply in that my rewrite/reimplementation also has to be under GPL or do I only have to include the notice/credits that I base my code on?
Should I reformulate "rewrite" as "(re-)implementation based on ..."?
- What are my options for my AVRDude reimplementation? GPL v2 and more restrictive or also less restrictive like MIT?
I would like to publish under a less restrictive license if other may want to use my code later on, so that closed source software does not have to be open sourced if I understand the GPL correctly.
Attribution to AVRDude is no problem but I do not know if I can change to MIT licence for my library etc.
Maybe similart to this one:
- Re-implementing MIT licensed software in another language [but i don't just re-implement, I more or less base my own implemenation on it]
Update #1, 08.01.2020, Reply to @Brandin
I had to look and read through each line and trace most program paths of the original AVRDude source for my re-implementation. A more or less literal translation is the communication in the STK500 programmer as I'm unsure of how to do this any other way and keep it still working. That points into the derivative work direction. The original code may be 'functional' as it is sometimes 'just' an implementation of a protocol, but there must have been much 'creativity' to write it that way in the first place. And there are still many people contributing patches etc. and improving the code even if it is rather old.
Since AVRDude is a tool for a rather specific use-case, reading from & writing data to microcontroller, there is not much leeway compared to a large general purpose library from which I would only extract/rewrite a small functional part.