diff --git a/bootstrap.d/15-rpi-config.sh b/bootstrap.d/15-rpi-config.sh index 696f2d1..48b2007 100644 --- a/bootstrap.d/15-rpi-config.sh +++ b/bootstrap.d/15-rpi-config.sh @@ -95,7 +95,7 @@ if [ "$ENABLE_TURBO" = true ] ; then fi if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then - + # Bluetooth enabled if [ "$ENABLE_BLUETOOTH" = true ] ; then # Create temporary directory for Bluetooth sources @@ -117,7 +117,7 @@ if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then # Install tools install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart" install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper" - + # make scripts executable chmod +x "${R}/usr/bin/bthelper" chmod +x "${R}/usr/bin/btuart" @@ -131,11 +131,11 @@ if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${BLUETOOTH_FIRMWARE_DIR}/LICENCE.broadcom_bcm43xx" install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service" install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service" - + # Remove temporary directories rm -fr "${temp_dir}" rm -fr "${R}"/tmp/pi-bluetooth - + # 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 if [ "$ENABLE_MINIUART_OVERLAY" = true ] ; then @@ -147,10 +147,10 @@ if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then echo "core_freq=250" >> "${BOOT_DIR}/config.txt" fi fi - + # Activate services chroot_exec systemctl enable pi-bluetooth.hciuart.service - + else # if ENABLE_BLUETOOTH = false # set overlay to disable bluetooth echo "dtoverlay=pi3-disable-bt" >> "${BOOT_DIR}/config.txt" @@ -162,7 +162,7 @@ if [ "$ENABLE_CONSOLE" = true ] ; then echo "enable_uart=1" >> "${BOOT_DIR}/config.txt" # add string to cmdline CMDLINE="${CMDLINE} console=serial0,115200" - + # Enable serial console systemd style chroot_exec systemctl enable serial-getty@serial0.service else @@ -184,25 +184,25 @@ if [ "$ENABLE_SYSTEMDSWAP" = true ] ; then # Remove temporary directory for systemd-swap sources rm -fr "${temp_dir}" - + # Change into downloaded src dir cd "${R}/tmp/systemd-swap" || exit - + # Build package . ./package.sh debian - + # Install package chroot_exec dpkg -i /tmp/systemd-swap/systemd-swap-*any.deb - + # Enable service chroot_exec systemctl enable systemd-swap - + # Change back into script root dir cd "${WORKDIR}" || exit else # Enable ZSWAP in cmdline if systemd-swap is not used if [ "$KERNEL_ZSWAP" = true ] ; then - CMDLINE="${CMDLINE} zswap.enabled=1 zswap.max_pool_percent=25 zswap.compressor=lz4" + CMDLINE="${CMDLINE} zswap.enabled=1 zswap.max_pool_percent=25 zswap.compressor=lz4" fi fi if [ "$KERNEL_SECURITY" = true ] ; then