Compare commits

...

54 Commits

Author SHA1 Message Date
abfb7a7a6f Allow using some files to stop restart of applications 2022-11-22 23:22:52 +01:00
95493a2a2c buildroot config 2022-11-22 23:22:42 +01:00
80fb8174fb Kernel audio 2022-11-22 23:22:07 +01:00
9c256cc8fb Update device tree 2022-11-22 23:21:52 +01:00
cc9f2818b4 Add exec_cmd.py 2022-11-22 23:21:34 +01:00
e8255b90e5 Update packages 2022-11-22 23:21:25 +01:00
66663fe884 Another package update 2022-11-06 19:39:00 +01:00
37afae0e9b Update package 2022-11-06 19:22:17 +01:00
750c7ae847 Merge branch 'main' of ssh://git.imaginaerraum.de:2200/apo/DoorPi 2022-11-06 19:04:14 +01:00
4cfbf37cf5 idek 2022-11-06 19:03:11 +01:00
f29cbb40f6 some changes to layout of webinterface 2021-08-30 21:19:57 +02:00
fc78ac456e Update python stuff 2021-08-23 21:15:21 +02:00
4367506c5a update config 2021-08-17 00:46:30 +02:00
a5556bc81e use upstream buildroot 2021-08-16 23:19:29 +02:00
b5c6861484 update stuff 2021-08-16 22:52:59 +02:00
91749718cb fix issue with itsdangerous 2021-08-16 22:37:32 +02:00
d5ee064c00 identify package by commit hash 2021-08-16 21:47:07 +02:00
44878dd5ba Update control package 2021-08-16 10:08:43 +02:00
576059136d Update control script 2021-08-15 01:58:41 +02:00
2a3b64afff Remove old gitignore entries 2021-08-11 15:15:23 +02:00
abf97102d2 Move control program to br externals instead of submodule 2021-08-11 11:02:06 +02:00
b847a87b85 Fix indentation 2021-08-11 08:22:36 +02:00
2eda7718d3 Update door control 2021-08-10 19:16:22 +02:00
afe085b30b fixed s.t. valid thru checks work correctly 2021-04-10 18:22:27 +02:00
0b090d3294 added nfc log viewer for web interface and support for limited token validity 2021-04-10 17:28:21 +02:00
b6202c22d5 Merge branch 'main' of ssh://git.imaginaerraum.de:2200/apo/DoorPi into main 2021-04-10 13:57:42 +02:00
954d22e3f9 new release with bootstrap 2021-04-10 13:51:26 +02:00
8f12446c5a Update device tree sources to enable USB and UART on pin headers 2021-03-29 00:46:59 +02:00
a558f8aad7 Update config 2021-03-29 00:46:20 +02:00
bb9aaa392e Fix config after menuconfig 2021-03-29 00:46:04 +02:00
0c27fc6997 changed authorization priority 2021-03-22 23:51:28 +01:00
b6b9a847f4 added LDAP authorization for web interface 2021-03-22 21:39:02 +01:00
1478e6fdb1 Merge branch 'main' of ssh://imaginaerraum.de:2201/apo/DoorPi into main 2021-03-21 18:23:32 +01:00
353aae68e8 new version of webinterface with improved admin support 2021-03-21 18:23:21 +01:00
d266d178ee Merge branch 'main' of ssh://imaginaerraum.de:2201/apo/DoorPi into main 2021-03-16 18:54:24 +01:00
7b60ff4091 dropbear keygen 2021-03-16 18:54:13 +01:00
15ce23ca53 use setuptools build system for python package for web interface 2021-03-15 23:34:23 +01:00
0abff3484c removed submodule (no longer necessary, since we are now using builtroot external package) 2021-03-14 17:31:36 +01:00
93b8e76565 new version of webinterface with navbar 2021-03-14 17:28:18 +01:00
baad4190fe created buildroot external package for door_admin web interface 2021-03-14 14:49:46 +01:00
0aad665b0e new buildroot packages for python modules 2021-03-12 22:29:30 +01:00
efba18563e Merge branch 'main' of ssh://imaginaerraum.de:2201/apo/DoorPi into main 2021-03-12 22:21:28 +01:00
b2e55cc70d rename test.py -> door.py 2021-03-10 22:22:22 +01:00
7a439df1bc Update door control script 2021-03-10 21:40:44 +01:00
98802fd728 Update kernel config, use glibc, fix init script 2021-03-10 21:40:04 +01:00
eb9e307846 Merge branch 'main' of ssh://imaginaerraum.de:2201/apo/DoorPi into main 2021-03-09 23:39:13 +01:00
405dbd0b9f changed url for buildroot to forked repo with flask-security-too package + depedencies 2021-03-09 21:17:30 +01:00
76da40fd64 added submodule for door administration web interface 2021-03-09 21:15:41 +01:00
0035039ed6 Forbid root login with password 2021-03-09 19:34:13 +01:00
2369265b27 Typo 2021-03-09 19:34:06 +01:00
ff54f9279d ssh stuff 2021-03-09 19:30:35 +01:00
3ba7668c36 Add wpa supplicant to gitignore 2021-03-09 19:28:59 +01:00
4601787c15 Fix order 2021-03-09 18:19:04 +01:00
79bf66b382 Add make recipe for wpa supplicant config 2021-03-09 18:17:32 +01:00
24 changed files with 2215 additions and 1555 deletions

4
.gitignore vendored
View File

@ -2,5 +2,5 @@
/root_overlay/etc/door_tokens /root_overlay/etc/door_tokens
/root_overlay/etc/dropbear /root_overlay/etc/dropbear
/root_overlay/root/key /root_overlay/root/key
/root_overlay/bin/test.py /root_overlay/etc/wpa_supplicant
/root_overlay/bin/poll_desfire /root_overlay/root/.ssh/authorized_keys

5
.gitmodules vendored
View File

@ -1,6 +1,3 @@
[submodule "buildroot"] [submodule "buildroot"]
path = buildroot path = buildroot
url = https://github.com/buildroot/buildroot.git url = https://github.com/Telos4/buildroot.git
[submodule "door_control"]
path = door_control
url = ssh://irgit@imaginaerraum.de:2201/apo/DoorControl.git

View File

@ -7,16 +7,17 @@ sdcard.img: buildroot/.config
make -C buildroot all make -C buildroot all
cp buildroot/output/images/sdcard.img sdcard.img 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/door_tokens
root_overlay: root_overlay/etc/dropbear/dropbear_ecdsa_host_key root_overlay: root_overlay/etc/dropbear/dropbear_ecdsa_host_key
root_overlay: root_overlay/etc/wpa_supplicant/wpa_supplicant.conf
root_overlay: root_overlay/root/.ssh/authorized_keys root_overlay: root_overlay/root/.ssh/authorized_keys
root_overlay: root_overlay/root/key root_overlay: root_overlay/root/key
root_overlay/root/.ssh/authorized_keys: ~/.ssh/id_rsa.pub root_overlay/root/.ssh/authorized_keys: ~/.ssh/id_rsa.pub
cp ^< $@ mkdir -p `dirname $@`
cp $< $@
buildroot/.config: config buildroot/.config:
ln -sf ../config $@ ln -sf ../config $@
root_overlay/etc/door_tokens: root_overlay/etc/door_tokens:
@ -27,21 +28,21 @@ root_overlay/root/key:
mkdir -p `dirname $@` mkdir -p `dirname $@`
dd if=/dev/urandom of=$@ bs=1 count=16 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: root_overlay/etc/dropbear/dropbear_ecdsa_host_key:
sh -c 'if [[ ! -f $@ && ! -f $@.openssh ]]; then mkdir -p `dirname $@` && ssh-keygen -t ecdsa -f $@.openssh; fi'
root_overlay/etc/wpa_supplicant/wpa_supplicant.conf:
mkdir -p `dirname $@` mkdir -p `dirname $@`
ssh-keygen -t ecdsa -f $@ @echo "Please enter the passphrase for the space wifi:"
wpa_passphrase Space > $@
clean: clean:
make -C buildroot clean make -C buildroot clean
rm -f sdcard.img rm -f sdcard.img
rm -f root_overlay/root/.ssh/authorized_keys rm -f root_overlay/root/.ssh/authorized_keys
rm -f root_overlay/bin/test.py
menuconfig: menuconfig: buildroot/.config
make -C buildroot menuconfig make -C buildroot BR2_EXTERNAL=../br_external menuconfig
if [[ ! -L buildroot/.config ]]; then mv buildroot/.config config && ln -s ../config buildroot/.config; fi
.PHONY: all clean sdcard.img menuconfig root_overlay .PHONY: all clean sdcard.img menuconfig root_overlay root_overlay/etc/dropbear/dropbear_ecdsa_host_key

View File

@ -1,2 +1,5 @@
source "$BR2_EXTERNAL_DOOR_PI_PATH/package/poll_desfire/Config.in" source "$BR2_EXTERNAL_DOOR_PI_PATH/package/poll_desfire/Config.in"
source "$BR2_EXTERNAL_DOOR_PI_PATH/package/libfreefare_git/Config.in" source "$BR2_EXTERNAL_DOOR_PI_PATH/package/libfreefare_git/Config.in"
source "$BR2_EXTERNAL_DOOR_PI_PATH/package/python-door-admin/Config.in"
source "$BR2_EXTERNAL_DOOR_PI_PATH/package/door_pi_control/Config.in"
source "$BR2_EXTERNAL_DOOR_PI_PATH/package/python_wheel/Config.in.host"

View File

@ -0,0 +1,8 @@
config BR2_PACKAGE_DOOR_PI_CONTROL
bool "door_pi_control"
select BR2_PACKAGE_PYTHON3
select BR2_PACKAGE_PYTHON_PAHO_MQTT
select BR2_PACKAGE_PYTHON_SERIAL
select BR2_PACKAGE_HOST_PYTHON_WHEEL
help
https://git.imaginaerraum.de/apo/DoorControl

View File

@ -0,0 +1,8 @@
DOOR_PI_CONTROL_VERSION = 9358dfc74b119840c868157c075a53302263a958
DOOR_PI_CONTROL_SOURCE = $(DOOR_PI_CONTROL_VERSION).tar.gz
DOOR_PI_CONTROL_SITE = https://git.imaginaerraum.de/apo/DoorControl/archive
DOOR_PI_CONTROL_LICENSE = GPL-3.0
DOOR_PI_CONTROL_LICENSE_FILES = LICENSE
DOOR_PI_CONTROL_SETUP_TYPE = pep517
DOOR_PI_CONTROL_DEPENDENCIES = host-python_wheel
$(eval $(python-package))

View File

@ -1,5 +1,5 @@
POLL_DESFIRE_VERSION = 0.0.1 POLL_DESFIRE_VERSION = e39aa4abb0f8cd635d9f88f8a750ad00ca3546b5
POLL_DESFIRE_SOURCE = poll_desfire_v$(POLL_DESFIRE_VERSION).tar.gz POLL_DESFIRE_SOURCE = $(POLL_DESFIRE_VERSION).tar.gz
POLL_DESFIRE_SITE = https://git.imaginaerraum.de/apo/PollDesfire/archive POLL_DESFIRE_SITE = https://git.imaginaerraum.de/apo/PollDesfire/archive
POLL_DESFIRE_DEPENDENCIES = libfreefare_git host-pkgconf POLL_DESFIRE_DEPENDENCIES = libfreefare_git host-pkgconf
POLL_DESFIRE_LICENSE = GPL-3.0 POLL_DESFIRE_LICENSE = GPL-3.0

View File

@ -0,0 +1,17 @@
config BR2_PACKAGE_PYTHON_DOOR_ADMIN
bool "door_admin"
select BR2_PACKAGE_PYTHON_PAHO_MQTT
select BR2_PACKAGE_PYTHON_BCRYPT
select BR2_PACKAGE_PYTHON_BLEACH
select BR2_PACKAGE_PYTHON_FLASK
select BR2_PACKAGE_PYTHON_FLASK_MAIL
select BR2_PACKAGE_PYTHON_FLASK_WTF
select BR2_PACKAGE_PYTHON_FLASK_SECURITY_TOO
select BR2_PACKAGE_PYTHON_FLASK_SQLALCHEMY
select BR2_PACKAGE_PYTHON_LDAP3
select BR2_PACKAGE_PYTHON_EMAIL_VALIDATOR
select BR2_PACKAGE_PYTHON3_SSL
help
Simple web interface for door token adminstration
https://git.imaginaerraum.de/Telos4/DoorAdmin

View File

@ -0,0 +1,9 @@
PYTHON_DOOR_ADMIN_VERSION = 8e868f16747fc56daa29a0cdcd77d9b7fff10711
PYTHON_DOOR_ADMIN_SOURCE = $(PYTHON_DOOR_ADMIN_VERSION).tar.gz
PYTHON_DOOR_ADMIN_SITE = https://git.imaginaerraum.de/Telos4/DoorAdmin/archive
PYTHON_DOOR_ADMIN_LICENSE = GPL-3.0
PYTHON_DOOR_ADMIN_LICENSE_FILES = LICENSE
PYTHON_DOOR_ADMIN_SETUP_TYPE = setuptools
#PYTHON_DOOR_ADMIN_DEPENDENCIES = python-flask-security-too, python-flask-wtf, python-flask-mail, python-paho-mqtt, python-flask-sqlalchemy
$(eval $(python-package))

View File

@ -0,0 +1,5 @@
config BR2_PACKAGE_HOST_PYTHON_WHEEL
bool "host python-wheel"
select BR2_PACKAGE_PYTHON3
help
https://github.com/pypa/wheel

View File

@ -0,0 +1,7 @@
PYTHON_WHEEL_VERSION = 0.38.2
PYTHON_WHEEL_SOURCE = $(PYTHON_WHEEL_VERSION).tar.gz
PYTHON_WHEEL_SITE = https://github.com/pypa/wheel/archive/refs/tags
PYTHON_WHEEL_LICENSE = GPL-3.0
PYTHON_WHEEL_LICENSE_FILES = LICENSE
PYTHON_WHEEL_SETUP_TYPE = distutils
$(eval $(host-python-package))

@ -1 +1 @@
Subproject commit 21eb7775510d76163c2159bca14d3802283119e3 Subproject commit 4ffa34edc1b26ff038c95bf62eccada4bf0c1492

2491
config

File diff suppressed because it is too large Load Diff

@ -1 +0,0 @@
Subproject commit e48f0f63385f5990440524c66ba925466f8e292f

47
kernel.config Normal file
View File

@ -0,0 +1,47 @@
# spidev
CONFIG_SPI_SPIDEV=y
# spi nor
CONFIG_MTD=y
CONFIG_MTD_OF_PARTS=y
CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_M25P80=y
# wireless core
CONFIG_WIRELESS=y
CONFIG_CFG80211=y
CONFIG_MAC80211=y
CONFIG_CFG80211_WEXT=y
# wireless drivers
CONFIG_WLAN=y
# ondemand cpufreq governor
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
CONFIG_USB_ACM=y
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_ARM=y
CONFIG_SOUND=y
CONFIG_SOUND_OSS_CORE=y
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_DRIVERS=y
CONFIG_SND_ARM=y
CONFIG_SND_SPI=y
CONFIG_SND_USB=y
CONFIG_SND_SOC=y
CONFIG_SND_SOC_DMAENGINE_PCM=y
CONFIG_SND_SUNXI_SOC_AUDIOCODEC=y
CONFIG_SND_SUNXI_SOC_PUBLUC_MACHINE=y
CONFIG_SND_SUN8IW7_SNDCODEC=y
CONFIG_SND_SUNXI_SOC_DAUDIO0_INTERFACE=y
CONFIG_SND_SUNXI_SOC_DAUDIO1_INTERFACE=y
CONFIG_SND_SUNXI_SOC_SPDIF=y
CONFIG_SND_SUNXI_SOC_AUDIOHUB_INTERFACE=y
CONFIG_SND_SUN8IW7_AUDIOHUB=y
CONFIG_SND_SOC_I2C_AND_SPI=y

View File

@ -0,0 +1,13 @@
#!/usr/bin/python
import socket
import sys
sock = socket.socket(socket.AF_UNIX)
sock.connect("/tmp/nfc.sock")
sock.settimeout(1)
for cmd in sys.argv[1:]:
sock.send(cmd.encode('utf-8') + b'\n')
try:
print(sock.recv(1024))
except socket.timeout:
continue

View File

@ -1,6 +1,11 @@
#!/bin/sh #!/bin/sh
while true; do while true; do
if [ ! -f /tmp/debugging_poll_desfire ]; then
start-stop-daemon -S -m -p /tmp/poll_desfire.pid -x /bin/poll_desfire -b -- /root/key /tmp/nfc_fifo start-stop-daemon -S -m -p /tmp/poll_desfire.pid -x /bin/poll_desfire -b -- /root/key /tmp/nfc_fifo
start-stop-daemon -v -p /tmp/fcpy.pid -S -b -m -v -x /usr/bin/python -- /bin/test.py fi
sleep 30 if [ ! -f /tmp/debugging_door_pi_control ]; then
start-stop-daemon -v -p /tmp/fcpy.pid -S -b -m -v -x /usr/bin/python -- /usr/bin/door_pi_control --log_host 10.11.1.1:5556
fi
#start-stop-daemon -v -p /tmp/webiface.pid -S -b -m -v -x /usr/bin/python -- /usr/bin/launch_webadmin
sleep 5
done done

View File

@ -0,0 +1,2 @@
Telos4 simon.pirkelmann@gmail.com LDAP
apo a@0au.de LDAP

View File

@ -0,0 +1,2 @@
#!/bin/sh
[[ ! -f /etc/dropbear/dropbear_ecdsa_host_key && -f /etc/dropbear/host_key ]] && dropbearconvert openssh dropbear /etc/dropbear/host_key /etc/dropbear/dropbear_ecdsa_host_key

View File

@ -1,3 +1,3 @@
mkfifo /var/nfc_fifo rm /tmp/nfc_fifo
start-stop-daemon -S -m -p /tmp/watcher.pid -x /bin/watcher -b mkfifo /tmp/nfc_fifo
start-stop-daemon -v -p /tmp/watcher.pid -S -b -m -v -x /bin/sh -- /bin/watcher

View File

@ -1,2 +1,3 @@
device.name="reader" device.name="reader"
device.connstring="pn532_uart:/dev/serial/by-id/usb-Imaginaerraum.de_DoorControl_43363220195053573A002C0-if03" device.connstring="pn532_uart:/dev/serial/by-id/usb-Imaginaerraum.de_DoorControl_433632201350535727003F0-if03"

View File

@ -0,0 +1,37 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
tree_sort_key=0
tree_sort_direction=1
hide_kernel_threads=1
hide_userland_threads=1
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
tree_view=1
tree_view_always_by_pid=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
enable_mouse=1
delay=15
left_meters=AllCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=Tasks LoadAverage Uptime
right_meter_modes=2 2 2
hide_function_bar=0

View File

@ -1 +0,0 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5pAEc3dFnR7zDtdIaH3ICBQincnxs7HlIi+JEfl3M23S/wkQASE9hDpNwAF/CRu9u2cjnXgHNqVG0TkKyjWgfXk9tTpyVBNw8QkHQ75TpbKsuhWQm/LgYb874j4+2pDGxLLdVVuY1c73vNQqkHL0xS3aG/dtvCc7XMNg5VRWdwL3WPhkmuBQK7JYUkUnf+dZWS91oJWZHd/OEU/H9p147UGw3ffLQ9H+IKxl3pvEMKz8Aeca1sDtSS0Z2LXzh3au5KynMR6KHBX9QUM3Bkoy20QqnNZz/sQX04NrOigoPDOFRlOaeIXeZvecZRP7LnTy7JviWFylMwziwzEJslDLN apo@mae

File diff suppressed because it is too large Load Diff