From 92b5a1a9f318928a902a457aa8b7ff6219598c72 2018-12-12 15:46:00 From: Unknown Date: 2018-12-12 15:46:00 Subject: [PATCH] m --- diff --git a/bootstrap.d/15-rpi-config.sh b/bootstrap.d/15-rpi-config.sh index 7c84352..a553680 100644 --- a/bootstrap.d/15-rpi-config.sh +++ b/bootstrap.d/15-rpi-config.sh @@ -156,14 +156,8 @@ if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then # 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 - # set overlay to swap ttyAMA0 and ttyS0 echo "dtoverlay=pi3-miniuart-bt" >> "${BOOT_DIR}/config.txt" - - # if force_turbo didn't lock cpu at high speed, lock it at low speed (XOR logic) or miniuart will be broken - if [ "$ENABLE_TURBO" = false ] ; then - echo "core_freq=250" >> "${BOOT_DIR}/config.txt" - fi fi # Activate services @@ -180,6 +174,13 @@ if [ "$ENABLE_CONSOLE" = true ] ; then echo "enable_uart=1" >> "${BOOT_DIR}/config.txt" # add string to cmdline CMDLINE="${CMDLINE} console=serial0,115200" + + if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ]; then + # if force_turbo didn't lock cpu at high speed, lock it at low speed (XOR logic) or miniuart will be broken + if [ "$ENABLE_TURBO" = false ] ; then + echo "core_freq=250" >> "${BOOT_DIR}/config.txt" + fi + fi # Enable serial console systemd style chroot_exec systemctl enable serial-getty@serial0.service