Skip to content

Commit

Permalink
build: parametrize ADI legal info for Written Offer
Browse files Browse the repository at this point in the history
Added a build constant (ADI_LEGAL) that is only enabled for PlutoSDR at
build time.
This should allow us to parametrize Legal info for potential/future ADI
devices that may reside in this repo.

Signed-off-by: Alexandru Ardelean <[email protected]>
  • Loading branch information
commodo committed May 18, 2018
1 parent e155453 commit 36fbc8f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ buildroot/output/images/rootfs.cpio.gz:
@echo device-fw $(VERSION)> $(CURDIR)/buildroot/board/$(TARGET)/VERSIONS
@$(foreach dir,$(VSUBDIRS),echo $(dir) $(shell cd $(dir) && git describe --abbrev=4 --dirty --always --tags) >> $(CURDIR)/buildroot/board/$(TARGET)/VERSIONS;)
make -C buildroot ARCH=arm zynq_$(TARGET)_defconfig
make -C buildroot legal-info
scripts/legal_info_html.sh "$(COMPLETE_NAME)" "$(CURDIR)/buildroot/board/$(TARGET)/VERSIONS"
ADI_LEGAL=$(ADI_LEGAL) make -C buildroot legal-info
ADI_LEGAL=$(ADI_LEGAL) scripts/legal_info_html.sh "$(COMPLETE_NAME)" "$(CURDIR)/buildroot/board/$(TARGET)/VERSIONS"
cp build/LICENSE.html buildroot/board/$(TARGET)/msd/LICENSE.html
make -C buildroot TOOLCHAIN_EXTERNAL_INSTALL_DIR= ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) BUSYBOX_CONFIG_FILE=$(CURDIR)/buildroot/board/$(TARGET)/busybox-1.25.0.config all

Expand Down
8 changes: 6 additions & 2 deletions scripts/legal_info_html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,9 @@ echo "<div class="boxed">" >> ${FILE}
html_h2 "Written Offer"

echo "As described above, the firmware included in the ${TARGET} contains copyrighted software that is released and distributed under many licenses, including the GPL.
A copy of the licenses are included in this file (below).
You may obtain the complete Corresponding Source code from us for a period of three years after our last shipment of this product, which will be no earlier than 01Jan2021, by sending a money order or check for \$15 (USD) to:
A copy of the licenses are included in this file (below)." >> ${FILE}
if [ "$ADI_LEGAL" == "1" ] ; then
echo "You may obtain the complete Corresponding Source code from us for a period of three years after our last shipment of this product, which will be no earlier than 01Jan2021, by sending a money order or check for \$15 (USD) to:
<pre>
GPL Compliance
Systems Development Group
Expand All @@ -276,6 +277,9 @@ Please write “<i>source for the ${TARGET}</i>” in the memo line of your paym
Since the source does not fit on a DVD-RW, it will be delivered on a USB Thumb drive (hense the higher cost than just DVD or CD).
<p><b>You will also find a the source on-line, and are encouraged to obtain it for zero cost, at the project web sites.</b></p>
</div>" >> ${FILE}
else # not ADI_LEGAL
echo "Since you, the end user built this from source, for ${TARGET}, and didn't get a binary, there is no requirement for a written offer." >> ${FILE}
fi

html_h2 "NO WARRANTY"

Expand Down
2 changes: 2 additions & 0 deletions scripts/pluto.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

# Target specific constants go here

ADI_LEGAL:=1

HDF_URL:=http://github.com/analogdevicesinc/plutosdr-fw/releases/download/${LATEST_TAG}/system_top.hdf
TARGET_DTS_FILES:= zynq-pluto-sdr.dtb zynq-pluto-sdr-revb.dtb zynq-pluto-sdr-revc.dtb
COMPLETE_NAME:=PlutoSDR
Expand Down

0 comments on commit 36fbc8f

Please sign in to comment.