aboutsummaryrefslogtreecommitdiff
path: root/core/debian/cryptech-novena-rtl.init
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-07-05 19:43:38 -0400
committerRob Austein <sra@hactrn.net>2015-07-05 19:43:38 -0400
commite8f1bf514c1819cb9942d77bb624db4f6703fa8b (patch)
treed6b19edf237f3e85d4063881a83c849bfd4260d8 /core/debian/cryptech-novena-rtl.init
parent3f25e1bf5509f584f455e0e3ce369bc51b763f85 (diff)
Add Debian packaging and startup scripts to load Novena FPGA automatically.
Diffstat (limited to 'core/debian/cryptech-novena-rtl.init')
-rw-r--r--core/debian/cryptech-novena-rtl.init36
1 files changed, 36 insertions, 0 deletions
diff --git a/core/debian/cryptech-novena-rtl.init b/core/debian/cryptech-novena-rtl.init
new file mode 100644
index 0000000..68f5c8c
--- /dev/null
+++ b/core/debian/cryptech-novena-rtl.init
@@ -0,0 +1,36 @@
+#!/bin/sh -
+### BEGIN INIT INFO
+# Provides: cryptech-novena-rtl
+# Required-Start: $remote_fs
+# Required-Stop:
+# Should-Start:
+# Default-Start: S
+# Default-Stop:
+# Short-Description: Reload Novena FPGA on boot.
+# Description: Reload Novena FPGA on boot.
+### END INIT INFO
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+. /lib/lsb/init-functions
+. /etc/default/cryptech-novena-rtl
+
+do_start () {
+ log_daemon_msg "Loading Novena FPGA from ${fpga_bitstream}"
+ load_novena_fpga "${fpga_bitstream}"
+}
+
+case "$1" in
+ start|restart|reload|force-reload|"")
+ do_start
+ ;;
+ stop)
+ # No-op
+ ;;
+ *)
+ echo "Usage: bootmisc.sh [start|stop]" >&2
+ exit 3
+ ;;
+esac
+
+: