|
@@
-87,7
+87,7
if [ "$ENABLE_TURBO" = true ] ; then
|
|
87
|
fi
|
|
87
|
fi
|
|
88
|
|
|
88
|
|
|
89
|
if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
|
|
89
|
if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
|
|
90
|
|
|
90
|
|
|
91
|
# Bluetooth enabled
|
|
91
|
# Bluetooth enabled
|
|
92
|
if [ "$ENABLE_BLUETOOTH" = true ] ; then
|
|
92
|
if [ "$ENABLE_BLUETOOTH" = true ] ; then
|
|
93
|
# Create temporary directory for Bluetooth sources
|
|
93
|
# Create temporary directory for Bluetooth sources
|
|
@@
-109,7
+109,7
if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
|
|
109
|
# Install tools
|
|
109
|
# Install tools
|
|
110
|
install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart"
|
|
110
|
install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart"
|
|
111
|
install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper"
|
|
111
|
install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper"
|
|
112
|
|
|
112
|
|
|
113
|
# make scripts executable
|
|
113
|
# make scripts executable
|
|
114
|
chmod +x "${R}/usr/bin/bthelper"
|
|
114
|
chmod +x "${R}/usr/bin/bthelper"
|
|
115
|
chmod +x "${R}/usr/bin/btuart"
|
|
115
|
chmod +x "${R}/usr/bin/btuart"
|
|
@@
-123,11
+123,11
if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
|
|
123
|
install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${BLUETOOTH_FIRMWARE_DIR}/LICENCE.broadcom_bcm43xx"
|
|
123
|
install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${BLUETOOTH_FIRMWARE_DIR}/LICENCE.broadcom_bcm43xx"
|
|
124
|
install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service"
|
|
124
|
install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service"
|
|
125
|
install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service"
|
|
125
|
install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service"
|
|
126
|
|
|
126
|
|
|
127
|
# Remove temporary directories
|
|
127
|
# Remove temporary directories
|
|
128
|
rm -fr "${temp_dir}"
|
|
128
|
rm -fr "${temp_dir}"
|
|
129
|
rm -fr "${R}"/tmp/pi-bluetooth
|
|
129
|
rm -fr "${R}"/tmp/pi-bluetooth
|
|
130
|
|
|
130
|
|
|
131
|
# Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore UART0/ttyAMA0 over GPIOs 14 & 15. Slow Bluetooth and slow cpu. Use /dev/ttyS0 instead of /dev/ttyAMA0
|
|
131
|
# Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore UART0/ttyAMA0 over GPIOs 14 & 15. Slow Bluetooth and slow cpu. Use /dev/ttyS0 instead of /dev/ttyAMA0
|
|
132
|
if [ "$ENABLE_MINIUART_OVERLAY" = true ] ; then
|
|
132
|
if [ "$ENABLE_MINIUART_OVERLAY" = true ] ; then
|
|
133
|
|
|
133
|
|
|
@@
-139,10
+139,10
if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
|
|
139
|
echo "core_freq=250" >> "${BOOT_DIR}/config.txt"
|
|
139
|
echo "core_freq=250" >> "${BOOT_DIR}/config.txt"
|
|
140
|
fi
|
|
140
|
fi
|
|
141
|
fi
|
|
141
|
fi
|
|
142
|
|
|
142
|
|
|
143
|
# Activate services
|
|
143
|
# Activate services
|
|
144
|
chroot_exec systemctl enable pi-bluetooth.hciuart.service
|
|
144
|
chroot_exec systemctl enable pi-bluetooth.hciuart.service
|
|
145
|
|
|
145
|
|
|
146
|
else # if ENABLE_BLUETOOTH = false
|
|
146
|
else # if ENABLE_BLUETOOTH = false
|
|
147
|
# set overlay to disable bluetooth
|
|
147
|
# set overlay to disable bluetooth
|
|
148
|
echo "dtoverlay=pi3-disable-bt" >> "${BOOT_DIR}/config.txt"
|
|
148
|
echo "dtoverlay=pi3-disable-bt" >> "${BOOT_DIR}/config.txt"
|
|
@@
-154,7
+154,7
if [ "$ENABLE_CONSOLE" = true ] ; then
|
|
154
|
echo "enable_uart=1" >> "${BOOT_DIR}/config.txt"
|
|
154
|
echo "enable_uart=1" >> "${BOOT_DIR}/config.txt"
|
|
155
|
# add string to cmdline
|
|
155
|
# add string to cmdline
|
|
156
|
CMDLINE="${CMDLINE} console=serial0,115200"
|
|
156
|
CMDLINE="${CMDLINE} console=serial0,115200"
|
|
157
|
|
|
157
|
|
|
158
|
# Enable serial console systemd style
|
|
158
|
# Enable serial console systemd style
|
|
159
|
chroot_exec systemctl enable serial-getty\@serial0.service
|
|
159
|
chroot_exec systemctl enable serial-getty\@serial0.service
|
|
160
|
else
|
|
160
|
else
|