chmod 700 files/root/ files/root/.ssh/
chmod 600 '$@'
-include gummikraken.mk
-include teesock.mk
+# include gummikraken.mk
+# include teesock.mk
+include *.mk
-raspi.img: raspi_root/ files/ partitions files/root/.ssh/authorized_keys files/etc/network/interfaces.d/wifi files/srv/gummikraken/ files/usr/local/bin/teesock
+raspi.img: raspi_root/ files/ partitions files/root/.ssh/authorized_keys files/etc/network/interfaces.d/wifi
-rmdir "$@.mnt"
mkdir "$@.mnt" # fail receipe if dir is nonempty
dd bs=1M count=0 seek=1792 of="$@" # set up sparse file
# see config.example for the Oktopus build config
dtparam=audio=on
+dtoverlay=w1-gpio
#!/bin/sh
+modprobe w1-gpio pullup=1
+modprobe w1-therm
+
bt-network -s nap br0 &
hciconfig hci0 up
hciconfig hci0 sspmode 1
-files/srv/gummikraken/: gummikraken/
+files/srv/gummikraken/: gummikraken/ sensors/ .FORCE
mkdir -p "$@"
- cp -av "$</." "$@/."
+ cp -av "$</." sensors/. "$@/."
chmod a+rX -R "$@"
cp gummikraken/inetd.conf files/etc/inetd.conf
+
+raspi.img: files/srv/gummikraken/
--- /dev/null
+#!/bin/sh
+
+sock=/tmp/oktopus.sock
+
+rm "$sock"
+
+( cd "${0%/*}/"
+ for n in ./sensor_*.sh; do
+ $n &
+ done
+ for n in ekg pulse oxygen heartrate systole diastole; do
+ ./gummikraken.sh ./gummikraken.data $n &
+ done
+) | teesock "$sock" &
+
+for n in 1 2 3 4 5 6 7 8 9 0; do [ ! -S "$sock" ] && sleep 1; done
+chmod a+rw "$sock"
--- /dev/null
+#!/bin/sh
+
+while sleep 1; do
+ sed -nr 's;^.*t=([0-9]{3})[0-9]{2};temperature \1;p' /sys/bus/w1/devices/28-*/w1_slave
+done
mkdir -p files/usr/local/bin
chmod 755 files/usr/ files/usr/local/ files/usr/local/bin/
cp -av "$<" "$@"
+
+raspi.img: files/usr/local/bin/teesock