Add the end user license

Add MT8167 SOC end user license in the package doc. The doc is copied to
the /home/mendel directory at flash so it is visible to the mendel user

Change-Id: Iafe9a601c36c87315e465681e1e867d864948fea
diff --git a/debian/changelog b/debian/changelog
index c829e7f..6222598 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+excelsior-tools (1-2) mendel-eagle; urgency=medium
+
+  * Add snapshot tool
+  * Add the MT8167 SOC end user license document
+
+ -- Coral Team <coral-support@google.com>  Mon, 26 Oct 2020 18:59:46 -0700
+
 excelsior-tools (1-1) mendel-eagle; urgency=medium
 
   * Initial release.
diff --git a/debian/docs/END_USER_LICENSE b/debian/docs/END_USER_LICENSE
new file mode 100644
index 0000000..be13c8e
--- /dev/null
+++ b/debian/docs/END_USER_LICENSE
@@ -0,0 +1,103 @@
+END USER LICENSE FOR MediaTek MT8167 SoC System Binary
+
+Copyright (c) 2020, MEDIATEK INC. All rights reserved.
+
+By accessing or using any part of the MediaTek MT8167 SoC System Binary
+(“Binary”), you as the end-user licensee of the Binary (“you”) accept and agree
+to be bound by the terms and conditions of this License, which then commences
+with effect as a legal agreement between you and MediaTek Inc. (“MediaTek”). If
+you do not agree to the terms and conditions of this License, you must not
+access or use the Binary.
+
+1. GRANT OF LICENSE
+MediaTek hereby grants you a limited, non-exclusive,
+non-transferable, world-wide, terminable license, under MediaTek’s copyrights
+and trade secrets in and to the Binary, to use only in binary code form and only
+as incorporated in or used with Licensed Product for which corresponding fees
+have been paid. “Licensed Product” means Coral Dev Board Mini, a Google’s
+single-board computer (and its successor product(s)) related to machine learning
+inferencing in a small form factor, which contains, among others, MediaTek’s
+chipset MT8167.
+
+2. RESTRICTION OF LICENSE
+2.1 You shall not use all or any part of the Binary for any purpose other than
+the purposes expressly provided for hereunder.
+2.2 You shall have no other right or license to the Binary, implicit or
+explicit, unless expressly set forth in the scope of the license and purpose
+stated herein.
+2.3 Unless explicitly permitted herein or in writing by MediaTek in advance, you
+shall not (and shall not allow any third party to):
+  (a) decompile, disassemble, reverse engineer or attempt to reconstruct,
+identify or discover any source code, underlying ideas, underlying algorithms of
+the Binary by any means whatsoever, or disclose any of the foregoing, except to
+the extent such restriction is expressly prohibited by applicable laws and not
+waivable thereunder.
+  (b) sell, rent, market, assign, license, sub-license, transfer, transmit,
+convey, pledge, or charge any right or interest in the Binary, to any third
+party.
+
+3. OWNERSHIP TO BINARY
+You acknowledge and agree that any and all intellectual property rights in and
+to the Binary shall remain the exclusive property of MediaTek or, for third
+party software contained in the Binary, such third party.
+
+4. WARRANTY AND DISCLAIMER
+4.1 If the Binary includes any Open Source Software (as defined below), you must
+comply with all licensing terms applicable to such Open Source Software. “Open
+Source Software” means any software or software component, module or package
+that contains, or is derived in any manner (in whole or in part) from, any that
+is distributed as free software, open source software or similar licensing or
+distribution models.
+4.2 To the extent permitted by law, you will indemnify, defend and hold harmless
+Mediatek, its affiliates, directors, officers, employees, customers,
+distributor, agents and/or contractors (each an "Indemnified Party") from any
+and all claims, losses, liabilities, damages, expenses and costs (including
+without limitation reasonable attorneys’ fees) incurred by such Indemnified
+Party as a result of your breach of this License and/or your non-compliance with
+all applicable laws and regulations.
+4.3 You acknowledge and agree that, to the extent permitted by law, the Binary
+is provided to you on an “AS IS” basis only. MediaTek expressly disclaims any
+and all warranties, whether express, implied, statutory or otherwise, including
+but not limited to the implied warranties of merchantability, fitness for a
+particular purpose, or non-infringement. MediaTek does not provide any warranty
+whatsoever with respect to the Binary of any third parties which may be used by,
+incorporated in, or supplied with the Binary. MediaTek specifically disclaims
+any warranty that the operation of the Binary will be uninterrupted or error
+free.
+
+5. LIMITATION OF LIABILITY
+To the extent not prohibited by applicable law, in no event shall MediaTek be
+liable for any direct, special, incidental, consequential, indirect, or punitive
+damages, including loss of profit or revenues, arising out of or in connection
+with this License. The limitations shall apply even if you have been advised of
+the possibility of such damages and notwithstanding any failure of essential
+purpose of any limited remedy.
+
+6. EXPORT COMPLIANCE
+The Binary, documentation, technology, and/or chipsets (“Received Item”)
+provided under this License may be subject to import, export, re-export and/or
+transfer restrictions under the U.S. laws and regulations and/or any applicable
+laws and regulations of other jurisdictions (collectively "Export Laws"), as
+applicable. You agree to fully comply with Export Laws, and to assure that the
+Received Item will not be (1) exported, re-exported, or transferred, directly or
+indirectly, in violation of Export Laws, to any person who has been prohibited
+or restricted from participating in the U.S. export transactions by any federal
+agency of the U.S. government; or (2) intended to be used for any purpose
+prohibited by Export Laws, including, without limitation, nuclear, chemical, or
+biological weapons proliferation and military. You further acknowledge and agree
+that you will cooperate with MediaTek and provide necessary assistance to prove
+your compliance with this section.
+
+7. CONFIDENTIALITY
+You acknowledge and agree that Confidential Information means all information
+including but not limited to the Binary as made available or disclosed by
+MediaTek or other channels under this License. You shall maintain in confidence
+the Confidential Information and apply security measures no less stringent than
+the measures that you apply to your own like information, but not less than a
+reasonable degree of care, to prevent unauthorized disclosure and use of the
+Confidential Information.
+
+8. GOVERNING LAW
+This License and all acts pursuant hereto and the rights and obligations of the
+parties hereto shall be governed, construed and interpreted in accordance with
+the laws of Singapore, without giving effect to principles of conflicts of law.
diff --git a/debian/etc/runonce.d/99-create-end-user-license b/debian/etc/runonce.d/99-create-end-user-license
new file mode 100755
index 0000000..ad8fd87
--- /dev/null
+++ b/debian/etc/runonce.d/99-create-end-user-license
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# Add end user license to /home/mendel
+
+gzip -cd /usr/share/doc/excelsior-tools/END_USER_LICENSE.gz > /home/mendel/END_USER_LICENSE
diff --git a/debian/excelsior-tools.install b/debian/excelsior-tools.install
index 842f46e..b0ccc91 100644
--- a/debian/excelsior-tools.install
+++ b/debian/excelsior-tools.install
@@ -1,2 +1,4 @@
 pinout /usr/bin
 snapshot /usr/bin
+debian/etc /
+debian/docs/END_USER_LICENSE /usr/share/doc/excelsior-tools/