Pre-install python-periphery

This library is the canonical way of using GPIO/PWM in Python apps
and we should have it installed by default so we can write tests
for it.

Bug: 117566102
Change-Id: I106f06a0ae3688191b62b9b1ee390aacf042fb3d
diff --git a/preamble.mk b/preamble.mk
index e14b48d..e53cfe3 100644
--- a/preamble.mk
+++ b/preamble.mk
@@ -152,3 +152,8 @@
 	xwayland
 
 PACKAGES_EXTRA += $(BOARD_PACKAGES_EXTRA)
+
+PIP_PACKAGES_EXTRA := \
+	python-periphery
+
+PIP_PACKAGES_EXTRA += $(BOARD_PIP_PACKAGES_EXTRA)
diff --git a/rootfs.mk b/rootfs.mk
index 0edcb56..28c1729 100644
--- a/rootfs.mk
+++ b/rootfs.mk
@@ -168,6 +168,7 @@
 	$(LOG) rootfs patch bsp finished
 
 	sudo chroot $(ROOTFS_DIR) bash -c 'apt-get clean'
+	sudo chroot $(ROOTFS_DIR) bash -c 'pip3 install $(PIP_PACKAGES_EXTRA)'
 
 # TODO(jtgans): Remove these when rapture is updated. Until then keeping the local repo
 # is the only way of installing locally built packages on device.