Debianize optee-os

Change-Id: I2b7da6021d2f2b7421dde02580486e239463e56b
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..29ffac6
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+optee-os (3.8.0-1) mendel-day; urgency=medium
+
+  * Initial release.
+
+ -- Coral Team <coral-support@google.com>  Wed, 19 Feb 2020 16:26:57 -0800
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..ee08d95
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,13 @@
+Source: optee-os
+Section: misc
+Priority: optional
+Maintainer: Coral Team <coral-support@google.com>
+Build-Depends: debhelper (>=10), python3, python3-crypto, python3-pycryptodome, python3-pyelftools:all
+Standards-Version: 3.9.8
+Homepage: https://coral.ai
+
+Package: optee-os
+Architecture: any
+Depends: ${misc:Depends}
+Description: TEE for mt8167s
+ Trusted Execution Environment for mt8167s
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..d480ee7
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,7 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: optee-os
+Source: https://excelsior.googlesource.com/optee-os
+
+Files: *
+Copyright: Copyright 2020 Google, LLC <coral-support@google.com>
+License: Apache-2.0
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..8b16a99
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,28 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+#
+# output every command that modifies files on the build system.
+# export DH_VERBOSE = 1
+PACKAGENAME=optee-os
+DESTDIR=$(shell pwd)/debian/$(PACKAGENAME)
+
+%:
+	dh $@
+
+override_dh_auto_clean:
+	true
+
+override_dh_auto_build:
+	make -j$(shell nproc) \
+		PLATFORM=mediatek-mt8516 \
+		CFG_ARM64_core=y \
+		CROSS_COMPILE_core=$(DEB_HOST_GNU_TYPE)- \
+		CROSS_COMPILE_ta_arm64=$(DEB_HOST_GNU_TYPE)- \
+		NOWERROR=1 \
+		LDFLAGS= \
+		CFG_TEE_TA_LOG_LEVEL=0 \
+		ta-targets=ta_arm64
+
+override_dh_auto_install:
+	install -d $(DESTDIR)/usr/share/optee-os
+	install -p -m 755 out/arm-plat-mediatek/core/tee.bin $(DESTDIR)/usr/share/optee-os/tee.bin
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)