From 075718aa67960b848b731fa47bf3648d10c546f6 Mon Sep 17 00:00:00 2001 From: Valentin Ochs Date: Tue, 9 Mar 2021 16:57:03 +0100 Subject: [PATCH] More build stuff --- .gitignore | 5 +++++ Makefile | 31 +++++++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) 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