Add libedgetpu to the world of packages

cl/213062092 must be submitted before this.

Change-Id: I59172e8612af0c02c71b67f811979ecc9ec2fb12
diff --git a/kokoro/continuous.cfg b/kokoro/continuous.cfg
index 877b2d4..6aca927 100644
--- a/kokoro/continuous.cfg
+++ b/kokoro/continuous.cfg
@@ -19,3 +19,17 @@
     regex: "packages.tgz"
   }
 }
+
+before_action {
+  invoke_blaze {
+    name: "libedgetpu"
+    command: BUILD
+    targets: "//knowledge/cerebra/spacepark/darwinn:libedgetpu"
+    flags: "--compilation_mode=opt"
+    flags: "--config=loonix"
+    flags: "--define='darwinn_chip=beagle'"
+    flags: "--define='darwinn_io=PCI'"
+    flags: "--cpu=arm"
+    flags: "--compiler=llvm-libcxx"
+  }
+}
diff --git a/kokoro/continuous.sh b/kokoro/continuous.sh
index f14533d..ad99003 100644
--- a/kokoro/continuous.sh
+++ b/kokoro/continuous.sh
@@ -20,6 +20,11 @@
 export ROOTFS_REVISION=.
 export FETCH_PACKAGES=false
 
+# Inject libedgetpu deb build from Blaze into the package directory.
+m out-dirs
+find ${KOKORO_BLAZE_DIR} -name 'libedgetpu*.deb' -exec cp {} ${PRODUCT_OUT}/packages \;
+touch ${PRODUCT_OUT}/.libedgetpu-pbuilder
+
 m docker-all
 m docker-sdcard
 
diff --git a/kokoro/release.cfg b/kokoro/release.cfg
index 86fc779..bf2ba30 100644
--- a/kokoro/release.cfg
+++ b/kokoro/release.cfg
@@ -21,3 +21,17 @@
     regex: "debian_repo/**"
   }
 }
+
+before_action {
+  invoke_blaze {
+    name: "libedgetpu"
+    command: BUILD
+    targets: "//knowledge/cerebra/spacepark/darwinn:libedgetpu"
+    flags: "--compilation_mode=opt"
+    flags: "--config=loonix"
+    flags: "--define='darwinn_chip=beagle'"
+    flags: "--define='darwinn_io=PCI'"
+    flags: "--cpu=arm"
+    flags: "--compiler=llvm-libcxx"
+  }
+}
diff --git a/packages.mk b/packages.mk
index d6e8c54..193bf3d 100644
--- a/packages.mk
+++ b/packages.mk
@@ -114,6 +114,8 @@
 
 $(eval $(call make-pbuilder-package-target,base-files,packages/base-files))
 
+$(eval $(call make-pbuilder-package-target,libedgetpu,libedgetpu))
+
 ALL_PACKAGE_TARGETS := $(PBUILDER_TARGETS)
 packages-tarball: $(ROOTDIR)/cache/packages.tgz
 $(info )
diff --git a/rootfs.mk b/rootfs.mk
index 5628fa1..c24c299 100644
--- a/rootfs.mk
+++ b/rootfs.mk
@@ -37,6 +37,7 @@
 	libbluetooth3 \
 	libdrm2 \
 	libdrm-vivante \
+	libedgetpu \
 	libgstreamer1.0-0 \
 	libgstreamer-plugins-bad1.0-0 \
 	libgstreamer-plugins-base1.0-0 \