summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.com>2020-06-03 23:40:05 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.com>2020-07-06 19:16:25 +0100
commit34b4993d63a6b576f29d624385c681f679b4124c (patch)
treeb97df586ef04e7158ede2fd9cc5be900bab6cafa /tools
parentd7e57259f9d6c73dfba46a4710625bde4e50979a (diff)
Add license to some obvious files.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/analyze_heap_dump.py4
-rw-r--r--tools/analyze_mpy.py4
-rwxr-xr-xtools/bootstrap_upip.sh4
-rwxr-xr-xtools/build-stm-latest.sh4
-rw-r--r--tools/build_board_info.py4
-rw-r--r--tools/build_memory_info.py27
-rwxr-xr-xtools/build_release_files.py4
-rw-r--r--tools/chart_code_size.py4
-rwxr-xr-xtools/check_code_size.sh5
-rw-r--r--tools/check_translations.py4
-rw-r--r--tools/ci_new_boards_check.py4
-rwxr-xr-xtools/codestats.sh5
-rw-r--r--tools/convert_release_notes.py4
-rw-r--r--tools/cpboard.py35
-rw-r--r--tools/dfu.py4
-rw-r--r--tools/extract_pyi.py4
-rw-r--r--tools/file2h.py4
-rw-r--r--tools/fixup_translations.py4
-rw-r--r--tools/gc_activity.py4
-rw-r--r--tools/gc_activity_between_collects.py4
-rwxr-xr-xtools/gen-changelog.sh4
-rw-r--r--tools/gen_display_resources.py4
-rwxr-xr-xtools/gen_ld_files.py5
-rw-r--r--tools/gen_usb_descriptor.py4
-rw-r--r--tools/gendoc.py4
-rwxr-xr-xtools/git-checkout-latest-tag.sh5
-rw-r--r--tools/hid_report_descriptors.py23
-rw-r--r--tools/insert-usb-ids.py4
-rw-r--r--tools/join_bins.py4
-rwxr-xr-xtools/make-frozen.py5
-rwxr-xr-xtools/mpy-tool.py27
-rwxr-xr-xtools/mpy_bin2res.py5
-rwxr-xr-xtools/mpy_cross_all.py5
-rwxr-xr-xtools/preprocess_frozen_modules.py5
-rwxr-xr-xtools/print_status.py4
-rwxr-xr-xtools/pyboard.py29
-rwxr-xr-xtools/pydfu.py9
-rwxr-xr-xtools/tinytest-codegen.py4
-rw-r--r--tools/upip.py10
-rw-r--r--tools/upip_utarfile.py4
40 files changed, 173 insertions, 127 deletions
diff --git a/tools/analyze_heap_dump.py b/tools/analyze_heap_dump.py
index b8f2bd011..887871db7 100755
--- a/tools/analyze_heap_dump.py
+++ b/tools/analyze_heap_dump.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
# This script renders a graph of the MicroPython heap at the given point it was dumped.
# It takes three files, the binary dump of ram, the binary for CircuitPython and the linker map file.
diff --git a/tools/analyze_mpy.py b/tools/analyze_mpy.py
index 376207a24..a2f541d0f 100644
--- a/tools/analyze_mpy.py
+++ b/tools/analyze_mpy.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import sys
import binascii
import io
diff --git a/tools/bootstrap_upip.sh b/tools/bootstrap_upip.sh
index 2891775d7..8b9d199fa 100755
--- a/tools/bootstrap_upip.sh
+++ b/tools/bootstrap_upip.sh
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
# This script performs bootstrap installation of upip package manager from PyPI
# All the other packages can be installed using it.
diff --git a/tools/build-stm-latest.sh b/tools/build-stm-latest.sh
index 07cb168da..bfee1b192 100755
--- a/tools/build-stm-latest.sh
+++ b/tools/build-stm-latest.sh
@@ -1,5 +1,9 @@
#!/bin/bash
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
# function for building firmware
function do_build() {
descr=$1
diff --git a/tools/build_board_info.py b/tools/build_board_info.py
index bbafe19f6..6ed8b8c16 100644
--- a/tools/build_board_info.py
+++ b/tools/build_board_info.py
@@ -1,5 +1,9 @@
#!/usr/bin/env python3
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import json
import os
import subprocess
diff --git a/tools/build_memory_info.py b/tools/build_memory_info.py
index 808b70bd2..26697b974 100644
--- a/tools/build_memory_info.py
+++ b/tools/build_memory_info.py
@@ -1,28 +1,9 @@
#!/usr/bin/env python3
+
+# SPDX-FileCopyrightText: Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
#
-# This file is part of the MicroPython project, http://micropython.org/
-#
-# The MIT License (MIT)
-#
-# Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
+# SPDX-License-Identifier: MIT
import re
import sys
diff --git a/tools/build_release_files.py b/tools/build_release_files.py
index 09133e51f..3563dd99f 100755
--- a/tools/build_release_files.py
+++ b/tools/build_release_files.py
@@ -1,5 +1,9 @@
#! /usr/bin/env python3
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import os
import sys
import subprocess
diff --git a/tools/chart_code_size.py b/tools/chart_code_size.py
index 0b55787fa..f75269130 100644
--- a/tools/chart_code_size.py
+++ b/tools/chart_code_size.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
# This script renders a graph of the CircuitPython rom image.
# It takes the single elf file and uses objdump to get its contents.
diff --git a/tools/check_code_size.sh b/tools/check_code_size.sh
index 2925ff168..bdf1b5ad9 100755
--- a/tools/check_code_size.sh
+++ b/tools/check_code_size.sh
@@ -1,4 +1,9 @@
#!/bin/bash
+
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
#
# This script check that changes don't lead to code size regressions.
# (Size of the language core (== minimal port should not grow)).
diff --git a/tools/check_translations.py b/tools/check_translations.py
index 7c008d3da..95776a544 100644
--- a/tools/check_translations.py
+++ b/tools/check_translations.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
# Validate that all entries in the .pot are in every .po. Only the .pot is updated so we can detect
# if a translation was added to the source but isn't in a .po. This ensures translators can grab
# complete files to work on.
diff --git a/tools/ci_new_boards_check.py b/tools/ci_new_boards_check.py
index 8bb8876fb..86010bad3 100644
--- a/tools/ci_new_boards_check.py
+++ b/tools/ci_new_boards_check.py
@@ -1,5 +1,9 @@
#! /usr/bin/env python3
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import sys
import os
import json
diff --git a/tools/codestats.sh b/tools/codestats.sh
index 5f7625c45..c0dd747dc 100755
--- a/tools/codestats.sh
+++ b/tools/codestats.sh
@@ -1,4 +1,9 @@
#!/bin/sh
+
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
#
# This script generates statistics (build size, speed) for successive
# revisions of the code. It checks out git commits one an a time, compiles
diff --git a/tools/convert_release_notes.py b/tools/convert_release_notes.py
index 649184102..4b16f005e 100644
--- a/tools/convert_release_notes.py
+++ b/tools/convert_release_notes.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import sys
import mistune
diff --git a/tools/cpboard.py b/tools/cpboard.py
index 7769cb4f4..464be4ba4 100644
--- a/tools/cpboard.py
+++ b/tools/cpboard.py
@@ -1,33 +1,12 @@
#!/usr/bin/env python3
+
+# SPDX-FileCopyrightText: Copyright (c) 2014-2016 Damien P. George
+# SPDX-FileCopyrightText: Copyright (c) 2017 Paul Sokolovsky
+# SPDX-FileCopyrightText: Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
+# SPDX-FileCopyrightText: Copyright (c) 2018 Noralf Trønnes
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
#
-# This file is part of the MicroPython project, http://micropython.org/
-#
-# The MIT License (MIT)
-#
-# Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
-# Copyright (c) 2018 Noralf Trønnes
-#
-# Parts taken from pyboard.py:
-# Copyright (c) 2014-2016 Damien P. George
-# Copyright (c) 2017 Paul Sokolovsky
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
+# SPDX-License-Identifier: MIT
import os
import re
diff --git a/tools/dfu.py b/tools/dfu.py
index dd6019235..489465f0c 100644
--- a/tools/dfu.py
+++ b/tools/dfu.py
@@ -1,5 +1,9 @@
#!/usr/bin/python
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
# Written by Antonio Galea - 2010/11/18
# Updated for DFU 1.1 by Sean Cross - 2020/03/31
# Distributed under Gnu LGPL 3.0
diff --git a/tools/extract_pyi.py b/tools/extract_pyi.py
index d749d202b..b9366f6ba 100644
--- a/tools/extract_pyi.py
+++ b/tools/extract_pyi.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import os
import sys
import astroid
diff --git a/tools/file2h.py b/tools/file2h.py
index 2a04ae22b..706dd4dd2 100644
--- a/tools/file2h.py
+++ b/tools/file2h.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
# Reads in a text file, and performs the necessary escapes so that it
# can be #included as a static string like:
# static const char string_from_textfile[] =
diff --git a/tools/fixup_translations.py b/tools/fixup_translations.py
index 6db7f1cc5..0362923e8 100644
--- a/tools/fixup_translations.py
+++ b/tools/fixup_translations.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
# Validate that all entries in the .pot are in every .po. Only the .pot is updated so we can detect
# if a translation was added to the source but isn't in a .po. This ensures translators can grab
# complete files to work on.
diff --git a/tools/gc_activity.py b/tools/gc_activity.py
index 8d172ea3a..cc9a21836 100644
--- a/tools/gc_activity.py
+++ b/tools/gc_activity.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import sys
import json
diff --git a/tools/gc_activity_between_collects.py b/tools/gc_activity_between_collects.py
index c02c479f9..f906cf5c7 100644
--- a/tools/gc_activity_between_collects.py
+++ b/tools/gc_activity_between_collects.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import sys
import json
diff --git a/tools/gen-changelog.sh b/tools/gen-changelog.sh
index 6eca1b4b1..b29606b0c 100755
--- a/tools/gen-changelog.sh
+++ b/tools/gen-changelog.sh
@@ -1,5 +1,9 @@
#!/bin/sh
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
echo "MicroPython change log"
for t in $(git tag | grep -v v1.0-rc1 | sort -rV); do
diff --git a/tools/gen_display_resources.py b/tools/gen_display_resources.py
index c08daf477..478a2f22f 100644
--- a/tools/gen_display_resources.py
+++ b/tools/gen_display_resources.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import argparse
import os
diff --git a/tools/gen_ld_files.py b/tools/gen_ld_files.py
index c2ac812bc..1fea1a7ef 100755
--- a/tools/gen_ld_files.py
+++ b/tools/gen_ld_files.py
@@ -1,4 +1,9 @@
#! /usr/bin/env python3
+
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import argparse
import os
diff --git a/tools/gen_usb_descriptor.py b/tools/gen_usb_descriptor.py
index 5e25528f9..9a8423c32 100644
--- a/tools/gen_usb_descriptor.py
+++ b/tools/gen_usb_descriptor.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import argparse
import os
diff --git a/tools/gendoc.py b/tools/gendoc.py
index 61844d203..85411cb41 100644
--- a/tools/gendoc.py
+++ b/tools/gendoc.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
"""
Generate documentation for pyboard API from C files.
"""
diff --git a/tools/git-checkout-latest-tag.sh b/tools/git-checkout-latest-tag.sh
index f6242a946..69fa2ced4 100755
--- a/tools/git-checkout-latest-tag.sh
+++ b/tools/git-checkout-latest-tag.sh
@@ -1,3 +1,8 @@
#!/bin/bash
+
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
git fetch --tags
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
diff --git a/tools/hid_report_descriptors.py b/tools/hid_report_descriptors.py
index 07ed26744..e13e0dbdd 100644
--- a/tools/hid_report_descriptors.py
+++ b/tools/hid_report_descriptors.py
@@ -1,24 +1,7 @@
-# The MIT License (MIT)
+# SPDX-FileCopyrightText: Copyright (c) 2018 Dan Halbert for Adafruit Industries
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
#
-# Copyright (c) 2018 Dan Halbert for Adafruit Industries
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
+# SPDX-License-Identifier: MIT
import struct
diff --git a/tools/insert-usb-ids.py b/tools/insert-usb-ids.py
index cdccd3be9..bf74ceeab 100644
--- a/tools/insert-usb-ids.py
+++ b/tools/insert-usb-ids.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
# Reads the USB VID and PID from the file specified by sys.argv[1] and then
# inserts those values into the template file specified by sys.argv[2],
# printing the result to stdout
diff --git a/tools/join_bins.py b/tools/join_bins.py
index cb73aaabb..a370f86e4 100644
--- a/tools/join_bins.py
+++ b/tools/join_bins.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import sys
output_filename = sys.argv[1]
diff --git a/tools/make-frozen.py b/tools/make-frozen.py
index 1051b520e..ad23b9d59 100755
--- a/tools/make-frozen.py
+++ b/tools/make-frozen.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python
+
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
#
# Create frozen modules structure for MicroPython.
#
diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py
index 5ce24061b..95090466c 100755
--- a/tools/mpy-tool.py
+++ b/tools/mpy-tool.py
@@ -1,28 +1,9 @@
#!/usr/bin/env python3
+
+# SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
#
-# This file is part of the MicroPython project, http://micropython.org/
-#
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Damien P. George
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
+# SPDX-License-Identifier: MIT
# Python 2/3 compatibility code
from __future__ import print_function
diff --git a/tools/mpy_bin2res.py b/tools/mpy_bin2res.py
index 0c89e7e92..8d67b71ba 100755
--- a/tools/mpy_bin2res.py
+++ b/tools/mpy_bin2res.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
#
# This tool converts binary resource files passed on the command line
# into a Python source file containing data from these files, which can
diff --git a/tools/mpy_cross_all.py b/tools/mpy_cross_all.py
index 2bda71e9b..5d9f8bc0b 100755
--- a/tools/mpy_cross_all.py
+++ b/tools/mpy_cross_all.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import argparse
import os
import os.path
diff --git a/tools/preprocess_frozen_modules.py b/tools/preprocess_frozen_modules.py
index 7ae20c4d6..b75a2e723 100755
--- a/tools/preprocess_frozen_modules.py
+++ b/tools/preprocess_frozen_modules.py
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import argparse
import os
import os.path
diff --git a/tools/print_status.py b/tools/print_status.py
index ed563fd68..9a8b311dc 100755
--- a/tools/print_status.py
+++ b/tools/print_status.py
@@ -1,5 +1,9 @@
#!/usr/bin/env python3
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import sys
if len(sys.argv) != 2:
print("""\
diff --git a/tools/pyboard.py b/tools/pyboard.py
index bb5642bd7..ddf6bb6c4 100755
--- a/tools/pyboard.py
+++ b/tools/pyboard.py
@@ -1,29 +1,10 @@
#!/usr/bin/env python
+
+# SPDX-FileCopyrightText: Copyright (c) 2014-2016 Damien P. George
+# SPDX-FileCopyrightText: Copyright (c) 2017 Paul Sokolovsky
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
#
-# This file is part of the MicroPython project, http://micropython.org/
-#
-# The MIT License (MIT)
-#
-# Copyright (c) 2014-2016 Damien P. George
-# Copyright (c) 2017 Paul Sokolovsky
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
+# SPDX-License-Identifier: MIT
"""
pyboard interface
diff --git a/tools/pydfu.py b/tools/pydfu.py
index a7adda37c..a6210c603 100755
--- a/tools/pydfu.py
+++ b/tools/pydfu.py
@@ -1,8 +1,9 @@
#!/usr/bin/env python
-# This file is part of the OpenMV project.
-# Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
-# This work is licensed under the MIT license, see the file LICENSE for
-# details.
+
+# SPDX-FileCopyrightText: Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
"""This module implements enough functionality to program the STM32F4xx over
DFU, without requiring dfu-util.
diff --git a/tools/tinytest-codegen.py b/tools/tinytest-codegen.py
index 7a48f8a9a..74b1878f9 100755
--- a/tools/tinytest-codegen.py
+++ b/tools/tinytest-codegen.py
@@ -1,5 +1,9 @@
#!/usr/bin/env python3
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import os, sys
from glob import glob
from re import sub
diff --git a/tools/upip.py b/tools/upip.py
index a400c3174..27fbae272 100644
--- a/tools/upip.py
+++ b/tools/upip.py
@@ -1,10 +1,10 @@
-#
# upip - Package manager for MicroPython
+
+# SPDX-FileCopyrightText: Copyright (c) 2015-2018 Paul Sokolovsky
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
#
-# Copyright (c) 2015-2018 Paul Sokolovsky
-#
-# Licensed under the MIT license.
-#
+# SPDX-License-Identifier: MIT
+
import sys
import gc
import uos as os
diff --git a/tools/upip_utarfile.py b/tools/upip_utarfile.py
index 460ca2cd4..44d636452 100644
--- a/tools/upip_utarfile.py
+++ b/tools/upip_utarfile.py
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
+#
+# SPDX-License-Identifier: MIT
+
import uctypes
# http://www.gnu.org/software/tar/manual/html_node/Standard.html