On Fri, Jan 31, 2020 at 11:45 AM Philippe Mathieu-Daudé <f4...@amsat.org> wrote:
>
> On Fri, Jan 31, 2020 at 10:40 AM Aleksandar Markovic
> <aleksandar.m.m...@gmail.com> wrote:
> > On Fri, Jan 31, 2020 at 10:35 AM Thomas Huth <th...@redhat.com> wrote:
> > > On 31/01/2020 05.11, Aleksandar Markovic wrote:
> > > > On Fri, Jan 31, 2020 at 4:45 AM Aleksandar Markovic
> > > > <aleksandar.m.m...@gmail.com> wrote:
> > > >>
> > > >> On Fri, Jan 31, 2020 at 4:09 AM Philippe Mathieu-Daudé 
> > > >> <f4...@amsat.org> wrote:
> > > >>>
> > > >>> Hi Aleksandar,
> > > >>>
> > > >>> Cc'ing Thomas & Daniel who are not lawyers but tried to explain me few
> > > >>> times how licensing works.
> > > >>>
> > > >>> On Fri, Jan 31, 2020 at 2:56 AM Aleksandar Markovic
> > > >>> <aleksandar.m.m...@gmail.com> wrote:
> > > >>>> On Fri, Jan 31, 2020 at 1:03 AM Aleksandar Markovic
> > > >>>> <aleksandar.marko...@rt-rk.com> wrote:
> > > >>>>>
> > > >>>>> From: Philippe Mathieu-Daudé <f4...@amsat.org>
> > > >>>>>
> > > >>>>> Add some AVR microcontrollers from the ATmega family:
> > > >>>>>
> > > >>>>>   - middle range: ATmega168 and ATmega328
> > > >>>>>   - high range: ATmega1280 and ATmega2560
> > > >>>>>
> > > >>>>> For product comparison:
> > > >>>>>   
> > > >>>>> https://www.microchip.com/wwwproducts/ProductCompare/ATmega168P/ATmega328P
> > > >>>>>   
> > > >>>>> https://www.microchip.com/wwwproducts/ProductCompare/ATmega1280/ATmega2560
> > > >>>>>
> > > >>>>> Datasheets:
> > > >>>>>   
> > > >>>>> http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061A.pdf
> > > >>>>>   
> > > >>>>> http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2549-8-bit-AVR-Microcontroller-ATmega640-1280-1281-2560-2561_datasheet.pdf
> > > >>>>>
> > > >>>>> [AM: Remove word 'Atmel' from filenames and all elements of code]
> > > >>>>> Suggested-by: Aleksandar Markovic <aleksandar.m.m...@gmail.com>
> > > >>>>>
> > > >>>>> Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>
> > > >>>>> Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
> > > >>>>> Signed-off-by: Aleksandar Markovic <aleksandar.m.m...@gmail.com>
> > > >>>>> ---
> > > >>>>>  hw/avr/Kconfig       |   5 +
> > > >>>>>  hw/avr/Makefile.objs |   1 +
> > > >>>>>  hw/avr/atmega.c      | 470 
> > > >>>>> +++++++++++++++++++++++++++++++++++++++++++++++++++
> > > >>>>>  hw/avr/atmega.h      |  48 ++++++
> > > >>>>>  4 files changed, 524 insertions(+)
> > > >>>>>  create mode 100644 hw/avr/Kconfig
> > > >>>>>  create mode 100644 hw/avr/atmega.c
> > > >>>>>  create mode 100644 hw/avr/atmega.h
> > > >>>>>
> > > >>>>> diff --git a/hw/avr/Kconfig b/hw/avr/Kconfig
> > > >>>>> new file mode 100644
> > > >>>>> index 0000000..9e6527e
> > > >>>>> --- /dev/null
> > > >>>>> +++ b/hw/avr/Kconfig
> > > >>>>> @@ -0,0 +1,5 @@
> > > >>>>> +config AVR_ATMEGA_MCU
> > > >>>>> +    bool
> > > >>>>> +    select AVR_TIMER16
> > > >>>>> +    select AVR_USART
> > > >>>>> +    select AVR_POWER
> > > >>>>> diff --git a/hw/avr/Makefile.objs b/hw/avr/Makefile.objs
> > > >>>>> index 123f174..af0fdde 100644
> > > >>>>> --- a/hw/avr/Makefile.objs
> > > >>>>> +++ b/hw/avr/Makefile.objs
> > > >>>>> @@ -1 +1,2 @@
> > > >>>>>  obj-y += boot.o
> > > >>>>> +obj-$(CONFIG_AVR_ATMEGA_MCU) += atmega.o
> > > >>>>> diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c
> > > >>>>> new file mode 100644
> > > >>>>> index 0000000..8cdf28b
> > > >>>>> --- /dev/null
> > > >>>>> +++ b/hw/avr/atmega.c
> > > >>>>> @@ -0,0 +1,470 @@
> > > >>>>> +/*
> > > >>>>> + * QEMU ATmega MCU
> > > >>>>> + *
> > > >>>>> + * Copyright (c) 2019 Philippe Mathieu-Daudé
> > > >>>>> + *
> > > >>>>> + * This work is licensed under the terms of the GNU GPLv2 or later.
> > > >>>>> + * See the COPYING file in the top-level directory.
> > > >>>>> + * SPDX-License-Identifier: GPL-2.0-or-later
> > > >>>>> + */
> > > >>>>
> > > >>>> Philippe,
> > > >>>>
> > > >>>> Michael and I already agreed at some moment that the whole target AVR
> > > >>>> should have harmonized licenses, and Sarrah agreed to change her
> > > >>>> license to achieve this. Do you agree to harmonize your licenses with
> > > >>>> the rest of the project? (This would mean changing the preable, but 
> > > >>>> of
> > > >>>> course you remain copyright carrier as is now.)
>
> Note I'm not worried about my authorship but than other contributors
> being able to reuse and modify this code.
>
> > > >>>
> > > >>> What license do you want to use? I always use "GPLv2 or later" with
> > > >>> QEMU, mostly following what the others do.
> > > >>>
> > > >>> Per https://wiki.qemu.org/License:
> > > >>>
> > > >>>   Source files with no licensing information are released under the
> > > >>> GNU General Public License, version 2 or (at your option) any later
> > > >>> version.
> > > >>>
> > > >>> Reading about licensing is not fun :(
> > > >>>
> > > >>
> > > >> Philippe, here is the deal: All new files for AVR platform has the
> > > >> following preamble, that Michael chose from the outset:
> > > >>
> > > >> + * This library is free software; you can redistribute it and/or
> > > >> + * modify it under the terms of the GNU Lesser General Public
> > > >> + * License as published by the Free Software Foundation; either
> > > >> + * version 2.1 of the License, or (at your option) any later version.
> > > >> + *
> > > >> + * This library is distributed in the hope that it will be useful,
> > > >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > > >> + * Lesser General Public License for more details.
> > > >> + *
> > > >> + * You should have received a copy of the GNU Lesser General Public
> > > >> + * License along with this library; if not, see
> > > >> + * <http://www.gnu.org/licenses/lgpl-2.1.html>
> > > >>
> > > >> Now, it is preferable that licenses are harmonized within a module,
> > > >> and I ask you to change the preamble to be the same as the rest of the
> > > >> module, that is all. This practically means LGPL2.1+later instead
> > > >> LGPL2.0+later. I think it is reasonable that we want to simplify out
> > > >> license stuff, not complicate it with different licenses within a
> > > >> module. There are examples of complications in cases of different
> > > >> license within the same module, so it would be ideal if we avoid such
> > > >> situations.
>
> I don't use QEMU as a library, it is my main application.
> I tried to make this file clean/easy to read so it can be reused by
> other archs when implementing boards able to use multiple SoCs, this
> is not AVR-only.
>
> I see LGPLv2.1 is deprecated for version 3, why use 2.1?
>
> https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
>
> ```
> You can use it too, but we suggest you first think carefully about
> whether this license or the ordinary General Public License is the
> better strategy to use in any particular case, based on the
> explanations below.
> ...
> Most GNU software, including some libraries, is covered by the
> ordinary GNU General Public License. This license, the GNU Lesser
> General Public License, applies to certain designated libraries, and
> is quite different from the ordinary General Public License. We use
> this license for certain libraries in order to permit linking those
> libraries into non-free programs.
> ```
>
> Personally I don't care about non-free programs using QEMU as a
> library, and I don't think a such program would use the default QEMU
> config anyway.
>
> You can build the AVR (tcg) cpus without GPLv2+ hardware with this patch:
>
> ---
> --- a/default-configs/avr-softmmu.mak
> +++ b/default-configs/avr-softmmu.mak
> @@ -2,4 +2,4 @@
>
>  # Boards:
>  #
> -CONFIG_ARDUINO=y
> +CONFIG_ARDUINO=n
> ---
>
> But I doubt you can build QEMU without GPLv2+ components.
>
> See also:
> https://www.gnu.org/licenses/why-not-lgpl.html
>
> ```
> Which license is best for a given library is a matter of strategy ...
> Using the ordinary GPL for a library gives free software developers an
> advantage over proprietary developers: a library that they can use,
> while proprietary developers cannot use it ... When a free library's
> features are readily available for proprietary software through other
> alternative libraries ... the library cannot give free software any
> particular advantage, so it is better to use the Lesser GPL for that
> library.
> ```
>

Philippe,

You are just overly complicating the license stuff.

The original and main AVR contributor chose LGPL2.1+later, which is
compatible with QEMU. For that reason alone, I think anyone
contributing to this target in a substantial way should respect that
and continue using that license. I am just politely asking you, for
the sake of simplicity and common sense, to harmonize your
contributions. That is all.

Thanks,
Aleksandar

> > > > I didn't mean to scare you, I am just a developer like you, and I want
> > > > to avoid thinking about licenses, and think of our real work, so, I
> > > > gather, in my layman terms, it is better to have the same license for
> > > > the new platform in its entirety, if possible, that is all. :)
> > >
> > > This is all part of QEMU, and QEMU is licensed under the GPLv2. If
> > > someone wants to use a less strict license for their own code that is
> > > still compatible with the GPLv2, like the LGPLv2.1, that's fine. But I
> > > think if Philippe does not like to release his code under the LGPL, and
> > > wants to use GPL instead, you can not force him to use LGPL here. It's
> > > the decision of Philippe what he wants to use for his code.
> > >
> >
> > It is his decision, but it can be reasonable or not so reasonable. I
> > think it is logical that he follows the license model of the module he
> > contributes to, isn't it?
> >
> > Aleksandar
> >
> > >  Thomas
> > >

Reply via email to