sim: Add explicit copyright and licenses to the sim

Add an apache SPDX header and explicit license lines.  The date ranges
of the license lines is derived from the git history.  Having these
explicitly present will make contributions from other parties easier, as
they will simply be able to add their own copyright line, rather than
having to describe that it only covers modifications.

Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/sim/mcuboot-sys/src/api.rs b/sim/mcuboot-sys/src/api.rs
index a474e8f..a88cfcf 100644
--- a/sim/mcuboot-sys/src/api.rs
+++ b/sim/mcuboot-sys/src/api.rs
@@ -1,3 +1,8 @@
+// Copyright (c) 2017-2019 Linaro LTD
+// Copyright (c) 2018-2019 JUUL Labs
+//
+// SPDX-License-Identifier: Apache-2.0
+
 //! HAL api for MyNewt applications
 
 use crate::area::CAreaDesc;
diff --git a/sim/mcuboot-sys/src/area.rs b/sim/mcuboot-sys/src/area.rs
index 779157a..dc05e39 100644
--- a/sim/mcuboot-sys/src/area.rs
+++ b/sim/mcuboot-sys/src/area.rs
@@ -1,3 +1,9 @@
+// Copyright (c) 2017-2019 Linaro LTD
+// Copyright (c) 2018-2019 JUUL Labs
+// Copyright (c) 2019 Arm Limited
+//
+// SPDX-License-Identifier: Apache-2.0
+
 //! Describe flash areas.
 
 use simflash::{Flash, SimFlash, Sector};
diff --git a/sim/mcuboot-sys/src/c.rs b/sim/mcuboot-sys/src/c.rs
index 6df89e4..61276e2 100644
--- a/sim/mcuboot-sys/src/c.rs
+++ b/sim/mcuboot-sys/src/c.rs
@@ -1,4 +1,10 @@
-/// Interface wrappers to C API entering to the bootloader
+// Copyright (c) 2017-2019 Linaro LTD
+// Copyright (c) 2017-2019 JUUL Labs
+// Copyright (c) 2019 Arm Limited
+//
+// SPDX-License-Identifier: Apache-2.0
+
+//! Interface wrappers to C API entering to the bootloader
 
 use crate::area::AreaDesc;
 use simflash::SimMultiFlash;
diff --git a/sim/mcuboot-sys/src/lib.rs b/sim/mcuboot-sys/src/lib.rs
index 351666e..8acb246 100644
--- a/sim/mcuboot-sys/src/lib.rs
+++ b/sim/mcuboot-sys/src/lib.rs
@@ -1,3 +1,7 @@
+// Copyright (c) 2017-2019 Linaro LTD
+//
+// SPDX-License-Identifier: Apache-2.0
+
 mod area;
 pub mod c;
 
diff --git a/sim/simflash/src/lib.rs b/sim/simflash/src/lib.rs
index 43b6232..c991d47 100644
--- a/sim/simflash/src/lib.rs
+++ b/sim/simflash/src/lib.rs
@@ -1,3 +1,8 @@
+// Copyright (c) 2017-2019 Linaro LTD
+// Copyright (c) 2017-2018 JUUL Labs
+//
+// SPDX-License-Identifier: Apache-2.0
+
 //! A flash simulator
 //!
 //! This module is capable of simulating the type of NOR flash commonly used in microcontrollers.
diff --git a/sim/simflash/src/pdump.rs b/sim/simflash/src/pdump.rs
index dbb42d5..c68aa83 100644
--- a/sim/simflash/src/pdump.rs
+++ b/sim/simflash/src/pdump.rs
@@ -1,3 +1,7 @@
+// Copyright (c) 2017 Linaro LTD
+//
+// SPDX-License-Identifier: Apache-2.0
+
 // Printable hexdump.
 
 pub trait HexDump {
diff --git a/sim/src/caps.rs b/sim/src/caps.rs
index 639894b..a63a343 100644
--- a/sim/src/caps.rs
+++ b/sim/src/caps.rs
@@ -1,3 +1,9 @@
+// Copyright (c) 2017-2019 Linaro LTD
+// Copyright (c) 2019 JUUL Labs
+// Copyright (c) 2019 Arm Limited
+//
+// SPDX-License-Identifier: Apache-2.0
+
 // Query the bootloader's capabilities.
 
 #[repr(u32)]
diff --git a/sim/src/depends.rs b/sim/src/depends.rs
index eecee08..57b4bad 100644
--- a/sim/src/depends.rs
+++ b/sim/src/depends.rs
@@ -1,3 +1,7 @@
+// Copyright (c) 2019 Linaro LTD
+//
+// SPDX-License-Identifier: Apache-2.0
+
 //! Support and tests related to the dependency management for multi-image
 //! support.
 
diff --git a/sim/src/image.rs b/sim/src/image.rs
index fe97f12..9c24a3e 100644
--- a/sim/src/image.rs
+++ b/sim/src/image.rs
@@ -1,3 +1,9 @@
+// Copyright (c) 2019 Linaro LTD
+// Copyright (c) 2019-2020 JUUL Labs
+// Copyright (c) 2019 Arm Limited
+//
+// SPDX-License-Identifier: Apache-2.0
+
 use byteorder::{
     LittleEndian, WriteBytesExt,
 };
diff --git a/sim/src/lib.rs b/sim/src/lib.rs
index dba7cb0..4e2f6c3 100644
--- a/sim/src/lib.rs
+++ b/sim/src/lib.rs
@@ -1,3 +1,9 @@
+// Copyright (c) 2017-2019 Linaro LTD
+// Copyright (c) 2017-2019 JUUL Labs
+// Copyright (c) 2019 Arm Limited
+//
+// SPDX-License-Identifier: Apache-2.0
+
 use docopt::Docopt;
 use log::{warn, error};
 use std::{
diff --git a/sim/src/main.rs b/sim/src/main.rs
index d687483..fd5c016 100644
--- a/sim/src/main.rs
+++ b/sim/src/main.rs
@@ -1,3 +1,8 @@
+// Copyright (c) 2017-2019 Linaro LTD
+// Copyright (c) 2017-2019 JUUL Labs
+//
+// SPDX-License-Identifier: Apache-2.0
+
 use env_logger;
 
 use bootsim;
diff --git a/sim/src/testlog.rs b/sim/src/testlog.rs
index 8d3d267..16cd256 100644
--- a/sim/src/testlog.rs
+++ b/sim/src/testlog.rs
@@ -1,3 +1,8 @@
+// Copyright (c) 2017 Linaro LTD
+// Copyright (c) 2019 JUUL Labs
+//
+// SPDX-License-Identifier: Apache-2.0
+
 //! Logging support for the test framework.
 //!
 //! https://stackoverflow.com/questions/30177845/how-to-initialize-the-logger-for-integration-tests
diff --git a/sim/src/tlv.rs b/sim/src/tlv.rs
index fa2fa7e..4fbafd4 100644
--- a/sim/src/tlv.rs
+++ b/sim/src/tlv.rs
@@ -1,3 +1,8 @@
+// Copyright (c) 2017-2020 Linaro LTD
+// Copyright (c) 2017-2020 JUUL Labs
+//
+// SPDX-License-Identifier: Apache-2.0
+
 //! TLV Support
 //!
 //! mcuboot images are followed immediately by a list of TLV items that contain integrity
diff --git a/sim/tests/core.rs b/sim/tests/core.rs
index 00f16c3..86736b3 100644
--- a/sim/tests/core.rs
+++ b/sim/tests/core.rs
@@ -1,3 +1,8 @@
+// Copyright (c) 2017-2019 Linaro LTD
+// Copyright (c) 2017-2019 JUUL Labs
+//
+// SPDX-License-Identifier: Apache-2.0
+
 //! Core tests
 //!
 //! Run the existing testsuite as a Rust unit test.