-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSensorbox.Pifile
52 lines (39 loc) · 1.47 KB
/
Sensorbox.Pifile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM Base.img
PUMP 100M
# Upgrade raspbian
RUN apt-get update
# Enable hardware interaction
RUN raspi-config nonint do_camera 0
RUN raspi-config nonint do_i2c 0
# Enable the DS3231 RTC / remove fake hwclock
RUN bash -c 'echo dtoverlay=i2c-rtc,ds3231 >> /boot/config.txt'
RUN apt-get -y remove fake-hwclock
RUN update-rc.d -f fake-hwclock remove
RUN systemctl disable fake-hwclock
# install config files
INSTALL Sensorbox/ /
# install pysensorproxy and dependencies
RUN chown -R pi:pi /home/pi/pysensorproxy
RUN pip3 install -e /home/pi/pysensorproxy
RUN apt-get install -y flac
# enable sensorproxy
RUN systemctl enable sensorproxy.service
RUN systemctl enable logdump@sensorproxy
RUN tee -a /etc/sysdweb.conf <<EOF
[sensorproxy]
title = SensorProxy
unit = sensorproxy
EOF
# Enable i2s sound driver
RUN sed -i "s/#dtparam=i2s=on/dtparam=i2s=on/" /boot/config.txt
RUN tee -a /etc/modules <<<snd-bcm2835
# Add and install i2s sound dkms module
RUN cp -R /home/pi/Raspberry-Pi-Installer-Scripts/i2s_mic_module/ /usr/src/snd-i2smic-rpi-0.1.0
RUN dkms add -m snd-i2smic-rpi -v 0.1.0
RUN dkms install -m snd-i2smic-rpi -v 0.1.0 -k 5.4.83+
RUN dkms install -m snd-i2smic-rpi -v 0.1.0 -k 5.4.83-v7+
RUN dkms install -m snd-i2smic-rpi -v 0.1.0 -k 5.4.83-v7l+
# Load kernel module on boot
RUN tee -a /etc/modules-load.d/snd-i2smic-rpi.conf <<<snd-i2smic-rpi
# Select Raspberry Pi 2/3 as target platform
RUN tee -a /etc/modprobe.d/snd-i2smic-rpi.conf <<<"options snd-i2smic-rpi rpi_platform_generation=1"