##// END OF EJS Templates
Enable_Bluetooth var...
Unknown -
r437:1fe79547704e
parent child
Show More
@@ -154,7 +154,6 Set the IP address for the second NTP server.
154 #### Basic system features:
154 #### Basic system features:
155 ##### `ENABLE_CONSOLE`=true
155 ##### `ENABLE_CONSOLE`=true
156 Enable serial console interface. Recommended if no monitor or keyboard is connected to the RPi2/3. In case of problems fe. if the network (auto) configuration failed - the serial console can be used to access the system.
156 Enable serial console interface. Recommended if no monitor or keyboard is connected to the RPi2/3. In case of problems fe. if the network (auto) configuration failed - the serial console can be used to access the system.
157 On `RPI_MODEL= 0,3,3P` - Bluetooth gets auto enabled if `ENABLE_CONSOLE` and `ENABLE_UBOOT` are set to `false`
158
157
159 ##### `ENABLE_I2C`=false
158 ##### `ENABLE_I2C`=false
160 Enable I2C interface on the RPi2/3. Please check the [RPi2/3 pinout diagrams](https://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins.
159 Enable I2C interface on the RPi2/3. Please check the [RPi2/3 pinout diagrams](https://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins.
@@ -174,6 +173,9 Allow the installation of non-free Debian packages that do not comply with the D
174 ##### `ENABLE_WIRELESS`=false
173 ##### `ENABLE_WIRELESS`=false
175 Download and install the [closed-source firmware binary blob](https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm) that is required to run the internal wireless interface of the Raspberry Pi model `3`. This parameter is ignored if the specified `RPI_MODEL` is not `3`.
174 Download and install the [closed-source firmware binary blob](https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm) that is required to run the internal wireless interface of the Raspberry Pi model `3`. This parameter is ignored if the specified `RPI_MODEL` is not `3`.
176
175
176 ##### `ENABLE_BLUETOOTH`=false
177 Enable Bluetooth interface on the RPi0/3.
178
177 ##### `ENABLE_RSYSLOG`=true
179 ##### `ENABLE_RSYSLOG`=true
178 If set to false, disable and uninstall rsyslog (so logs will be available only in journal files)
180 If set to false, disable and uninstall rsyslog (so logs will be available only in journal files)
179
181
@@ -94,44 +94,46 if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
94 if [ "$ENABLE_CONSOLE" = true ] && [ "$ENABLE_UBOOT" = false ] ; then
94 if [ "$ENABLE_CONSOLE" = true ] && [ "$ENABLE_UBOOT" = false ] ; then
95 echo "dtoverlay=pi3-disable-bt" >> "${BOOT_DIR}/config.txt"
95 echo "dtoverlay=pi3-disable-bt" >> "${BOOT_DIR}/config.txt"
96 echo "enable_uart=1" >> "${BOOT_DIR}/config.txt"
96 echo "enable_uart=1" >> "${BOOT_DIR}/config.txt"
97 else
97 fi
98 # Create temporary directory for Bluetooth sources
98 fi
99 temp_dir=$(as_nobody mktemp -d)
100
99
101 # Fetch Bluetooth sources
100 if [ "$ENABLE_BLUETOOTH" = true ] ; then
102 as_nobody git -C "${temp_dir}" clone "${BLUETOOTH_URL}"
101 # Create temporary directory for Bluetooth sources
102 temp_dir=$(as_nobody mktemp -d)
103
103
104 # Copy downloaded sources
104 # Fetch Bluetooth sources
105 mv "${temp_dir}/pi-bluetooth" "${R}/tmp/"
105 as_nobody git -C "${temp_dir}" clone "${BLUETOOTH_URL}"
106
106
107 # Raspberry-sys-mod package for /dev/serial device needed by bluetooth service
107 # Copy downloaded sources
108 as_nobody wget -q -O "${R}/tmp/pi-bluetooth/99-com.rules" https://raw.githubusercontent.com/RPi-Distro/raspberrypi-sys-mods/master/etc.armhf/udev/rules.d/99-com.rules
108 mv "${temp_dir}/pi-bluetooth" "${R}/tmp/"
109 # Bluetooth firmware from arch aur https://aur.archlinux.org/packages/pi-bluetooth/
110 as_nobody wget -q -O "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" https://aur.archlinux.org/cgit/aur.git/plain/LICENCE.broadcom_bcm43xx?h=pi-bluetooth
111 as_nobody wget -q -O "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" https://aur.archlinux.org/cgit/aur.git/plain/BCM43430A1.hcd?h=pi-bluetooth
112
109
113 # Set permissions
110 # Raspberry-sys-mod package for /dev/serial device needed by bluetooth service
114 chown -R root:root "${R}/tmp/pi-bluetooth"
111 as_nobody wget -q -O "${R}/tmp/pi-bluetooth/99-com.rules" https://raw.githubusercontent.com/RPi-Distro/raspberrypi-sys-mods/master/etc.armhf/udev/rules.d/99-com.rules
112 # Bluetooth firmware from arch aur https://aur.archlinux.org/packages/pi-bluetooth/
113 as_nobody wget -q -O "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" https://aur.archlinux.org/cgit/aur.git/plain/LICENCE.broadcom_bcm43xx?h=pi-bluetooth
114 as_nobody wget -q -O "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" https://aur.archlinux.org/cgit/aur.git/plain/BCM43430A1.hcd?h=pi-bluetooth
115
115
116 # Install tools
116 # Set permissions
117 install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart"
117 chown -R root:root "${R}/tmp/pi-bluetooth"
118 install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper"
119
118
120 # Install bluetooth udev rule
119 # Install tools
121 install_readonly "${R}/tmp/pi-bluetooth/lib/udev/rules.d/90-pi-bluetooth.rules" "${LIB_DIR}/udev/rules.d/90-pi-bluetooth.rules"
120 install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart"
121 install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper"
122
122
123 # Install Firmware Flash file and apropiate licence
123 # Install bluetooth udev rule
124 mkdir "${ETC_DIR}/firmware/"
124 install_readonly "${R}/tmp/pi-bluetooth/lib/udev/rules.d/90-pi-bluetooth.rules" "${LIB_DIR}/udev/rules.d/90-pi-bluetooth.rules"
125 install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx"
125
126 install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx"
126 # Install Firmware Flash file and apropiate licence
127 install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service"
127 mkdir "${ETC_DIR}/firmware/"
128 install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service"
128 install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx"
129 # Install udev rule for bluetooth device
129 install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx"
130 install_readonly "${R}/tmp/pi-bluetooth/99-com.rules" "${ETC_DIR}/udev/rules.d/99-com.rules"
130 install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service"
131 install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service"
132 # Install udev rule for bluetooth device
133 install_readonly "${R}/tmp/pi-bluetooth/99-com.rules" "${ETC_DIR}/udev/rules.d/99-com.rules"
131
134
132 # Remove temporary directory
135 # Remove temporary directory
133 rm -fr "${temp_dir}"
136 rm -fr "${temp_dir}"
134 fi
135 fi
137 fi
136
138
137 # Create firmware configuration and cmdline symlinks
139 # Create firmware configuration and cmdline symlinks
@@ -107,28 +107,26 if [ "$ENABLE_WIRELESS" = true ] ; then
107 as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.bin" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.bin"
107 as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.bin" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.bin"
108 as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.txt" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.txt"
108 as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.txt" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.txt"
109 as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.clm_blob" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.clm_blob"
109 as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.clm_blob" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.clm_blob"
110
111 # Move downloaded firmware binary blob
112 mv "${temp_dir}/brcmfmac43455-sdio."* "${WLAN_FIRMWARE_DIR}/"
113
114 # Set permissions of the firmware binary blob
115 chown root:root "${WLAN_FIRMWARE_DIR}/brcmfmac43455-sdio."*
116 chmod 600 "${WLAN_FIRMWARE_DIR}/brcmfmac43455-sdio."*
110 elif [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 0 ] ; then
117 elif [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 0 ] ; then
111 # Fetch firmware binary blob for RPi3
118 # Fetch firmware binary blob for RPi3
112 as_nobody wget -q -O "${temp_dir}/brcmfmac43430-sdio.bin" "${WLAN_FIRMWARE_URL}/brcmfmac43430-sdio.bin"
119 as_nobody wget -q -O "${temp_dir}/brcmfmac43430-sdio.bin" "${WLAN_FIRMWARE_URL}/brcmfmac43430-sdio.bin"
113 as_nobody wget -q -O "${temp_dir}/brcmfmac43430-sdio.txt" "${WLAN_FIRMWARE_URL}/brcmfmac43430-sdio.txt"
120 as_nobody wget -q -O "${temp_dir}/brcmfmac43430-sdio.txt" "${WLAN_FIRMWARE_URL}/brcmfmac43430-sdio.txt"
114 fi
121
115
122 # Move downloaded firmware binary blob
116 # Move downloaded firmware binary blob
123 mv "${temp_dir}/brcmfmac43430-sdio."* "${WLAN_FIRMWARE_DIR}/"
117 if [ "$RPI_MODEL" = 3P ] ; then
124
118 mv "${temp_dir}/brcmfmac43455-sdio."* "${WLAN_FIRMWARE_DIR}/"
125 # Set permissions of the firmware binary blob
119 elif [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 0 ] ; then
126 chown root:root "${WLAN_FIRMWARE_DIR}/brcmfmac43430-sdio."*
120 mv "${temp_dir}/brcmfmac43430-sdio."* "${WLAN_FIRMWARE_DIR}/"
127 chmod 600 "${WLAN_FIRMWARE_DIR}/brcmfmac43430-sdio."*
121 fi
128 fi
122
129
123 # Remove temporary directory for firmware binary blob
130 # Remove temporary directory for firmware binary blob
124 rm -fr "${temp_dir}"
131 rm -fr "${temp_dir}"
125
126 # Set permissions of the firmware binary blob
127 if [ "$RPI_MODEL" = 3P ] ; then
128 chown root:root "${WLAN_FIRMWARE_DIR}/brcmfmac43455-sdio."*
129 chmod 600 "${WLAN_FIRMWARE_DIR}/brcmfmac43455-sdio."*
130 elif [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 0 ] ; then
131 chown root:root "${WLAN_FIRMWARE_DIR}/brcmfmac43430-sdio."*
132 chmod 600 "${WLAN_FIRMWARE_DIR}/brcmfmac43430-sdio."*
133 fi
134 fi
132 fi
@@ -106,6 +106,7 APT_PROXY=${APT_PROXY:=""}
106 APT_SERVER=${APT_SERVER:="ftp.debian.org"}
106 APT_SERVER=${APT_SERVER:="ftp.debian.org"}
107
107
108 # Feature settings
108 # Feature settings
109 ENABLE_BLUETOOTH=${ENABLE_BLUETOOTH:=false}
109 ENABLE_CONSOLE=${ENABLE_CONSOLE:=true}
110 ENABLE_CONSOLE=${ENABLE_CONSOLE:=true}
110 ENABLE_I2C=${ENABLE_I2C:=false}
111 ENABLE_I2C=${ENABLE_I2C:=false}
111 ENABLE_SPI=${ENABLE_SPI:=false}
112 ENABLE_SPI=${ENABLE_SPI:=false}
@@ -352,6 +353,14 if [ "$ENABLE_UBOOT" = true ] ; then
352 APT_INCLUDES="${APT_INCLUDES},device-tree-compiler,bison,flex,bc"
353 APT_INCLUDES="${APT_INCLUDES},device-tree-compiler,bison,flex,bc"
353 fi
354 fi
354
355
356 if [ "$ENABLE_BLUETOOTH" = true ] ; then
357 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
358 if [ "$ENABLE_CONSOLE" = false ] ; then
359 APT_INCLUDES="${APT_INCLUDES},bluetooth,bluez"
360 fi
361 fi
362 fi
363
355 # Check if root SSH (v2) public key file exists
364 # Check if root SSH (v2) public key file exists
356 if [ -n "$SSH_ROOT_PUB_KEY" ] ; then
365 if [ -n "$SSH_ROOT_PUB_KEY" ] ; then
357 if [ ! -f "$SSH_ROOT_PUB_KEY" ] ; then
366 if [ ! -f "$SSH_ROOT_PUB_KEY" ] ; then
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant