Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Commit

Permalink
Add licensing details
Browse files Browse the repository at this point in the history
  • Loading branch information
ojousima committed Apr 18, 2018
1 parent d385ae9 commit f65858b
Show file tree
Hide file tree
Showing 7 changed files with 224 additions and 6 deletions.
2 changes: 2 additions & 0 deletions HOW_TO_CONTRIBUTE.md
Expand Up @@ -41,6 +41,8 @@ and ask for advice if you're unsure to where your code should go.
Once you're made a pull request, Ruuvi Team will run an automated Jenkins check to see that the main makefile compiles.
Please be sure that the main makefile compiles the code you've made.
If the Jenkins tests pass, your work is manually reviewed and tested.
We'll also ask you to explicitly accept that code is published under BSD-3 License.
Please add your information to [Contributors list](<licenses/Ruuvi licenses.md>).

Once we've reviewed your code, it will be merged into Ruuvi's main branch.
Once we've merged your code, we'll do our best to maintain the compatibility in future work of Ruuvi's software.
Expand Down
27 changes: 21 additions & 6 deletions README.md
Expand Up @@ -27,6 +27,7 @@ This repository is structured as follows:
| +-- acceleration
| +-- base64
| +-- base91
| +-- etc
+-- keys
| +-- ruuvi_open_private.pem
+-- ruuvi_examples
Expand All @@ -45,6 +46,9 @@ This repository is structured as follows:
| | | | | +-- board_bsp_configuration
| | | | | +-- board_bluetooth_configuration
| | +-- application files
| sdk_overrides
| +-- override_1.c
| +-- etc
+-- Makefile
+-- README.md
+-- .gitignore
Expand Down Expand Up @@ -84,17 +88,18 @@ The SDK folder contains Nordic Software development kit which is used to provide
low-level drivers and abstractions to speed up development. We do not host the SDK to reduce the
size of repository, our makefile downloads and unzips the SDK if it is not present.

### SDK Overrides
SDK overrides are bugfix backports or some minor changes to the official SDK files.

### Licenses
Please note that these examples inherit a lot of code from various sources and pay careful attention to
license and origin of each application. Most importantly, the code will be statically linked against
Nordic Softdevice, for which the source code is not available. Therefore the code is not GPL-compatible.
For more details, please see (licenses.md)[<licenses.md>].

## Developing Ruuvi Firmware

Instructions below are tested using OS X and Ubuntu, but basically any Unix distribution (or even Windows) should be fine. Compilation works also using the *Bash on Ubuntu on Windows* -feature added in the July 2016 update of Windows 10 if you follow the Ubuntu directions. If you've compiled and flashed successfully (or unsuccessfully), please identify yourself on our Slack :)

We also host some ready binaries so it's not necessary to setup a development environment if you would be happy to use those. So, please check a `builds` directory first. If you would like to modify the firmware code, continue reading:

### Prerequisites (to compile):

The project currently uses the Nordic nRF52 SDK version 12.3.0 (downloaded in the `make` process)
Expand Down Expand Up @@ -154,10 +159,20 @@ sudo python setup.py install
nrfutil version
```

To get started you can try:
To get started with development kit you can try:

```
nrfutil settings generate --family NRF52 --application _build/ruuvi_firmware.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 settings.hex
mergehex -m ~/git/s132_nrf52_3.1.0_softdevice.hex ~/git/ruuvitag_b_bootloader_1.0.0.hex settings.hex -o sbc.hex
mergehex -m sbc.hex _build/ruuvi_firmware.hex -o packet.hex
nrfjprog --family nrf52 --eraseall
nrfjprog --family nrf52 --program packet.hex
nrfjprog --family nrf52 --reset
```

Or to create a DFU packet:
```
nrfutil pkg generate --debug-mode --application app.hex --key-file key.pem app_dfu_package.zip
nrfutil pkg generate --debug-mode --application _build/ruuvi_firmware.hex --hw-version 3 --sd-req 0x91 --key-file ~/git/ruuvitag_fw/keys/ruuvi_open_private.pem ruuvi_firmware_dfu.zip
```

Debug mode skips various version checks which is useful for development. Packages have to be signed,
Expand Down Expand Up @@ -200,7 +215,7 @@ After the SoftDevice is flashed successfully, flash the bootloader:
`J-Link>loadfile bootloader/ruuvitag_b2/dual_bank_ble_s132/armgcc/_build/ruuvitag_b2_bootloader.hex`

## With nrfjprog
Get nrfjprog from Nordic's website: TODO LINK
Get nrfjprog from [Nordic's website](http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/nrf5x_command_line_tools/nrf5x_installation.html).
nrfjprog offers simple wrapper to Segger's JLINK. To get started, erase your device:
`nrfjprog --family nrf52 --eraseall`
Then flash softdevice + bootloader:
Expand Down
37 changes: 37 additions & 0 deletions licenses.md
@@ -0,0 +1,37 @@
# Licenses

## Nordic SDK
Nordic SDK provides interface to nRF52 chip and various libraries for software development. [Nordic SDK license](<licenses/Noric SDK Licesnse.md>) applies to nRF5_SDK folders, with the exception of `external` subfolder. It also applies to `bsp` folder, `ruuvi_examples` folder and `sdk_overrides` folder.

## Softdevice s132 V3.1.0
Softdevice is a software radio stack which is used to implement BLE communication on top of nRF52832 integrated circuit. It is distributed as a binary only, embedded within nRF52832.
License is Nordic softdevice license agreement. Full text is available in Nordic SDK and [licenses folder](<licenses/<Noridc Softdevice license.md>)

Softdevice available at https://www.nordicsemi.com/eng/nordic/Products/nRF52832/S132-SD-v3/56261 .

## Bootloader
Bootloader is built on top of Nordic example sources and [nRF5 SDK License](<licenses/Noric SDK Licesnse.md>) applies to it. Additionally the bootloader uses micro-ecc library, available at https://github.com/kmackay/micro-ecc . Micro-ECC is released under [BSD-2 license](<licenses/micro-ecc.md>), copyright 2014 Kenneth MacKay.

Bootloader licensing applies to `bootloader` folder.
Bootloader is statically linked against Softdevice S132 3.1.0

## Ruuvi firmware
Ruuvi firmware is built by Ruuvi community and it is BSD-3 licensed, Nordic SDK licensed or license-free (no explicit license).
These licenses apply to folders `drivers`, `keys`, `libraries`, and `licenses`.
Files which are under Nordic SDK license can be identified by a comment in the header.
Copyleft or BSD-3 status can be identified from the list below.

Copyright in alphabetical order of GitHub usernames, real name and email are listed for user who have listed it on their profile:

angst7: Matt Roche <angst7@gmail.com> (license-free)
dieweltistklein: (license-free)
DG12: Dennis German <DGermang@Real-World-Systems.com> (BSD-3)
frawau: François Wautier (BSD-3)
jessenic: (license-free)
jrosberg: Janne Rosberg (BSD-3)
laurijamsa: Lauri Jämsä <lauri@ruuvi.com> (BSD-3)
mdxs: (license-free)
ojousima: Otso Jousimaa <otso@ruuvi.com> (BSD-3)
scrin: (license-free)

Ruuvi firmware is statically linked against bootloader and softdevice.
36 changes: 36 additions & 0 deletions licenses/Nordic SDK license.md
@@ -0,0 +1,36 @@
Copyright (c) 2010 - 2017, Nordic Semiconductor ASA

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form, except as embedded into a Nordic
Semiconductor ASA integrated circuit in a product or a software update for
such product, must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.

3. Neither the name of Nordic Semiconductor ASA nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

4. This software, with or without modification, must only be used with a
Nordic Semiconductor ASA integrated circuit.

5. Any software provided in binary form under this license must not be reverse
engineered, decompiled, modified and/or disassembled.

THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
90 changes: 90 additions & 0 deletions licenses/Nordic Softdevice License.md
@@ -0,0 +1,90 @@
NORDIC SEMICONDUCTOR ASA SOFTDEVICE LICENSE AGREEMENT

License Agreement for the Nordic Semiconductor ASA ("Nordic") S110, S120, S130 and S132 Bluetooth SoftDevice software packages
("SoftDevice").

You ("You" "Licensee") must carefully and thoroughly read this License Agreement ("Agreement"), and accept to adhere to this Agreement before
downloading, installing and/or using any software or content in the SoftDevice provided herewith.

YOU ACCEPT THIS LICENSE AGREEMENT BY (A) CLICKING ACCEPT OR AGREE TO THIS LICENSE AGREEMENT, WHERE THIS
OPTION IS MADE AVAILABLE TO YOU; OR (B) BY ACTUALLY USING THE SOFTDEVICE, IN THIS CASE YOU AGREE THAT THE USE OF
THE SOFTDEVICE CONSTITUTES ACCEPTANCE OF THE LICENSING AGREEMENT FROM THAT POINT ONWARDS.

IF YOU DO NOT AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL/COMPLETE
INSTALLATION OF, OR IN ANY OTHER WAY MAKE USE OF THE SOFTDEVICE.

1. Grant of License
Subject to the terms in this Agreement Nordic grants Licensee a limited, non-exclusive, non-transferable, non-sub licensable, revocable license
("License"): (a) to use the SoftDevice solely in connection with a Nordic integrated circuit, and (b) to distribute the SoftDevice solely as integrated
in Licensee Product. Licensee shall not use the SoftDevice for any purpose other than specifically authorized herein. It is a material breach of this
agreement to use or modify the SoftDevice for use on any wireless connectivity integrated circuit other than a Nordic integrated circuit.

2. Title
Nordic retains full rights, title, and ownership to the SoftDevice and any and all patents, copyrights, trade secrets, trade names, trademarks, and
other intellectual property rights in and to the SoftDevice.

3. No Modifications or Reverse Engineering
Licensee shall not, modify, reverse engineer, disassemble, decompile or otherwise attempt to discover the source code of any non-source code
parts of the SoftDevice including, but not limited to pre-compiled hex files, binaries and object code.

4. Distribution Restrictions
Except as set forward in Section 1 above, the Licensee may not disclose or distribute any or all parts of the SoftDevice to any third party.
Licensee agrees to provide reasonable security precautions to prevent unauthorized access to or use of the SoftDevice as proscribed herein.
Licensee also agrees that use of and access to the SoftDevice will be strictly limited to the employees and subcontractors of the Licensee
necessary for the performance of development, verification and production tasks under this Agreement. The Licensee is responsible for making
such employees and subcontractors comply with the obligations concerning use and non-disclosure of the SoftDevice.

5. No Other Rights
Licensee shall use the SoftDevice only in compliance with this Agreement and shall refrain from using the SoftDevice in any way that may be
contrary to this Agreement.

6. Fees
Nordic grants the License to the Licensee free of charge provided that the Licensee undertakes the obligations in the Agreement and warrants to
comply with the Agreement.

7. DISCLAIMER OF WARRANTY
THE SOFTDEVICE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EXPRESS OR IMPLIED AND NEITHER NORDIC, ITS
LICENSORS OR AFFILIATES NOR THE COPYRIGHT HOLDERS MAKE ANY REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR
THAT THE SOFTDEVICE WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. THERE
IS NO WARRANTY BY NORDIC OR BY ANY OTHER PARTY THAT THE FUNCTIONS CONTAINED IN THE SOFTDEVICE WILL MEET THE
REQUIREMENTS OF LICENSEE OR THAT THE OPERATION OF THE SOFTDEVICE WILL BE UNINTERRUPTED OR ERROR-FREE.
LICENSEE ASSUMES ALL RESPONSIBILITY AND RISK FOR THE SELECTION OF THE SOFTDEVICE TO ACHIEVE LICENSEE’S
INTENDED RESULTS AND FOR THE INSTALLATION, USE AND RESULTS OBTAINED FROM IT.

8. No Support
Nordic is not obligated to furnish or make available to Licensee any further information, software, technical information, know-how, show-how,
bug-fixes or support. Nordic reserves the right to make changes to the SoftDevice without further notice.

9. Limitation of Liability
In no event shall Nordic, its employees or suppliers, licensors or affiliates be liable for any lost profits, revenue, sales, data or costs of
procurement of substitute goods or services, property damage, personal injury, interruption of business, loss of business information or for any
special, direct, indirect, incidental, economic, punitive, special or consequential damages, however caused and whether arising under contract,
tort, negligence, or other theory of liability arising out of the use of or inability to use the SoftDevice, even if Nordic or its employees or suppliers,
licensors or affiliates are advised of the possibility of such damages. Because some countries/states/jurisdictions do not allow the exclusion or
limitation of liability, but may allow liability to be limited, in such cases, Nordic, its employees or licensors or affiliates’ liability shall be limited to
USD 50.

10. Breach of Contract
Upon a breach of contract by the Licensee, Nordic and its licensor are entitled to damages in respect of any direct loss which can be reasonably
attributed to the breach by the Licensee. If the Licensee has acted with gross negligence or willful misconduct, the Licensee shall cover both
direct and indirect costs for Nordic and its licensors.

11. Indemnity
Licensee undertakes to indemnify, hold harmless and defend Nordic and its directors, officers, affiliates, shareholders, licensors, employees and
agents from and against any claims or lawsuits, including attorney's fees, that arise or result of the Licensee’s execution of the License and which
is not due to causes for which Nordic is responsible.

12. Governing Law
This Agreement shall be construed according to the laws of Norway, and hereby submits to the exclusive jurisdiction of the Oslo tingrett.

13. Assignment
Licensee shall not assign this Agreement or any rights or obligations hereunder without the prior written consent of Nordic.

14. Termination
Without prejudice to any other rights, Nordic may cancel this Agreement if Licensee does not abide by the terms and conditions of this
Agreement. Upon termination Licensee must promptly cease the use of the License and destroy all copies of the Licensed Technology and any
other material provided by Nordic or its affiliate, or produced by the Licensee in connection with the Agreement or the Licensed Technology.

15. Third party beneficiaries
Nordic’s licensors are intended third party beneficiaries under this Agreement.
16 changes: 16 additions & 0 deletions licenses/Ruuvi licenses.md
@@ -0,0 +1,16 @@
Ruuvi firmware is built by Ruuvi community and it is either BSD-3 licensed or copyleft.

Copyright in alphabetical order of GitHub usernames, real name and email are listed for user who have listed it on their profile:

angst7: Matt Roche <angst7@gmail.com> (Copyleft)
dieweltistklein: (Copyleft)
DG12: Dennis German <DGermang@Real-World-Systems.com> (BSD-3)
frawau: François Wautier (BSD-3)
jessenic: (Copyleft)
jrosberg: Janne Rosberg (BSD-3)
laurijamsa: Lauri Jämsä <lauri@ruuvi.com> (BSD-3)
mdxs: (Copyleft)
ojousima: Otso Jousimaa <otso@ruuvi.com> (BSD-3)
scrin: (Copyleft)

Ruuvi firmware is statically linked against bootloader and softdevice.
22 changes: 22 additions & 0 deletions licenses/micro-ecc.md
@@ -0,0 +1,22 @@

Copyright (c) 2014, Kenneth MacKay
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 comments on commit f65858b

Please sign in to comment.