license: cleanup: add SPDX Apache-2.0 license identifier

Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/cmake/app/boilerplate.cmake b/cmake/app/boilerplate.cmake
index c8044a5..89b0888 100644
--- a/cmake/app/boilerplate.cmake
+++ b/cmake/app/boilerplate.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # This file must be included into the toplevel CMakeLists.txt file of
 # Zephyr applications, e.g. zephyr/samples/hello_world/CMakeLists.txt
 # must start with the line:
diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake
index 61453b0..cfe7f91 100644
--- a/cmake/ccache.cmake
+++ b/cmake/ccache.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Use ccache if it is installed, unless the user explicitly disables
 # it by setting USE_CCACHE=0.
 
diff --git a/cmake/cfb.cmake b/cmake/cfb.cmake
index 1fdff73..e0263ad 100644
--- a/cmake/cfb.cmake
+++ b/cmake/cfb.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # These functions can be used to generate a CFB font include file from
 # a TrueType/OpenType font file or an image file.
 function(generate_cfb_font
diff --git a/cmake/compiler/clang/generic.cmake b/cmake/compiler/clang/generic.cmake
index aa75ead..b5ea783 100644
--- a/cmake/compiler/clang/generic.cmake
+++ b/cmake/compiler/clang/generic.cmake
@@ -1 +1,3 @@
+# SPDX-License-Identifier: Apache-2.0
+
 find_program(CMAKE_C_COMPILER clang PATH ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)
diff --git a/cmake/compiler/clang/target.cmake b/cmake/compiler/clang/target.cmake
index a399f3a..545913c 100644
--- a/cmake/compiler/clang/target.cmake
+++ b/cmake/compiler/clang/target.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Configuration for host installed llvm
 #
 
diff --git a/cmake/compiler/gcc/generic.cmake b/cmake/compiler/gcc/generic.cmake
index 7f405bc..be84aea 100644
--- a/cmake/compiler/gcc/generic.cmake
+++ b/cmake/compiler/gcc/generic.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 set_ifndef(CC gcc)
 
 find_program(CMAKE_C_COMPILER ${CROSS_COMPILE}${CC}   PATH ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)
diff --git a/cmake/compiler/gcc/target.cmake b/cmake/compiler/gcc/target.cmake
index 4c1d2e5..a4030c0 100644
--- a/cmake/compiler/gcc/target.cmake
+++ b/cmake/compiler/gcc/target.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 set_ifndef(C++ g++)
 
 # Configures CMake for using GCC, this script is re-used by several
diff --git a/cmake/compiler/gcc/target_asm.cmake b/cmake/compiler/gcc/target_asm.cmake
index c942d37..b3c3d09 100644
--- a/cmake/compiler/gcc/target_asm.cmake
+++ b/cmake/compiler/gcc/target_asm.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # See root CMakeLists.txt for description and expectations of this macro
 
 macro(toolchain_cc_asm_base_flags dest_var_name)
diff --git a/cmake/compiler/gcc/target_baremetal.cmake b/cmake/compiler/gcc/target_baremetal.cmake
index 0ed28e6..d268604 100644
--- a/cmake/compiler/gcc/target_baremetal.cmake
+++ b/cmake/compiler/gcc/target_baremetal.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 
 macro(toolchain_cc_nostdinc)
 
diff --git a/cmake/compiler/gcc/target_cpp.cmake b/cmake/compiler/gcc/target_cpp.cmake
index 0f73a7b..1fd03c3 100644
--- a/cmake/compiler/gcc/target_cpp.cmake
+++ b/cmake/compiler/gcc/target_cpp.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # See root CMakeLists.txt for description and expectations of these macros
 
 macro(toolchain_cc_cpp_base_flags dest_list_name)
diff --git a/cmake/compiler/gcc/target_optimizations.cmake b/cmake/compiler/gcc/target_optimizations.cmake
index 583bb13..e884299 100644
--- a/cmake/compiler/gcc/target_optimizations.cmake
+++ b/cmake/compiler/gcc/target_optimizations.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # See root CMakeLists.txt for description and expectations of this macro
 #
 # NOTE: Some GNU toolchains break with plain '-Os' or '-Og', but is fixable
diff --git a/cmake/compiler/gcc/target_security_canaries.cmake b/cmake/compiler/gcc/target_security_canaries.cmake
index 5979fc2..8db8d48 100644
--- a/cmake/compiler/gcc/target_security_canaries.cmake
+++ b/cmake/compiler/gcc/target_security_canaries.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # See root CMakeLists.txt for description and expectations of this macro
 macro(toolchain_cc_security_canaries)
 
diff --git a/cmake/compiler/gcc/target_security_fortify.cmake b/cmake/compiler/gcc/target_security_fortify.cmake
index ec682b4..3aa0944 100644
--- a/cmake/compiler/gcc/target_security_fortify.cmake
+++ b/cmake/compiler/gcc/target_security_fortify.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # See root CMakeLists.txt for description and expectations of this macro
 macro(toolchain_cc_security_fortify)
 
diff --git a/cmake/compiler/host-gcc/generic.cmake b/cmake/compiler/host-gcc/generic.cmake
index 0a44a1a..3f88956 100644
--- a/cmake/compiler/host-gcc/generic.cmake
+++ b/cmake/compiler/host-gcc/generic.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Configures CMake for using GCC
 
 find_program(CMAKE_C_COMPILER gcc)
diff --git a/cmake/compiler/host-gcc/target.cmake b/cmake/compiler/host-gcc/target.cmake
index 67db7e9..8dc58dd 100644
--- a/cmake/compiler/host-gcc/target.cmake
+++ b/cmake/compiler/host-gcc/target.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Configures CMake for using GCC
 
 find_program(CMAKE_C_COMPILER   gcc    )
diff --git a/cmake/compiler/xcc/generic.cmake b/cmake/compiler/xcc/generic.cmake
index 7f405bc..be84aea 100644
--- a/cmake/compiler/xcc/generic.cmake
+++ b/cmake/compiler/xcc/generic.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 set_ifndef(CC gcc)
 
 find_program(CMAKE_C_COMPILER ${CROSS_COMPILE}${CC}   PATH ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)
diff --git a/cmake/compiler/xcc/target.cmake b/cmake/compiler/xcc/target.cmake
index 202713a..a4c1960 100644
--- a/cmake/compiler/xcc/target.cmake
+++ b/cmake/compiler/xcc/target.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 set_ifndef(C++ g++)
 
 # Configures CMake for using GCC, this script is re-used by several
diff --git a/cmake/dts.cmake b/cmake/dts.cmake
index 9aaa688..58e44b9 100644
--- a/cmake/dts.cmake
+++ b/cmake/dts.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include/generated)
 
 # Zephyr code can configure itself based on a KConfig'uration with the
diff --git a/cmake/emu/native.cmake b/cmake/emu/native.cmake
index 77c165d..d6d7f48 100644
--- a/cmake/emu/native.cmake
+++ b/cmake/emu/native.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 add_custom_target(run
   COMMAND
   ${APPLICATION_BINARY_DIR}/zephyr/${KERNEL_EXE_NAME}
diff --git a/cmake/emu/nsim.cmake b/cmake/emu/nsim.cmake
index a2baf2f..bffa615 100644
--- a/cmake/emu/nsim.cmake
+++ b/cmake/emu/nsim.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 find_program(
   NSIM
   nsimdrv
diff --git a/cmake/emu/qemu.cmake b/cmake/emu/qemu.cmake
index e4bec37..a68b09f6 100644
--- a/cmake/emu/qemu.cmake
+++ b/cmake/emu/qemu.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 if("${ARCH}" STREQUAL "x86")
   set_ifndef(QEMU_binary_suffix i386)
 else()
diff --git a/cmake/emu/renode.cmake b/cmake/emu/renode.cmake
index 7a4158c..6f1c592 100644
--- a/cmake/emu/renode.cmake
+++ b/cmake/emu/renode.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 find_program(
   RENODE
   renode
diff --git a/cmake/extensions.cmake b/cmake/extensions.cmake
index f63ba8b..58d9fe3 100644
--- a/cmake/extensions.cmake
+++ b/cmake/extensions.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 ########################################################
 # Table of contents
 ########################################################
diff --git a/cmake/extra_flags.cmake b/cmake/extra_flags.cmake
index e04e640..c669b04 100644
--- a/cmake/extra_flags.cmake
+++ b/cmake/extra_flags.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 separate_arguments(EXTRA_CPPFLAGS_AS_LIST UNIX_COMMAND ${EXTRA_CPPFLAGS})
 separate_arguments(EXTRA_LDFLAGS_AS_LIST UNIX_COMMAND  ${EXTRA_LDFLAGS})
 separate_arguments(EXTRA_CFLAGS_AS_LIST   UNIX_COMMAND ${EXTRA_CFLAGS})
diff --git a/cmake/flash/CMakeLists.txt b/cmake/flash/CMakeLists.txt
index a0743ff..be1e3b8 100644
--- a/cmake/flash/CMakeLists.txt
+++ b/cmake/flash/CMakeLists.txt
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 assert_not(FLASH_SCRIPT "FLASH_SCRIPT has been removed; use BOARD_FLASH_RUNNER")
 assert_not(DEBUG_SCRIPT "DEBUG_SCRIPT has been removed; use BOARD_DEBUG_RUNNER")
 
diff --git a/cmake/fpu-for-gcc-m-cpu.cmake b/cmake/fpu-for-gcc-m-cpu.cmake
index 76562ad..3c2bacd 100644
--- a/cmake/fpu-for-gcc-m-cpu.cmake
+++ b/cmake/fpu-for-gcc-m-cpu.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Defines a mapping from GCC_M_CPU to FPU
 
 if(CONFIG_CPU_HAS_FPU_DOUBLE_PRECISION)
diff --git a/cmake/gcc-m-cpu.cmake b/cmake/gcc-m-cpu.cmake
index cabd8db..b925de4 100644
--- a/cmake/gcc-m-cpu.cmake
+++ b/cmake/gcc-m-cpu.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Determines what argument to give to -mcpu= based on the
 # KConfig'uration and sets this to GCC_M_CPU
 
diff --git a/cmake/generic_toolchain.cmake b/cmake/generic_toolchain.cmake
index 50fb845..83843a1 100644
--- a/cmake/generic_toolchain.cmake
+++ b/cmake/generic_toolchain.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 if(NOT TOOLCHAIN_ROOT)
   if(DEFINED ENV{TOOLCHAIN_ROOT})
     # Support for out-of-tree toolchain
diff --git a/cmake/git.cmake b/cmake/git.cmake
index 7b046e7..a0506e8 100644
--- a/cmake/git.cmake
+++ b/cmake/git.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Use git if it is installed, to set BUILD_VERSION
 
 # https://cmake.org/cmake/help/latest/module/FindGit.html
diff --git a/cmake/hex.cmake b/cmake/hex.cmake
index 0121724..5823dc9 100644
--- a/cmake/hex.cmake
+++ b/cmake/hex.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # from https://gist.github.com/korzo89/71a6de0f388f7cf8b349101b0134060c
 function(from_hex HEX DEC)
     string(SUBSTRING "${HEX}" 2 -1 HEX)
diff --git a/cmake/host-tools.cmake b/cmake/host-tools.cmake
index cc37694..adf635a 100644
--- a/cmake/host-tools.cmake
+++ b/cmake/host-tools.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 include(${ZEPHYR_BASE}/cmake/toolchain/zephyr/host-tools.cmake)
 
 # west is optional
diff --git a/cmake/ide/eclipse_cdt4_generator_amendment.cmake b/cmake/ide/eclipse_cdt4_generator_amendment.cmake
index 2b5283f..1bad729 100644
--- a/cmake/ide/eclipse_cdt4_generator_amendment.cmake
+++ b/cmake/ide/eclipse_cdt4_generator_amendment.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # cmake: Eclipse CDT4 generator amendment
 #
 #1. The generator handles just the COMPILE_DEFINITIONS.
diff --git a/cmake/kconfig.cmake b/cmake/kconfig.cmake
index f789797..002e87d 100644
--- a/cmake/kconfig.cmake
+++ b/cmake/kconfig.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Folders needed for conf/mconf files (kconfig has no method of redirecting all output files).
 # conf/mconf needs to be run from a different directory because of: GH-3408
 file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/kconfig/include/generated)
diff --git a/cmake/kobj.cmake b/cmake/kobj.cmake
index 77866a2..b8cdc53 100644
--- a/cmake/kobj.cmake
+++ b/cmake/kobj.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 function(gen_kobj gen_dir_out)
   if (PROJECT_BINARY_DIR)
     set(gen_dir ${PROJECT_BINARY_DIR}/include/generated)
diff --git a/cmake/pristine.cmake b/cmake/pristine.cmake
index 8855db2..4e56c05 100644
--- a/cmake/pristine.cmake
+++ b/cmake/pristine.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # NB: This could be dangerous to execute, it is assuming the user is
 # checking that the build is out-of-source with code like this:
 #
diff --git a/cmake/python.cmake b/cmake/python.cmake
index 28cda58..923bdae 100644
--- a/cmake/python.cmake
+++ b/cmake/python.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # The 'FindPythonInterp' that is distributed with CMake 3.8 has a bug
 # that we need to work around until we upgrade to 3.13. Until then we
 # maintain a patched copy in our repo. Bug:
diff --git a/cmake/reports/CMakeLists.txt b/cmake/reports/CMakeLists.txt
index fac2411..7c2140d 100644
--- a/cmake/reports/CMakeLists.txt
+++ b/cmake/reports/CMakeLists.txt
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 set(flag_for_ram_report -r)
 set(flag_for_rom_report -F)
 
diff --git a/cmake/target_toolchain.cmake b/cmake/target_toolchain.cmake
index 43333f3..92674bf 100644
--- a/cmake/target_toolchain.cmake
+++ b/cmake/target_toolchain.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # No official documentation exists for the "Generic" value, except their wiki.
 #
 # https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling:
diff --git a/cmake/toolchain/cross-compile/generic.cmake b/cmake/toolchain/cross-compile/generic.cmake
index c35d8be..4656d75 100644
--- a/cmake/toolchain/cross-compile/generic.cmake
+++ b/cmake/toolchain/cross-compile/generic.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # CROSS_COMPILE is a KBuild mechanism for specifying an external
 # toolchain with a single environment variable.
 #
diff --git a/cmake/toolchain/cross-compile/target.cmake b/cmake/toolchain/cross-compile/target.cmake
index 218d892..5a1a0e5 100644
--- a/cmake/toolchain/cross-compile/target.cmake
+++ b/cmake/toolchain/cross-compile/target.cmake
@@ -1 +1,3 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # This file intentionally left blank.
diff --git a/cmake/toolchain/espressif/generic.cmake b/cmake/toolchain/espressif/generic.cmake
index b2b74e4..d70cdcf 100644
--- a/cmake/toolchain/espressif/generic.cmake
+++ b/cmake/toolchain/espressif/generic.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 set_ifndef(ESPRESSIF_TOOLCHAIN_PATH "$ENV{ESPRESSIF_TOOLCHAIN_PATH}")
 set(       ESPRESSIF_TOOLCHAIN_PATH ${ESPRESSIF_TOOLCHAIN_PATH} CACHE PATH "")
 assert(    ESPRESSIF_TOOLCHAIN_PATH "ESPRESSIF_TOOLCHAIN_PATH is not set")
diff --git a/cmake/toolchain/espressif/target.cmake b/cmake/toolchain/espressif/target.cmake
index 218d892..5a1a0e5 100644
--- a/cmake/toolchain/espressif/target.cmake
+++ b/cmake/toolchain/espressif/target.cmake
@@ -1 +1,3 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # This file intentionally left blank.
diff --git a/cmake/toolchain/gnuarmemb/generic.cmake b/cmake/toolchain/gnuarmemb/generic.cmake
index db2ece9..9113b3f 100644
--- a/cmake/toolchain/gnuarmemb/generic.cmake
+++ b/cmake/toolchain/gnuarmemb/generic.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Until we completely deprecate it
 if(NOT DEFINED ENV{GNUARMEMB_TOOLCHAIN_PATH})
   if(DEFINED ENV{GCCARMEMB_TOOLCHAIN_PATH})
diff --git a/cmake/toolchain/gnuarmemb/target.cmake b/cmake/toolchain/gnuarmemb/target.cmake
index 80a6663..b970dc3 100644
--- a/cmake/toolchain/gnuarmemb/target.cmake
+++ b/cmake/toolchain/gnuarmemb/target.cmake
@@ -1 +1,3 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Intentionally left blank.
diff --git a/cmake/toolchain/host/generic.cmake b/cmake/toolchain/host/generic.cmake
index 64bf1ce..a4b9452 100644
--- a/cmake/toolchain/host/generic.cmake
+++ b/cmake/toolchain/host/generic.cmake
@@ -1,2 +1,4 @@
+# SPDX-License-Identifier: Apache-2.0
+
 set(COMPILER host-gcc)
 set(TOOLCHAIN_HAS_NEWLIB OFF CACHE BOOL "True if toolchain supports newlib")
diff --git a/cmake/toolchain/host/target.cmake b/cmake/toolchain/host/target.cmake
index 218d892..5a1a0e5 100644
--- a/cmake/toolchain/host/target.cmake
+++ b/cmake/toolchain/host/target.cmake
@@ -1 +1,3 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # This file intentionally left blank.
diff --git a/cmake/toolchain/issm/generic.cmake b/cmake/toolchain/issm/generic.cmake
index cff38d7..4c05a5f 100644
--- a/cmake/toolchain/issm/generic.cmake
+++ b/cmake/toolchain/issm/generic.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 #
 # The ISSM standalone toolchain provides both the x86 IAMCU and elf32 ARC
 # toolchains. Currently supported version is '2016-05-12':
diff --git a/cmake/toolchain/issm/target.cmake b/cmake/toolchain/issm/target.cmake
index 80a6663..b970dc3 100644
--- a/cmake/toolchain/issm/target.cmake
+++ b/cmake/toolchain/issm/target.cmake
@@ -1 +1,3 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Intentionally left blank.
diff --git a/cmake/toolchain/llvm/generic.cmake b/cmake/toolchain/llvm/generic.cmake
index a49ad2d..88356a5 100644
--- a/cmake/toolchain/llvm/generic.cmake
+++ b/cmake/toolchain/llvm/generic.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 set(CLANG_ROOT $ENV{CLANG_ROOT_DIR})
 set_ifndef(CLANG_ROOT /usr)
 
diff --git a/cmake/toolchain/llvm/target.cmake b/cmake/toolchain/llvm/target.cmake
index 80a6663..b970dc3 100644
--- a/cmake/toolchain/llvm/target.cmake
+++ b/cmake/toolchain/llvm/target.cmake
@@ -1 +1,3 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Intentionally left blank.
diff --git a/cmake/toolchain/xcc/generic.cmake b/cmake/toolchain/xcc/generic.cmake
index 9286aee..de8d4cd 100644
--- a/cmake/toolchain/xcc/generic.cmake
+++ b/cmake/toolchain/xcc/generic.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 set_ifndef(XTENSA_TOOLCHAIN_PATH "$ENV{XTENSA_TOOLCHAIN_PATH}")
 set(       XTENSA_TOOLCHAIN_PATH ${XTENSA_TOOLCHAIN_PATH} CACHE PATH "xtensa tools install directory")
 assert(    XTENSA_TOOLCHAIN_PATH "XTENSA_TOOLCHAIN_PATH is not set")
diff --git a/cmake/toolchain/xcc/target.cmake b/cmake/toolchain/xcc/target.cmake
index 80a6663..b970dc3 100644
--- a/cmake/toolchain/xcc/target.cmake
+++ b/cmake/toolchain/xcc/target.cmake
@@ -1 +1,3 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Intentionally left blank.
diff --git a/cmake/toolchain/xtools/generic.cmake b/cmake/toolchain/xtools/generic.cmake
index abb052c..32f5c44 100644
--- a/cmake/toolchain/xtools/generic.cmake
+++ b/cmake/toolchain/xtools/generic.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 set_ifndef(XTOOLS_TOOLCHAIN_PATH "$ENV{XTOOLS_TOOLCHAIN_PATH}")
 set(       XTOOLS_TOOLCHAIN_PATH     ${XTOOLS_TOOLCHAIN_PATH} CACHE PATH "")
 assert(    XTOOLS_TOOLCHAIN_PATH      "XTOOLS_TOOLCHAIN_PATH is not set")
diff --git a/cmake/toolchain/xtools/target.cmake b/cmake/toolchain/xtools/target.cmake
index 9bcaec2..7a5a6f0 100644
--- a/cmake/toolchain/xtools/target.cmake
+++ b/cmake/toolchain/xtools/target.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Determine if we have an IAMCU toolchain or not.
 if(CONFIG_X86_IAMCU)
   set(CROSS_COMPILE_TARGET_x86  i586-zephyr-elfiamcu)
diff --git a/cmake/toolchain/zephyr/0.10.0/generic.cmake b/cmake/toolchain/zephyr/0.10.0/generic.cmake
index b93b588..663136b 100644
--- a/cmake/toolchain/zephyr/0.10.0/generic.cmake
+++ b/cmake/toolchain/zephyr/0.10.0/generic.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 set(TOOLCHAIN_HOME ${ZEPHYR_SDK_INSTALL_DIR})
 
 set(COMPILER gcc)
diff --git a/cmake/toolchain/zephyr/0.10.0/host-tools.cmake b/cmake/toolchain/zephyr/0.10.0/host-tools.cmake
index 9466f94..843b2de 100644
--- a/cmake/toolchain/zephyr/0.10.0/host-tools.cmake
+++ b/cmake/toolchain/zephyr/0.10.0/host-tools.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 
 set(HOST_TOOLS_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/${TOOLCHAIN_ARCH}-pokysdk-linux)
 
diff --git a/cmake/toolchain/zephyr/0.10.0/target.cmake b/cmake/toolchain/zephyr/0.10.0/target.cmake
index bfc7e2e..56e5e0b 100644
--- a/cmake/toolchain/zephyr/0.10.0/target.cmake
+++ b/cmake/toolchain/zephyr/0.10.0/target.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Determine if we have an IAMCU toolchain or not.
 if(CONFIG_X86_IAMCU)
   set(CROSS_COMPILE_TARGET_x86  i586-zephyr-elfiamcu)
diff --git a/cmake/toolchain/zephyr/0.9.5/generic.cmake b/cmake/toolchain/zephyr/0.9.5/generic.cmake
index f712010..17c293e 100644
--- a/cmake/toolchain/zephyr/0.9.5/generic.cmake
+++ b/cmake/toolchain/zephyr/0.9.5/generic.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 set(COMPILER gcc)
 
 set(CROSS_COMPILE_TARGET i586-${TOOLCHAIN_VENDOR}-elf)
diff --git a/cmake/toolchain/zephyr/0.9.5/host-tools.cmake b/cmake/toolchain/zephyr/0.9.5/host-tools.cmake
index ee1a2bb..68f0761 100644
--- a/cmake/toolchain/zephyr/0.9.5/host-tools.cmake
+++ b/cmake/toolchain/zephyr/0.9.5/host-tools.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 if(MINGW)
   set(TOOLCHAIN_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-mingw32)
 else()
diff --git a/cmake/toolchain/zephyr/0.9.5/target.cmake b/cmake/toolchain/zephyr/0.9.5/target.cmake
index 52fe567..3602b51 100644
--- a/cmake/toolchain/zephyr/0.9.5/target.cmake
+++ b/cmake/toolchain/zephyr/0.9.5/target.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # These defaults work for some targets like RISC-V
 set(CROSS_COMPILE_TARGET ${ARCH}-${TOOLCHAIN_VENDOR}-elf)
 set(SYSROOT_TARGET       ${ARCH}-${TOOLCHAIN_VENDOR}-elf)
diff --git a/cmake/toolchain/zephyr/generic.cmake b/cmake/toolchain/zephyr/generic.cmake
index 859fca3..1db98b3 100644
--- a/cmake/toolchain/zephyr/generic.cmake
+++ b/cmake/toolchain/zephyr/generic.cmake
@@ -1 +1,3 @@
+# SPDX-License-Identifier: Apache-2.0
+
 include(${ZEPHYR_BASE}/cmake/toolchain/zephyr/${SDK_VERSION}/generic.cmake)
diff --git a/cmake/toolchain/zephyr/host-tools.cmake b/cmake/toolchain/zephyr/host-tools.cmake
index 80828ce..f2caf43 100644
--- a/cmake/toolchain/zephyr/host-tools.cmake
+++ b/cmake/toolchain/zephyr/host-tools.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Lots of duplications here.
 # FIXME: maintain this only in one place.
 
diff --git a/cmake/toolchain/zephyr/target.cmake b/cmake/toolchain/zephyr/target.cmake
index 17dbb48..1c3b93b 100644
--- a/cmake/toolchain/zephyr/target.cmake
+++ b/cmake/toolchain/zephyr/target.cmake
@@ -1 +1,3 @@
+# SPDX-License-Identifier: Apache-2.0
+
 include(${ZEPHYR_BASE}/cmake/toolchain/zephyr/${SDK_VERSION}/target.cmake)
diff --git a/cmake/usage/CMakeLists.txt b/cmake/usage/CMakeLists.txt
index 9a1001d..5b042a4 100644
--- a/cmake/usage/CMakeLists.txt
+++ b/cmake/usage/CMakeLists.txt
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 string(REPLACE ";" " " BOARD_ROOT_SPACE_SEPARATED "${BOARD_ROOT}")
 string(REPLACE ";" " " SHIELD_LIST_SPACE_SEPARATED "${SHIELD_LIST}")
 
diff --git a/cmake/usage/usage.cmake b/cmake/usage/usage.cmake
index 1afc2d5..ad9245b 100644
--- a/cmake/usage/usage.cmake
+++ b/cmake/usage/usage.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # TODO: Set to make when make is used as a generator
 set(CMAKE_MAKE_PROGRAM ninja)
 get_filename_component(generator ${CMAKE_MAKE_PROGRAM} NAME)
diff --git a/cmake/util/execute_process.cmake b/cmake/util/execute_process.cmake
index 175b06f..f0eeb4a 100644
--- a/cmake/util/execute_process.cmake
+++ b/cmake/util/execute_process.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Parameter names identical to the execute_process() CMake command, and
 # "ARGS" for the process command-line arguments.
 # Use set(ARGS ...) to build the ARGS list and then quote the list
diff --git a/cmake/util/fmerge.cmake b/cmake/util/fmerge.cmake
index 57fa9df..32b134d 100644
--- a/cmake/util/fmerge.cmake
+++ b/cmake/util/fmerge.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # Merges a list of files into a destination file.
 # Usage: list of files as arguments, first argument is the destination file
 
diff --git a/cmake/version.cmake b/cmake/version.cmake
index 3f769c1..a6ad772 100644
--- a/cmake/version.cmake
+++ b/cmake/version.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 include(${ZEPHYR_BASE}/cmake/hex.cmake)
 file(READ ${ZEPHYR_BASE}/VERSION ver)
 
diff --git a/cmake/zephyr_module.cmake b/cmake/zephyr_module.cmake
index e094929..4ce037d 100644
--- a/cmake/zephyr_module.cmake
+++ b/cmake/zephyr_module.cmake
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
 # This cmake file provides functionality to import additional out-of-tree, OoT
 # CMakeLists.txt and Kconfig files into Zephyr build system.
 # It uses -DZEPHYR_MODULES=<oot-path-to-module>[;<additional-oot-module(s)>]