@@ -95,7 +95,7 if [ "$ENABLE_TURBO" = true ] ; then | |||||
95 | fi |
|
95 | fi | |
96 |
|
96 | |||
97 | if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then |
|
97 | if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then | |
98 |
|
98 | |||
99 | # Bluetooth enabled |
|
99 | # Bluetooth enabled | |
100 | if [ "$ENABLE_BLUETOOTH" = true ] ; then |
|
100 | if [ "$ENABLE_BLUETOOTH" = true ] ; then | |
101 | # Create temporary directory for Bluetooth sources |
|
101 | # Create temporary directory for Bluetooth sources | |
@@ -117,7 +117,7 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then | |||||
117 | # Install tools |
|
117 | # Install tools | |
118 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart" |
|
118 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart" | |
119 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper" |
|
119 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper" | |
120 |
|
120 | |||
121 | # make scripts executable |
|
121 | # make scripts executable | |
122 | chmod +x "${R}/usr/bin/bthelper" |
|
122 | chmod +x "${R}/usr/bin/bthelper" | |
123 | chmod +x "${R}/usr/bin/btuart" |
|
123 | chmod +x "${R}/usr/bin/btuart" | |
@@ -131,11 +131,11 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then | |||||
131 | install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${BLUETOOTH_FIRMWARE_DIR}/LICENCE.broadcom_bcm43xx" |
|
131 | install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${BLUETOOTH_FIRMWARE_DIR}/LICENCE.broadcom_bcm43xx" | |
132 | install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service" |
|
132 | install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service" | |
133 | install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service" |
|
133 | install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service" | |
134 |
|
134 | |||
135 | # Remove temporary directories |
|
135 | # Remove temporary directories | |
136 | rm -fr "${temp_dir}" |
|
136 | rm -fr "${temp_dir}" | |
137 | rm -fr "${R}"/tmp/pi-bluetooth |
|
137 | rm -fr "${R}"/tmp/pi-bluetooth | |
138 |
|
138 | |||
139 | # 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 |
|
139 | # 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 | |
140 | if [ "$ENABLE_MINIUART_OVERLAY" = true ] ; then |
|
140 | if [ "$ENABLE_MINIUART_OVERLAY" = true ] ; then | |
141 |
|
141 | |||
@@ -147,10 +147,10 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then | |||||
147 | echo "core_freq=250" >> "${BOOT_DIR}/config.txt" |
|
147 | echo "core_freq=250" >> "${BOOT_DIR}/config.txt" | |
148 | fi |
|
148 | fi | |
149 | fi |
|
149 | fi | |
150 |
|
150 | |||
151 | # Activate services |
|
151 | # Activate services | |
152 | chroot_exec systemctl enable pi-bluetooth.hciuart.service |
|
152 | chroot_exec systemctl enable pi-bluetooth.hciuart.service | |
153 |
|
153 | |||
154 | else # if ENABLE_BLUETOOTH = false |
|
154 | else # if ENABLE_BLUETOOTH = false | |
155 | # set overlay to disable bluetooth |
|
155 | # set overlay to disable bluetooth | |
156 | echo "dtoverlay=pi3-disable-bt" >> "${BOOT_DIR}/config.txt" |
|
156 | echo "dtoverlay=pi3-disable-bt" >> "${BOOT_DIR}/config.txt" | |
@@ -162,7 +162,7 if [ "$ENABLE_CONSOLE" = true ] ; then | |||||
162 | echo "enable_uart=1" >> "${BOOT_DIR}/config.txt" |
|
162 | echo "enable_uart=1" >> "${BOOT_DIR}/config.txt" | |
163 | # add string to cmdline |
|
163 | # add string to cmdline | |
164 | CMDLINE="${CMDLINE} console=serial0,115200" |
|
164 | CMDLINE="${CMDLINE} console=serial0,115200" | |
165 |
|
165 | |||
166 | # Enable serial console systemd style |
|
166 | # Enable serial console systemd style | |
167 | chroot_exec systemctl enable serial-getty@serial0.service |
|
167 | chroot_exec systemctl enable serial-getty@serial0.service | |
168 | else |
|
168 | else | |
@@ -184,25 +184,25 if [ "$ENABLE_SYSTEMDSWAP" = true ] ; then | |||||
184 |
|
184 | |||
185 | # Remove temporary directory for systemd-swap sources |
|
185 | # Remove temporary directory for systemd-swap sources | |
186 | rm -fr "${temp_dir}" |
|
186 | rm -fr "${temp_dir}" | |
187 |
|
187 | |||
188 | # Change into downloaded src dir |
|
188 | # Change into downloaded src dir | |
189 | cd "${R}/tmp/systemd-swap" || exit |
|
189 | cd "${R}/tmp/systemd-swap" || exit | |
190 |
|
190 | |||
191 | # Build package |
|
191 | # Build package | |
192 | . ./package.sh debian |
|
192 | . ./package.sh debian | |
193 |
|
193 | |||
194 | # Install package |
|
194 | # Install package | |
195 | chroot_exec dpkg -i /tmp/systemd-swap/systemd-swap-*any.deb |
|
195 | chroot_exec dpkg -i /tmp/systemd-swap/systemd-swap-*any.deb | |
196 |
|
196 | |||
197 | # Enable service |
|
197 | # Enable service | |
198 | chroot_exec systemctl enable systemd-swap |
|
198 | chroot_exec systemctl enable systemd-swap | |
199 |
|
199 | |||
200 | # Change back into script root dir |
|
200 | # Change back into script root dir | |
201 | cd "${WORKDIR}" || exit |
|
201 | cd "${WORKDIR}" || exit | |
202 | else |
|
202 | else | |
203 | # Enable ZSWAP in cmdline if systemd-swap is not used |
|
203 | # Enable ZSWAP in cmdline if systemd-swap is not used | |
204 | if [ "$KERNEL_ZSWAP" = true ] ; then |
|
204 | if [ "$KERNEL_ZSWAP" = true ] ; then | |
205 |
CMDLINE="${CMDLINE} zswap.enabled=1 zswap.max_pool_percent=25 zswap.compressor=lz4" |
|
205 | CMDLINE="${CMDLINE} zswap.enabled=1 zswap.max_pool_percent=25 zswap.compressor=lz4" | |
206 | fi |
|
206 | fi | |
207 | fi |
|
207 | fi | |
208 | if [ "$KERNEL_SECURITY" = true ] ; then |
|
208 | if [ "$KERNEL_SECURITY" = true ] ; then |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant