More build stuff

This commit is contained in:
Lynn Ochs 2021-03-09 16:57:03 +01:00
parent 9f02fba74a
commit 075718aa67
2 changed files with 32 additions and 4 deletions

5
.gitignore vendored
View File

@ -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

View File

@ -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