SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/test/py/conftest.py b/test/py/conftest.py
index 83eaca4..446d8cb 100644
--- a/test/py/conftest.py
+++ b/test/py/conftest.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 # Implementation of pytest run-time hook functions. These are invoked by
 # pytest at certain points during operation, e.g. startup, for each executed
diff --git a/test/py/multiplexed_log.css b/test/py/multiplexed_log.css
index 562f69f..3db9927 100644
--- a/test/py/multiplexed_log.css
+++ b/test/py/multiplexed_log.css
@@ -1,8 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 2015 Stephen Warren
  * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0
  */
 
 /*
diff --git a/test/py/multiplexed_log.py b/test/py/multiplexed_log.py
index a2cfd71..f23d5de 100644
--- a/test/py/multiplexed_log.py
+++ b/test/py/multiplexed_log.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 # Generate an HTML-formatted log file containing multiple streams of data,
 # each represented in a well-delineated/-structured fashion.
diff --git a/test/py/pytest.ini b/test/py/pytest.ini
index 67e514f..7e40068 100644
--- a/test/py/pytest.ini
+++ b/test/py/pytest.ini
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 # Static configuration data for pytest. pytest reads this at startup time.
 
diff --git a/test/py/test.py b/test/py/test.py
index 4695079..04baf8d 100755
--- a/test/py/test.py
+++ b/test/py/test.py
@@ -1,9 +1,8 @@
 #!/usr/bin/env python2
+# SPDX-License-Identifier: GPL-2.0
 
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 # Wrapper script to invoke pytest with the directory name that contains the
 # U-Boot tests.
diff --git a/test/py/tests/test_000_version.py b/test/py/tests/test_000_version.py
index 43a02e7..bd089ab 100644
--- a/test/py/tests/test_000_version.py
+++ b/test/py/tests/test_000_version.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 # pytest runs tests the order of their module path, which is related to the
 # filename containing the test. This file is named such that it is sorted
diff --git a/test/py/tests/test_dfu.py b/test/py/tests/test_dfu.py
index 8f6877c..a246003 100644
--- a/test/py/tests/test_dfu.py
+++ b/test/py/tests/test_dfu.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
-#
 # SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
 
 # Test U-Boot's "dfu" command. The test starts DFU in U-Boot, waits for USB
 # device enumeration on the host, executes dfu-util multiple times to test
diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py
index 906ef2f..35bd419 100644
--- a/test/py/tests/test_efi_loader.py
+++ b/test/py/tests/test_efi_loader.py
@@ -1,9 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
 # Copyright (c) 2016, Alexander Graf <agraf@suse.de>
 #
 # based on test_net.py.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 # Test efi loader implementation
 
diff --git a/test/py/tests/test_efi_selftest.py b/test/py/tests/test_efi_selftest.py
index b1ef6bd..747d52d 100644
--- a/test/py/tests/test_efi_selftest.py
+++ b/test/py/tests/test_efi_selftest.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2017, Heinrich Schuchardt <xypron.glpk@gmx.de>
-#
 # SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2017, Heinrich Schuchardt <xypron.glpk@gmx.de>
 
 # Test efi API implementation
 
diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py
index f869401..bfb5fc0 100644
--- a/test/py/tests/test_env.py
+++ b/test/py/tests/test_env.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 # Test operation of shell commands relating to environment variables.
 
diff --git a/test/py/tests/test_fit.py b/test/py/tests/test_fit.py
index 4b32bb1..e407ccc 100755
--- a/test/py/tests/test_fit.py
+++ b/test/py/tests/test_fit.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2013, Google Inc.
-#
 # SPDX-License-Identifier:	GPL-2.0+
+# Copyright (c) 2013, Google Inc.
 #
 # Sanity check of the FIT handling in U-Boot
 
diff --git a/test/py/tests/test_gpt.py b/test/py/tests/test_gpt.py
index 886df43..c8edb33 100644
--- a/test/py/tests/test_gpt.py
+++ b/test/py/tests/test_gpt.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2017 Alison Chaiken
 # Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 # Test GPT manipulation commands.
 
diff --git a/test/py/tests/test_help.py b/test/py/tests/test_help.py
index 420090c..d50295e 100644
--- a/test/py/tests/test_help.py
+++ b/test/py/tests/test_help.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 def test_help(u_boot_console):
     """Test that the "help" command can be executed."""
diff --git a/test/py/tests/test_hush_if_test.py b/test/py/tests/test_hush_if_test.py
index c8f4208..1196e0a 100644
--- a/test/py/tests/test_hush_if_test.py
+++ b/test/py/tests/test_hush_if_test.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
 # SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
 
 # Test operation of the "if" shell command.
 
diff --git a/test/py/tests/test_log.py b/test/py/tests/test_log.py
index 76f9236..d1c2a36 100644
--- a/test/py/tests/test_log.py
+++ b/test/py/tests/test_log.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
 # Copyright (c) 2016, Google Inc.
 #
-# SPDX-License-Identifier:      GPL-2.0+
-#
 # U-Boot Verified Boot Test
 
 """
diff --git a/test/py/tests/test_md.py b/test/py/tests/test_md.py
index 5fe2582..83e3c54 100644
--- a/test/py/tests/test_md.py
+++ b/test/py/tests/test_md.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 import pytest
 import u_boot_utils
diff --git a/test/py/tests/test_mmc_rd.py b/test/py/tests/test_mmc_rd.py
index 7ff7622..c5858cb 100644
--- a/test/py/tests/test_mmc_rd.py
+++ b/test/py/tests/test_mmc_rd.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
-#
 # SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
 
 # Test U-Boot's "mmc read" command. The test reads data from the eMMC or SD
 # card, and validates the no errors occurred, and that the expected data was
diff --git a/test/py/tests/test_net.py b/test/py/tests/test_net.py
index 293b73a..f2e432b 100644
--- a/test/py/tests/test_net.py
+++ b/test/py/tests/test_net.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
-#
 # SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
 
 # Test various network-related functionality, such as the dhcp, ping, and
 # tftpboot commands.
diff --git a/test/py/tests/test_ofplatdata.py b/test/py/tests/test_ofplatdata.py
index 0660ce4..dd8a09f 100644
--- a/test/py/tests/test_ofplatdata.py
+++ b/test/py/tests/test_ofplatdata.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2016 Google, Inc
-#
 # SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2016 Google, Inc
 
 import pytest
 
diff --git a/test/py/tests/test_sandbox_exit.py b/test/py/tests/test_sandbox_exit.py
index 4e333ec..a301f4b 100644
--- a/test/py/tests/test_sandbox_exit.py
+++ b/test/py/tests/test_sandbox_exit.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 import pytest
 import signal
diff --git a/test/py/tests/test_sf.py b/test/py/tests/test_sf.py
index 95a7564..adf8b7d 100644
--- a/test/py/tests/test_sf.py
+++ b/test/py/tests/test_sf.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2016, Xilinx Inc. Michal Simek
 # Copyright (c) 2017, Xiphos Systems Corp. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 import re
 import pytest
diff --git a/test/py/tests/test_shell_basics.py b/test/py/tests/test_shell_basics.py
index 0024d5f..f54f7b7 100644
--- a/test/py/tests/test_shell_basics.py
+++ b/test/py/tests/test_shell_basics.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
 # SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
 
 # Test basic shell functionality, such as commands separate by semi-colons.
 
diff --git a/test/py/tests/test_sleep.py b/test/py/tests/test_sleep.py
index ccef24d..b69edf2 100644
--- a/test/py/tests/test_sleep.py
+++ b/test/py/tests/test_sleep.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
-#
 # SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
 
 import pytest
 import time
diff --git a/test/py/tests/test_ums.py b/test/py/tests/test_ums.py
index 8c3ee2b..e8eb43c 100644
--- a/test/py/tests/test_ums.py
+++ b/test/py/tests/test_ums.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
 # SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
 
 # Test U-Boot's "ums" command. The test starts UMS in U-Boot, waits for USB
 # device enumeration on the host, reads a small block of data from the UMS
diff --git a/test/py/tests/test_unknown_cmd.py b/test/py/tests/test_unknown_cmd.py
index c27ab49..8fc284a 100644
--- a/test/py/tests/test_unknown_cmd.py
+++ b/test/py/tests/test_unknown_cmd.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 def test_unknown_command(u_boot_console):
     """Test that executing an unknown command causes U-Boot to print an
diff --git a/test/py/tests/test_ut.py b/test/py/tests/test_ut.py
index 5c25a2d..62037d2 100644
--- a/test/py/tests/test_ut.py
+++ b/test/py/tests/test_ut.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
-#
 # SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
 
 import os.path
 import pytest
diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py
index c4da79d..ee939f2 100644
--- a/test/py/tests/test_vboot.py
+++ b/test/py/tests/test_vboot.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2016, Google Inc.
-#
 # SPDX-License-Identifier:	GPL-2.0+
+# Copyright (c) 2016, Google Inc.
 #
 # U-Boot Verified Boot Test
 
diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py
index 4bccd72..a14bad6 100644
--- a/test/py/u_boot_console_base.py
+++ b/test/py/u_boot_console_base.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 # Common logic to interact with U-Boot via the console. This class provides
 # the interface that tests use to execute U-Boot shell commands and wait for
diff --git a/test/py/u_boot_console_exec_attach.py b/test/py/u_boot_console_exec_attach.py
index 445b58d..27834b5 100644
--- a/test/py/u_boot_console_exec_attach.py
+++ b/test/py/u_boot_console_exec_attach.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 # Logic to interact with U-Boot running on real hardware, typically via a
 # physical serial port.
diff --git a/test/py/u_boot_console_sandbox.py b/test/py/u_boot_console_sandbox.py
index 647e1f8..a616cfb 100644
--- a/test/py/u_boot_console_sandbox.py
+++ b/test/py/u_boot_console_sandbox.py
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2015 Stephen Warren
 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0
 
 # Logic to interact with the sandbox port of U-Boot, running as a sub-process.
 
diff --git a/test/py/u_boot_spawn.py b/test/py/u_boot_spawn.py
index 3a0fbfa..108498a 100644
--- a/test/py/u_boot_spawn.py
+++ b/test/py/u_boot_spawn.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
 # SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
 
 # Logic to spawn a sub-process and interact with its stdio.
 
diff --git a/test/py/u_boot_utils.py b/test/py/u_boot_utils.py
index de9ee26..bb31e57 100644
--- a/test/py/u_boot_utils.py
+++ b/test/py/u_boot_utils.py
@@ -1,6 +1,5 @@
-# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
-#
 # SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
 
 # Utility code shared across multiple tests.