DoorPi/Makefile

55 lines
1.3 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 16:02:04 +00:00
sdcard.img: root_overlay
sdcard.img: buildroot/.config
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
2021-03-09 17:19:04 +00:00
root_overlay: root_overlay/etc/wpa_supplicant/wpa_supplicant.conf
2021-03-09 15:57:03 +00:00
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 18:30:35 +00:00
mkdir -p `dirname $@`
2021-03-09 18:34:06 +00:00
cp $< $@
2021-03-08 20:54:21 +00:00
buildroot/.config: config
2021-03-09 16:02:04 +00:00
ln -sf ../config $@
2021-03-08 20:54:21 +00:00
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 $@
root_overlay/etc/wpa_supplicant/wpa_supplicant.conf:
mkdir -p `dirname $@`
@echo "Please enter the passphrase for the space wifi:"
wpa_passphrase Space > $@
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