Debianize u-boot

Change-Id: I83ac153ea6e2357ecb99b690977170f7b016eec7
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..40a647d
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+u-boot (2019.10-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..d8e7153
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,19 @@
+Source: u-boot
+Section: misc
+Priority: optional
+Maintainer: Coral Team <coral-support@google.com>
+Build-Depends: debhelper (>=10), bc, bison, flex, python-dev:native, swig
+Standards-Version: 3.9.8
+Homepage: https://coral.ai
+
+Package: u-boot
+Architecture: any
+Depends: ${misc:Depends}
+Description: Bootloader for mt8167s
+ U-Boot bootloader for mt8167-coral.
+
+Package: u-boot-mkimage
+Architecture: any
+Depends: ${misc:Depends}
+Description: mkimage tool from u-boot
+ mkimage tool for generating fitImage
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..896e169
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,7 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: u-boot
+Source: https://excelsior.googlesource.com/u-boot
+
+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..7ffdec1
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,25 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+#
+# output every command that modifies files on the build system.
+# export DH_VERBOSE = 1
+PACKAGENAME=u-boot
+DESTDIR=$(shell pwd)/debian/$(PACKAGENAME)
+DESTDIR_MKIMAGE=$(DESTDIR)-mkimage
+
+%:
+	dh $@
+
+override_dh_auto_build:
+	make -j$(shell nproc) CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- mt8516_coral_defconfig
+	make -j$(shell nproc) CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- _all u-boot-initial-env
+
+override_dh_auto_install:
+	install -d $(DESTDIR)/usr/share/u-boot
+	install -d $(DESTDIR_MKIMAGE)/usr/bin
+	install -p -m 755 u-boot.bin $(DESTDIR)/usr/share/u-boot/u-boot.bin
+	install -p -m 755 u-boot-initial-env $(DESTDIR)/usr/share/u-boot/u-boot-initial-env
+	install -p -m 755 tools/mkimage $(DESTDIR_MKIMAGE)/usr/bin/mkimage
+
+override_dh_strip:
+	true
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)
diff --git a/debian/u-boot-mkimage.lintian-overrides b/debian/u-boot-mkimage.lintian-overrides
new file mode 100644
index 0000000..9626794
--- /dev/null
+++ b/debian/u-boot-mkimage.lintian-overrides
@@ -0,0 +1 @@
+u-boot-mkimage: binary-from-other-architecture usr/bin/mkimage