DoorPi/Makefile

47 lines
1.1 KiB
Makefile
Raw Normal View History

2021-03-09 15:57:03 +00:00
BR2_EXTERNAL=../br_external
2021-03-08 20:54:21 +00:00
all: sdcard.img
2021-03-09 15:57:03 +00:00
sdcard.img: root_overlay buildroot/.config root_overlay/root/.ssh/authorized_keys
2021-03-08 20:54:21 +00:00
make -C buildroot all
cp buildroot/output/images/sdcard.img sdcard.img
2021-03-09 15:57:03 +00:00
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
2021-03-08 20:54:21 +00:00
root_overlay/root/.ssh/authorized_keys: ~/.ssh/id_rsa.pub
2021-03-09 15:57:03 +00:00
cp ^< $@
2021-03-08 20:54:21 +00:00
buildroot/.config: config
ln -sf ../config buildroot/.config
2021-03-09 15:57:03 +00:00
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 $@
2021-03-08 20:54:21 +00:00
clean:
make -C buildroot clean
rm -f sdcard.img
rm -f root_overlay/root/.ssh/authorized_keys
rm -f root_overlay/bin/test.py
menuconfig:
make -C buildroot menuconfig
2021-03-09 15:57:03 +00:00
.PHONY: all clean sdcard.img menuconfig root_overlay