Message ID | 20220118111457.2491318-1-adeep@lexina.in |
---|---|
State | Changes Requested |
Headers | show |
Series | package/amlogic-boot-fip: new package | expand |
Hello Vyacheslav, [Arnout, Yann, Peter: question for you below.] On Tue, 18 Jan 2022 14:14:58 +0300 Vyacheslav Bocharov via buildroot <buildroot@buildroot.org> wrote: > Firmware Image Package (FIP) sources to sign Amlogic SoC u-boot binaries > in LibreELEC, Armbian and meta-meson, buildroot. > > https://github.com/LibreELEC/amlogic-boot-fip > > Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in> Thanks for this contribution. I have a few small details below. But apart from the small details: there is one very significant issue. The LICENSE file says: // Redistribution and use in source and binary forms, with or without // modification is strictly prohibited without prior written permission // from Amlogic. So how can the contents of this repository be useful? OK, then can be used locally for your own experiments. But for building an actual device that you can ship/provide to others, using the contents of that repository, because Amlogic does not even allow you to distribute the contents of this repository. So I am wondering if it's really reasonable to package this in Buildroot. Arnout, Yann, Peter: what do you think about this? See the license file at https://github.com/LibreELEC/amlogic-boot-fip/blob/master/LICENSE for the full text. > diff --git a/package/amlogic-boot-fip/Config.in b/package/amlogic-boot-fip/Config.in > new file mode 100644 > index 0000000000..ceb09f8247 > --- /dev/null > +++ b/package/amlogic-boot-fip/Config.in > @@ -0,0 +1,17 @@ > +config BR2_PACKAGE_AMLOGIC_BOOT_FIP > + bool "amlogic-boot-fip" Indentation is wrong here: it should be just one tab, but you have one tab + one space. Make sure to run "make check-package" and fix the coding style issues. Also, you need: depends on BR2_TARGET_UBOOT because this package depends on U-Boot being enabled. > diff --git a/package/amlogic-boot-fip/amlogic-boot-fip.hash b/package/amlogic-boot-fip/amlogic-boot-fip.hash > new file mode 100644 > index 0000000000..5d6dd237e3 > --- /dev/null > +++ b/package/amlogic-boot-fip/amlogic-boot-fip.hash > @@ -0,0 +1,2 @@ > +# Locally calculated > +sha256 cdf9d3872457c33a2755cc504f6b0560a62a6ee04437ac28e66623a345ed4936 amlogic-boot-fip-7ff0004e0e4d261ba81334a2f46302bd06704aca-br1.tar.gz Please add the hash of the license file. > diff --git a/package/amlogic-boot-fip/amlogic-boot-fip.mk b/package/amlogic-boot-fip/amlogic-boot-fip.mk > new file mode 100644 > index 0000000000..6f646ae871 > --- /dev/null > +++ b/package/amlogic-boot-fip/amlogic-boot-fip.mk > @@ -0,0 +1,37 @@ > + > +################################################################################ > +# > +# amlogic-boot-fip > +# > +################################################################################ > + > +AMLOGIC_BOOT_FIP_VERSION = 7ff0004e0e4d261ba81334a2f46302bd06704aca > +AMLOGIC_BOOT_FIP_SITE = https://github.com/LibreELEC/amlogic-boot-fip > +AMLOGIC_BOOT_FIP_SITE_METHOD = git Please use the Github macro. Replace the _SITE variable by: AMLOGIC_BOOT_FIP_SITE = $(call github,LibreELEC,amlogic-boot-fip,$(AMLOGIC_BOOT_FIP_VERSION)) and drop the AMLOGIC_BOOT_FIP_SITE_METHOD variable. > +AMLOGIC_BOOT_FIP_INSTALL_IMAGES = YES > +AMLOGIC_BOOT_FIP_DEPENDENCIES = uboot > + > +AMLOGIC_BOOT_FIP_LICENSE = PROPRIETARY Please add AMLOGIC_BOOT_FIP_LICENSE_FILES as there is a license file in the repository (which contains the problematic clause) > +AMLOGIC_BOOT_FIP_REDISTRIBUTE = NO > + > +AMLOGIC_BOOT_BINS += u-boot.bin.sd.bin Just = instead of +=. But is this variable really needed? See below. > + > +define AMLOGIC_BOOT_FIP_BUILD_CMDS > + mkdir -p $(@D)/fip > + cp $(BINARIES_DIR)/u-boot.bin $(@D)/fip/bl33.bin > + cd "$(@D)"; ./build-fip.sh $(call qstrip,$(BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD)) $(@D)/fip/bl33.bin $(@D)/fip Please use tabs for indentation. Is copying $(BINARIES_DIR)/u-boot.bin to $(@D)/fip/bl33.bin if it gets passed as argument to build-fip.sh ? Would something like: cd $(@D) && \ ./build-fip.sh \ $(call qstrip,$(BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD)) \ $(BINARIES_DIR)/u-boot.bin \ $(@D)/fip work ? > +endef > + > +ifeq ($(BR2_PACKAGE_AMLOGIC_BOOT_FIP),y) Use: ifeq ($(BR2_PACKAGE_AMLOGIC_BOOT_FIP)$(BR_BUILDING),yy) so that this check is only done when building. > +ifeq ($(call qstrip,$(BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD)),) > +$(error No board u-boot firmware config name specified, check your BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD setting) > +endif # qstrip BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD > +endif > + > +define AMLOGIC_BOOT_FIP_INSTALL_IMAGES_CMDS > + $(foreach f,$(AMLOGIC_BOOT_BINS), \ > + cp -dpf "$(@D)/fip/$(f)" "$(BINARIES_DIR)/" > + ) Why have a loop with a $(AMLOGIC_BOOT_BINS) if there's only one file to copy? Just: $(INSTALL) -D -m 0644 $(@D)/fip/u-boot.bin.sd.bin $(BINARIES_DIR)/u-boot.bin.sd.bin I would have fixed myself all those small details, but the licensing/redistribution restriction seems to be a major issue to me. Best regards, Thomas
Hi. 22.01.2022 16:33, Thomas Petazzoni wrote: > Hello Vyacheslav, > > [Arnout, Yann, Peter: question for you below.] > > On Tue, 18 Jan 2022 14:14:58 +0300 > Vyacheslav Bocharov via buildroot <buildroot@buildroot.org> wrote: > >> Firmware Image Package (FIP) sources to sign Amlogic SoC u-boot binaries >> in LibreELEC, Armbian and meta-meson, buildroot. >> >> https://github.com/LibreELEC/amlogic-boot-fip >> >> Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in> > > Thanks for this contribution. I have a few small details below. But > apart from the small details: there is one very significant issue. The > LICENSE file says: > > // Redistribution and use in source and binary forms, with or without > // modification is strictly prohibited without prior written permission > // from Amlogic. > > So how can the contents of this repository be useful? OK, then can be > used locally for your own experiments. But for building an actual > device that you can ship/provide to others, using the contents of that > repository, because Amlogic does not even allow you to distribute the > contents of this repository. > > So I am wondering if it's really reasonable to package this in > Buildroot. > You already have package/odroidc2-firmware with same license. amlogic-boot-fip just put all similar binaries together and Neil Armstrong made a build system for aml uboot binaries. > Arnout, Yann, Peter: what do you think about this? See the license file > at https://github.com/LibreELEC/amlogic-boot-fip/blob/master/LICENSE > for the full text. > > >> diff --git a/package/amlogic-boot-fip/Config.in b/package/amlogic-boot-fip/Config.in >> new file mode 100644 >> index 0000000000..ceb09f8247 >> --- /dev/null >> +++ b/package/amlogic-boot-fip/Config.in >> @@ -0,0 +1,17 @@ >> +config BR2_PACKAGE_AMLOGIC_BOOT_FIP >> + bool "amlogic-boot-fip" > > Indentation is wrong here: it should be just one tab, but you have one > tab + one space. Make sure to run "make check-package" and fix the > coding style issues. Thanks, i missed this. > > Also, you need: > > depends on BR2_TARGET_UBOOT > > because this package depends on U-Boot being enabled. > >> diff --git a/package/amlogic-boot-fip/amlogic-boot-fip.hash b/package/amlogic-boot-fip/amlogic-boot-fip.hash >> new file mode 100644 >> index 0000000000..5d6dd237e3 >> --- /dev/null >> +++ b/package/amlogic-boot-fip/amlogic-boot-fip.hash >> @@ -0,0 +1,2 @@ >> +# Locally calculated >> +sha256 cdf9d3872457c33a2755cc504f6b0560a62a6ee04437ac28e66623a345ed4936 amlogic-boot-fip-7ff0004e0e4d261ba81334a2f46302bd06704aca-br1.tar.gz > > Please add the hash of the license file. > >> diff --git a/package/amlogic-boot-fip/amlogic-boot-fip.mk b/package/amlogic-boot-fip/amlogic-boot-fip.mk >> new file mode 100644 >> index 0000000000..6f646ae871 >> --- /dev/null >> +++ b/package/amlogic-boot-fip/amlogic-boot-fip.mk >> @@ -0,0 +1,37 @@ >> + >> +################################################################################ >> +# >> +# amlogic-boot-fip >> +# >> +################################################################################ >> + >> +AMLOGIC_BOOT_FIP_VERSION = 7ff0004e0e4d261ba81334a2f46302bd06704aca >> +AMLOGIC_BOOT_FIP_SITE = https://github.com/LibreELEC/amlogic-boot-fip >> +AMLOGIC_BOOT_FIP_SITE_METHOD = git > > Please use the Github macro. Replace the _SITE variable by: > > AMLOGIC_BOOT_FIP_SITE = $(call github,LibreELEC,amlogic-boot-fip,$(AMLOGIC_BOOT_FIP_VERSION)) > > and drop the AMLOGIC_BOOT_FIP_SITE_METHOD variable. > >> +AMLOGIC_BOOT_FIP_INSTALL_IMAGES = YES >> +AMLOGIC_BOOT_FIP_DEPENDENCIES = uboot >> + >> +AMLOGIC_BOOT_FIP_LICENSE = PROPRIETARY > > Please add AMLOGIC_BOOT_FIP_LICENSE_FILES as there is a license file in > the repository (which contains the problematic clause) > >> +AMLOGIC_BOOT_FIP_REDISTRIBUTE = NO >> + >> +AMLOGIC_BOOT_BINS += u-boot.bin.sd.bin > > Just = instead of +=. But is this variable really needed? See below. > >> + >> +define AMLOGIC_BOOT_FIP_BUILD_CMDS >> + mkdir -p $(@D)/fip >> + cp $(BINARIES_DIR)/u-boot.bin $(@D)/fip/bl33.bin >> + cd "$(@D)"; ./build-fip.sh $(call qstrip,$(BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD)) $(@D)/fip/bl33.bin $(@D)/fip > > Please use tabs for indentation. Is copying $(BINARIES_DIR)/u-boot.bin > to $(@D)/fip/bl33.bin if it gets passed as argument to build-fip.sh ? > > Would something like: > > cd $(@D) && \ > ./build-fip.sh \ > $(call qstrip,$(BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD)) \ > $(BINARIES_DIR)/u-boot.bin \ > $(@D)/fip > > work ? Seems to yes. It really can be improved. Thanks. > >> +endef >> + >> +ifeq ($(BR2_PACKAGE_AMLOGIC_BOOT_FIP),y) > > Use: > > ifeq ($(BR2_PACKAGE_AMLOGIC_BOOT_FIP)$(BR_BUILDING),yy) > > so that this check is only done when building. > >> +ifeq ($(call qstrip,$(BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD)),) >> +$(error No board u-boot firmware config name specified, check your BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD setting) >> +endif # qstrip BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD >> +endif >> + >> +define AMLOGIC_BOOT_FIP_INSTALL_IMAGES_CMDS >> + $(foreach f,$(AMLOGIC_BOOT_BINS), \ >> + cp -dpf "$(@D)/fip/$(f)" "$(BINARIES_DIR)/" >> + ) > > Why have a loop with a $(AMLOGIC_BOOT_BINS) if there's only one file to > copy? In some cases you may need more than one file. But you're right it's better this way. > > Just: > > $(INSTALL) -D -m 0644 $(@D)/fip/u-boot.bin.sd.bin $(BINARIES_DIR)/u-boot.bin.sd.bin > > I would have fixed myself all those small details, but the > licensing/redistribution restriction seems to be a major issue to me. Thank you for sorting out the bugs. I'll fix them in the next version of the patch, if we come to a consensus on the possibility of using the license. > > Best regards, > > Thomas
Hello, On Sat, 22 Jan 2022 18:05:06 +0300 Vyacheslav <adeep@lexina.in> wrote: > > So how can the contents of this repository be useful? OK, then can be > > used locally for your own experiments. But for building an actual > > device that you can ship/provide to others, using the contents of that > > repository, because Amlogic does not even allow you to distribute the > > contents of this repository. > > > > So I am wondering if it's really reasonable to package this in > > Buildroot. > > > You already have package/odroidc2-firmware with same license. > amlogic-boot-fip just put all similar binaries together and Neil > Armstrong made a build system for aml uboot binaries. Well, I wasn't aware package/odroidc2-firmware was under the same restrictive license. Are the license terms for package/odroidc2-firmware available somewhere? This package is downloaded from https://github.com/hardkernel/u-boot, but I don't see the license terms from Amlogic preventing redistribution. Of course, I understand that they simply may be missing (which would be really bad!). But how can anyone use those blobs? You can't redistribute them. According to their license, just putting them on Github is not even allowed. Thomas
Hi, Neil! Can you help us with understanding license for Amlogic binaries in https://github.com/LibreELEC/amlogic-boot-fip? 22.01.2022 18:09, Thomas Petazzoni wrote: > Hello, > > On Sat, 22 Jan 2022 18:05:06 +0300 > Vyacheslav <adeep@lexina.in> wrote: > >>> So how can the contents of this repository be useful? OK, then can be >>> used locally for your own experiments. But for building an actual >>> device that you can ship/provide to others, using the contents of that >>> repository, because Amlogic does not even allow you to distribute the >>> contents of this repository. >>> >>> So I am wondering if it's really reasonable to package this in >>> Buildroot. >>> >> You already have package/odroidc2-firmware with same license. >> amlogic-boot-fip just put all similar binaries together and Neil >> Armstrong made a build system for aml uboot binaries. > > Well, I wasn't aware package/odroidc2-firmware was under the same > restrictive license. Are the license terms for > package/odroidc2-firmware available somewhere? This package is > downloaded from https://github.com/hardkernel/u-boot, but I don't see > the license terms from Amlogic preventing redistribution. Of course, I > understand that they simply may be missing (which would be really bad!). > > But how can anyone use those blobs? You can't redistribute them. > According to their license, just putting them on Github is not even > allowed. > > Thomas
Hi Thomas, On 22/01/2022 17:09, Vyacheslav wrote: > Hi, Neil! > Can you help us with understanding license for Amlogic binaries in > https://github.com/LibreELEC/amlogic-boot-fip? > > > 22.01.2022 18:09, Thomas Petazzoni wrote: >> Hello, >> >> On Sat, 22 Jan 2022 18:05:06 +0300 >> Vyacheslav <adeep@lexina.in> wrote: >> >>>> So how can the contents of this repository be useful? OK, then can be >>>> used locally for your own experiments. But for building an actual >>>> device that you can ship/provide to others, using the contents of that >>>> repository, because Amlogic does not even allow you to distribute the >>>> contents of this repository. >>>> >>>> So I am wondering if it's really reasonable to package this in >>>> Buildroot. >>>> >>> You already have package/odroidc2-firmware with same license. >>> amlogic-boot-fip just put all similar binaries together and Neil >>> Armstrong made a build system for aml uboot binaries. >> >> Well, I wasn't aware package/odroidc2-firmware was under the same >> restrictive license. Are the license terms for >> package/odroidc2-firmware available somewhere? This package is >> downloaded from https://github.com/hardkernel/u-boot, but I don't see >> the license terms from Amlogic preventing redistribution. Of course, I >> understand that they simply may be missing (which would be really bad!). The binaries must be split into 2 categories: - Pre-built: bl2, bl31, bl21, bl32, fip_create, aml_encrypt_*, ddr*.fw, acs_tool.py - Built in the Vendor U-Boot source: acs.bin bl301.bin In 2019, Amlogic finally added a LICENSE for the pre-built binaries, before nobody knew what was the term of the distribution. commit 6abaf9a869a6584b3cfca8b96d0946ed49bc9b64 Author: Lawrence Mok <lawrence.mok@amlogic.com> Date: Mon May 6 12:34:56 2019 -0700 add LICENSE file and text referring to it [1/1] Change-Id: Id291f42bec3ddb0c2162e6540ce1f35d1cb1d079 The LICENSE can be found at [1] in Khadas github. Concerning the acs.bin & bl301.bin, they use the U-Boot build system and config header files and all these were also updated with the following SPDX: /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ commit 94de43d3d940cf75b4a9e4fd2a2715be8eff6138 Author: Jiucheng Xu <jiucheng.xu@amlogic.com> Date: Wed Dec 16 10:11:00 2020 +0800 license: Fix the license of amlogic related codes [1/1] PD#SWPL-39001 Problem: A customer want to add amlogic driver in uboot to their private bootloader. Since the driver codes are licensed under GPL-2.0, and customer have to open their code, so we need fix the license issue. Solution: Fix the license of our related code in uboot by adding MIT license Verify: Franklin Change-Id: I2f3571e8720d1f4db069f882353d6ae050702cba Signed-off-by: Jiucheng Xu <jiucheng.xu@amlogic.com> Note, none of the vendor who publicly published the Amlogic U-Boot source has this change, so we can consider acs.bin & bl301.bin generated from GPL-2.0 as the commit explains. >> >> But how can anyone use those blobs? You can't redistribute them. >> According to their license, just putting them on Github is not even >> allowed. The pre-built binaries stored on the LibreELEC repository only comes from public Vendor sources (Khadas, HardKernel, Libre Computer, FriendlyARM, Radxa) and checked against vendor repositories we have access to. We assume they got permission from Amlogic to publicly redistribute these binaries as we (BayLibre) were allowed to redistribute the VDEC firmware in [2] & [3]. Note the situation is still unclear, this is why I haven't continued my initial patchset for libretech-cc at [4] following your concerns over licensing. Neil >> >> Thomas [1] https://github.com/khadas/u-boot/blob/khadas-vims-pie/fip/LICENSE [2] https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/LICENSE.amlogic_vdec [3] https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/meson/vdec?id=e04cc56d0e6b6ff05924ff88fdba1a438ee7d3c8 [4] https://patchwork.ozlabs.org/project/buildroot/cover/1533545408-11248-1-git-send-email-narmstrong@baylibre.com/
Hello Neil, Thanks for the additional feedback. On Mon, 24 Jan 2022 14:41:49 +0100 Neil Armstrong <narmstrong@baylibre.com> wrote: > The binaries must be split into 2 categories: > - Pre-built: bl2, bl31, bl21, bl32, fip_create, aml_encrypt_*, ddr*.fw, acs_tool.py > - Built in the Vendor U-Boot source: acs.bin bl301.bin Right. > In 2019, Amlogic finally added a LICENSE for the pre-built binaries, before > nobody knew what was the term of the distribution. > > commit 6abaf9a869a6584b3cfca8b96d0946ed49bc9b64 > Author: Lawrence Mok <lawrence.mok@amlogic.com> > Date: Mon May 6 12:34:56 2019 -0700 > > add LICENSE file and text referring to it [1/1] > > Change-Id: Id291f42bec3ddb0c2162e6540ce1f35d1cb1d079 > > The LICENSE can be found at [1] in Khadas github. And this license is the one used at https://github.com/LibreELEC/amlogic-boot-fip which Vyacheslav wants to package in Buildroot, and this license is extremely restrictive. Basically, it says that excepts private use of the content of this repository, you can't do anything with it. > Concerning the acs.bin & bl301.bin, they use the U-Boot build system and > config header files and all these were also updated with the following SPDX: > /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ I don't really see what the license of the U-Boot build system and config headers has to do with the resulting license of the binaries. > commit 94de43d3d940cf75b4a9e4fd2a2715be8eff6138 > Author: Jiucheng Xu <jiucheng.xu@amlogic.com> > Date: Wed Dec 16 10:11:00 2020 +0800 > > license: Fix the license of amlogic related codes [1/1] > > PD#SWPL-39001 > > Problem: > A customer want to add amlogic driver in uboot to > their private bootloader. Since the driver codes > are licensed under GPL-2.0, and customer have > to open their code, so we need fix the license > issue. > > Solution: > Fix the license of our related code in uboot by > adding MIT license > > Verify: > Franklin > > Change-Id: I2f3571e8720d1f4db069f882353d6ae050702cba > Signed-off-by: Jiucheng Xu <jiucheng.xu@amlogic.com> > > Note, none of the vendor who publicly published the Amlogic U-Boot > source has this change, so we can consider acs.bin & bl301.bin > generated from GPL-2.0 as the commit explains. This is really a stretch. The question is which source files are compiled into acs.bin and bl301.bin ? If they use parts under the GPL-2.0, then indeed we can assume the whole is also under GPL-2.0, as it is the only license under which derivative works can be published. But the repository at https://github.com/LibreELEC/amlogic-boot-fip/ contains a lot more things than acs.bin and bl301.bin. > The pre-built binaries stored on the LibreELEC repository only comes from > public Vendor sources (Khadas, HardKernel, Libre Computer, FriendlyARM, Radxa) > and checked against vendor repositories we have access to. > > We assume they got permission from Amlogic to publicly redistribute these binaries > as we (BayLibre) were allowed to redistribute the VDEC firmware in [2] & [3]. If that's the case, then why does https://github.com/LibreELEC/amlogic-boot-fip has this LICENSE file with scary terms? I am really surprised by how unclear the licensing terms are for those blobs. This should scare pretty much any company from doing products based on Amlogic SoCs. Would it be possible to clarify this with Amlogic, and instead of their silly terms of "you can't do anything with it", have a license that at least allows distribution on Amlogic platforms? Again, thanks for your support on this! Thomas
Hi. Thanks all for replies. 24.01.2022 23:45, Thomas Petazzoni wrote: > Hello Neil, > > Thanks for the additional feedback. > > On Mon, 24 Jan 2022 14:41:49 +0100 > Neil Armstrong <narmstrong@baylibre.com> wrote: > >> The binaries must be split into 2 categories: >> - Pre-built: bl2, bl31, bl21, bl32, fip_create, aml_encrypt_*, ddr*.fw, acs_tool.py >> - Built in the Vendor U-Boot source: acs.bin bl301.bin > > Right. > >> In 2019, Amlogic finally added a LICENSE for the pre-built binaries, before >> nobody knew what was the term of the distribution. >> >> commit 6abaf9a869a6584b3cfca8b96d0946ed49bc9b64 >> Author: Lawrence Mok <lawrence.mok@amlogic.com> >> Date: Mon May 6 12:34:56 2019 -0700 >> >> add LICENSE file and text referring to it [1/1] >> >> Change-Id: Id291f42bec3ddb0c2162e6540ce1f35d1cb1d079 >> >> The LICENSE can be found at [1] in Khadas github. > > And this license is the one used at > https://github.com/LibreELEC/amlogic-boot-fip which Vyacheslav wants to > package in Buildroot, and this license is extremely restrictive. > Basically, it says that excepts private use of the content of this > repository, you can't do anything with it. > >> Concerning the acs.bin & bl301.bin, they use the U-Boot build system and >> config header files and all these were also updated with the following SPDX: >> /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ > > I don't really see what the license of the U-Boot build system and > config headers has to do with the resulting license of the binaries. > >> commit 94de43d3d940cf75b4a9e4fd2a2715be8eff6138 >> Author: Jiucheng Xu <jiucheng.xu@amlogic.com> >> Date: Wed Dec 16 10:11:00 2020 +0800 >> >> license: Fix the license of amlogic related codes [1/1] >> >> PD#SWPL-39001 >> >> Problem: >> A customer want to add amlogic driver in uboot to >> their private bootloader. Since the driver codes >> are licensed under GPL-2.0, and customer have >> to open their code, so we need fix the license >> issue. >> >> Solution: >> Fix the license of our related code in uboot by >> adding MIT license >> >> Verify: >> Franklin >> >> Change-Id: I2f3571e8720d1f4db069f882353d6ae050702cba >> Signed-off-by: Jiucheng Xu <jiucheng.xu@amlogic.com> >> >> Note, none of the vendor who publicly published the Amlogic U-Boot >> source has this change, so we can consider acs.bin & bl301.bin >> generated from GPL-2.0 as the commit explains. > > This is really a stretch. The question is which source files are > compiled into acs.bin and bl301.bin ? If they use parts under the > GPL-2.0, then indeed we can assume the whole is also under GPL-2.0, as > it is the only license under which derivative works can be published. These sources usually published inside Amlogic U-Boot source > > But the repository at https://github.com/LibreELEC/amlogic-boot-fip/ > contains a lot more things than acs.bin and bl301.bin. > >> The pre-built binaries stored on the LibreELEC repository only comes from >> public Vendor sources (Khadas, HardKernel, Libre Computer, FriendlyARM, Radxa) >> and checked against vendor repositories we have access to. >> >> We assume they got permission from Amlogic to publicly redistribute these binaries >> as we (BayLibre) were allowed to redistribute the VDEC firmware in [2] & [3]. > > If that's the case, then why does > https://github.com/LibreELEC/amlogic-boot-fip has this LICENSE file > with scary terms? > > I am really surprised by how unclear the licensing terms are for those > blobs. This should scare pretty much any company from doing products > based on Amlogic SoCs. > > Would it be possible to clarify this with Amlogic, and instead of their > silly terms of "you can't do anything with it", have a license that at > least allows distribution on Amlogic platforms? I will try to contact Amlogic via JetHome, but most likely after the Chinese New Year. > > Again, thanks for your support on this! > > Thomas >
diff --git a/DEVELOPERS b/DEVELOPERS index a91e2dfcde..deda803018 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2894,6 +2894,9 @@ N: Volkov Viacheslav <sv99@inbox.ru> F: package/v4l2grab/ F: package/zbar/ +N: Vyacheslav Bocharov <devel+buildroot@lexina.in> +F: package/amlogic-boot-fip/ + N: Wade Berrier <wberrier@gmail.com> F: package/ngrep/ diff --git a/package/Config.in b/package/Config.in index 4df1474b91..df38024af2 100644 --- a/package/Config.in +++ b/package/Config.in @@ -418,6 +418,7 @@ endmenu menu "Hardware handling" menu "Firmware" source "package/am33x-cm3/Config.in" + source "package/amlogic-boot-fip/Config.in" source "package/armbian-firmware/Config.in" source "package/b43-firmware/Config.in" source "package/linux-firmware/Config.in" diff --git a/package/amlogic-boot-fip/Config.in b/package/amlogic-boot-fip/Config.in new file mode 100644 index 0000000000..ceb09f8247 --- /dev/null +++ b/package/amlogic-boot-fip/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_AMLOGIC_BOOT_FIP + bool "amlogic-boot-fip" + help + This package enables access to various u-boot + blobs from the LibreELEC amlogic-boot-fip repository. + + https://github.com/LibreELEC/amlogic-boot-fip + +if BR2_PACKAGE_AMLOGIC_BOOT_FIP + +config BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD + string "Board uboot firmware config" + depends on BR2_PACKAGE_AMLOGIC_BOOT_FIP + help + Name of the board for which U-Boot firmware should be built + from amlogic-boot-fip +endif diff --git a/package/amlogic-boot-fip/amlogic-boot-fip.hash b/package/amlogic-boot-fip/amlogic-boot-fip.hash new file mode 100644 index 0000000000..5d6dd237e3 --- /dev/null +++ b/package/amlogic-boot-fip/amlogic-boot-fip.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 cdf9d3872457c33a2755cc504f6b0560a62a6ee04437ac28e66623a345ed4936 amlogic-boot-fip-7ff0004e0e4d261ba81334a2f46302bd06704aca-br1.tar.gz diff --git a/package/amlogic-boot-fip/amlogic-boot-fip.mk b/package/amlogic-boot-fip/amlogic-boot-fip.mk new file mode 100644 index 0000000000..6f646ae871 --- /dev/null +++ b/package/amlogic-boot-fip/amlogic-boot-fip.mk @@ -0,0 +1,37 @@ + +################################################################################ +# +# amlogic-boot-fip +# +################################################################################ + +AMLOGIC_BOOT_FIP_VERSION = 7ff0004e0e4d261ba81334a2f46302bd06704aca +AMLOGIC_BOOT_FIP_SITE = https://github.com/LibreELEC/amlogic-boot-fip +AMLOGIC_BOOT_FIP_SITE_METHOD = git +AMLOGIC_BOOT_FIP_INSTALL_IMAGES = YES +AMLOGIC_BOOT_FIP_DEPENDENCIES = uboot + +AMLOGIC_BOOT_FIP_LICENSE = PROPRIETARY +AMLOGIC_BOOT_FIP_REDISTRIBUTE = NO + +AMLOGIC_BOOT_BINS += u-boot.bin.sd.bin + +define AMLOGIC_BOOT_FIP_BUILD_CMDS + mkdir -p $(@D)/fip + cp $(BINARIES_DIR)/u-boot.bin $(@D)/fip/bl33.bin + cd "$(@D)"; ./build-fip.sh $(call qstrip,$(BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD)) $(@D)/fip/bl33.bin $(@D)/fip +endef + +ifeq ($(BR2_PACKAGE_AMLOGIC_BOOT_FIP),y) +ifeq ($(call qstrip,$(BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD)),) +$(error No board u-boot firmware config name specified, check your BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD setting) +endif # qstrip BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD +endif + +define AMLOGIC_BOOT_FIP_INSTALL_IMAGES_CMDS + $(foreach f,$(AMLOGIC_BOOT_BINS), \ + cp -dpf "$(@D)/fip/$(f)" "$(BINARIES_DIR)/" + ) +endef + +$(eval $(generic-package))
Firmware Image Package (FIP) sources to sign Amlogic SoC u-boot binaries in LibreELEC, Armbian and meta-meson, buildroot. https://github.com/LibreELEC/amlogic-boot-fip Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in> --- DEVELOPERS | 3 ++ package/Config.in | 1 + package/amlogic-boot-fip/Config.in | 17 +++++++++ .../amlogic-boot-fip/amlogic-boot-fip.hash | 2 + package/amlogic-boot-fip/amlogic-boot-fip.mk | 37 +++++++++++++++++++ 5 files changed, 60 insertions(+) create mode 100644 package/amlogic-boot-fip/Config.in create mode 100644 package/amlogic-boot-fip/amlogic-boot-fip.hash create mode 100644 package/amlogic-boot-fip/amlogic-boot-fip.mk