From: Paul Hänsch <paul@plutz.net>
Date: Tue, 18 Dec 2018 21:07:50 +0000 (+0100)
Subject: include teesock, update test program
X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=c5addb671309744f3f702cea637adf02d5e5cdf9;p=rpi_small

include teesock, update test program
---

diff --git a/.gitignore b/.gitignore
index 94cfa87..8eb0369 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@ raspi.img
 config.mk
 files/etc/inetd.conf
 files/srv/gummikraken/
+files/usr/local/
 files/root/.ssh/authorized_keys
 files/etc/network/interfaces.d/wifi
 id_rsa
diff --git a/.gitmodules b/.gitmodules
index 7e4a91d..4849930 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
 [submodule "gummikraken"]
 	path = gummikraken
 	url = https://git.tools.f4.htw-berlin.de/phaensch/gummikraken.git
+[submodule "teesock"]
+	path = teesock
+	url = https://git.tools.f4.htw-berlin.de/phaensch/teesock.git
diff --git a/Makefile b/Makefile
index e97acb4..5616e00 100644
--- a/Makefile
+++ b/Makefile
@@ -75,11 +75,12 @@ files/root/.ssh/authorized_keys: id_rsa.pub
 	chmod 600 '$@'
 
 include gummikraken.mk
+include teesock.mk
 
-raspi.img: raspi_root/ files/ partitions files/root/.ssh/authorized_keys files/etc/network/interfaces.d/wifi files/srv/gummikraken/
+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
 	-rmdir "$@.mnt"
 	mkdir "$@.mnt"  # fail receipe if dir is nonempty
-	dd bs=1M count=0 seek=1024 of="$@"  # set up sparse file
+	dd bs=1M count=0 seek=1792 of="$@"  # set up sparse file
 	sfdisk "$@" <partitions
 	lo=$$(losetup -f); image='$@'; \
 	start=$$(sfdisk --dump "$$image" |sed -rn 's;^.*start= *([0-9]+),.*type=83;\1;p'); \
diff --git a/files/etc/rc.local b/files/etc/rc.local
index a58eff7..0d93731 100755
--- a/files/etc/rc.local
+++ b/files/etc/rc.local
@@ -13,4 +13,4 @@ while sleep 5; do
   done
 done &
 
-/srv/gummikraken/gummikraken.sh /srv/gummikraken/gummikraken.data |ncat --send-only -kl 8200 &
+/srv/gummikraken/hatch.sh &
diff --git a/gummikraken b/gummikraken
index 30631e8..fad8af6 160000
--- a/gummikraken
+++ b/gummikraken
@@ -1 +1 @@
-Subproject commit 30631e8478b07f61e776342729afbe0d28926a69
+Subproject commit fad8af68f4c118acb2614de91d4528d647f61628
diff --git a/teesock b/teesock
new file mode 160000
index 0000000..7f2916d
--- /dev/null
+++ b/teesock
@@ -0,0 +1 @@
+Subproject commit 7f2916d1960ad00d156f1d354f9402def32c0848
diff --git a/teesock.mk b/teesock.mk
new file mode 100644
index 0000000..ef2d2d7
--- /dev/null
+++ b/teesock.mk
@@ -0,0 +1,8 @@
+teesock/teesock.arm: teesock/teesock.c teesock/Makefile
+	make -C "$(dir $@)" "$(notdir $@)"
+	chmod 755 "$@"
+
+files/usr/local/bin/teesock: teesock/teesock.arm
+	mkdir -p files/usr/local/bin
+	chmod 755 files/usr/ files/usr/local/ files/usr/local/bin/
+	cp -av "$<" "$@"