diff --git a/.gitignore b/.gitignore index 232a065..8fe9fcf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ /sdcard.img +/root_overlay/etc/door_tokens +/root_overlay/etc/dropbear +/root_overlay/root/key +/root_overlay/bin/test.py +/root_overlay/bin/poll_desfire diff --git a/Makefile b/Makefile index b6204f8..69238af 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,46 @@ +BR2_EXTERNAL=../br_external + all: sdcard.img -sdcard.img: buildroot/.config root_overlay/root/.ssh/authorized_keys +sdcard.img: root_overlay buildroot/.config root_overlay/root/.ssh/authorized_keys make -C buildroot all cp buildroot/output/images/sdcard.img sdcard.img +root_overlay: root_overlay/bin/test.py +root_overlay: root_overlay/etc/door_tokens +root_overlay: root_overlay/etc/dropbear/dropbear_ecdsa_host_key +root_overlay: root_overlay/root/.ssh/authorized_keys +root_overlay: root_overlay/root/key + root_overlay/root/.ssh/authorized_keys: ~/.ssh/id_rsa.pub - cp ~/.ssh/id_rsa.pub root_overlay/root/.ssh/authorized_keys + cp ^< $@ buildroot/.config: config ln -sf ../config buildroot/.config +root_overlay/etc/door_tokens: + mkdir -p `dirname $@` + touch $@ + +root_overlay/root/key: + mkdir -p `dirname $@` + dd if=/dev/urandom of=$@ bs=1 count=16 + +root_overlay/bin/test.py: door_control/door.py + mkdir -p `dirname $@` + cp $< $@ + +root_overlay/etc/dropbear/dropbear_ecdsa_host_key: + mkdir -p `dirname $@` + ssh-keygen -t ecdsa -f $@ + clean: make -C buildroot clean rm -f sdcard.img rm -f root_overlay/root/.ssh/authorized_keys - rm -f root_overlay/bin/poll_desfire rm -f root_overlay/bin/test.py menuconfig: make -C buildroot menuconfig -.PHONY: all clean sdcard.img menuconfig +.PHONY: all clean sdcard.img menuconfig root_overlay