@@ -99,6 +99,49 if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then | |||||
99 | if [ "$ENABLE_CONSOLE" = true ] && [ "$ENABLE_UBOOT" = false ] ; then |
|
99 | if [ "$ENABLE_CONSOLE" = true ] && [ "$ENABLE_UBOOT" = false ] ; then | |
100 | echo "dtoverlay=pi3-disable-bt" >> "${BOOT_DIR}/config.txt" |
|
100 | echo "dtoverlay=pi3-disable-bt" >> "${BOOT_DIR}/config.txt" | |
101 | echo "enable_uart=1" >> "${BOOT_DIR}/config.txt" |
|
101 | echo "enable_uart=1" >> "${BOOT_DIR}/config.txt" | |
|
102 | else | |||
|
103 | # Create temporary directory for Bluetooth sources | |||
|
104 | temp_dir=$(as_nobody mktemp -d) | |||
|
105 | ||||
|
106 | # Fetch Bluetooth sources | |||
|
107 | as_nobody git -C "${temp_dir}" clone "${BLUETOOTH_URL}" | |||
|
108 | ||||
|
109 | # Copy downloaded sources | |||
|
110 | mv "${temp_dir}/pi-bluetooth" "${R}/tmp/" | |||
|
111 | ||||
|
112 | # Set permissions | |||
|
113 | chown -R root:root "${R}/tmp/pi-bluetooth" | |||
|
114 | ||||
|
115 | # Install files to chroot | |||
|
116 | # Install tools | |||
|
117 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart" | |||
|
118 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper" | |||
|
119 | ||||
|
120 | # Install bluetooth udev rule | |||
|
121 | install_readonly "${R}/tmp/pi-bluetooth/lib/udev/rules.d/90-pi-bluetooth.rules" "${LIB_DIR}/udev/rules.d/90-pi-bluetooth.rules" | |||
|
122 | #aur | |||
|
123 | #install_readonly "${R}/tmp/pi-bluetooth/50-bluetooth-hci-auto-poweron.rules" "${ETC_DIR}/udev/rules.d/50-bluetooth-hci-auto-poweron.rules" | |||
|
124 | ||||
|
125 | # Install Firmware Flash file and apropiate licence | |||
|
126 | mkdir "${ETC_DIR}/firmware/" | |||
|
127 | ||||
|
128 | #aur https://aur.archlinux.org/packages/pi-bluetooth/ | |||
|
129 | #install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx" | |||
|
130 | #install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${ETC_DIR}/firmware/BCM43430A1.hcd" | |||
|
131 | ||||
|
132 | wget -O "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" https://aur.archlinux.org/cgit/aur.git/plain/LICENCE.broadcom_bcm43xx?h=pi-bluetooth | |||
|
133 | wget -O "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" https://aur.archlinux.org/cgit/aur.git/plain/BCM43430A1.hcd?h=pi-bluetooth | |||
|
134 | ||||
|
135 | # Install systemd service for bluetooth | |||
|
136 | #install_readonly "${R}/tmp/pi-bluetooth/brcm43438.service" "${ETC_DIR}/systemd/system/brcm43438.service" | |||
|
137 | ||||
|
138 | # Remove temporary directory | |||
|
139 | #rm -fr "${temp_dir}" | |||
|
140 | ||||
|
141 | # Get /dev/serial back for compability | |||
|
142 | # Raspberry-sys-mod package | |||
|
143 | wget -O "${ETC_DIR}/udev/rules.d/99-com.rules" https://raw.githubusercontent.com/RPi-Distro/raspberrypi-sys-mods/master/etc.armhf/udev/rules.d/99-com.rules | |||
|
144 | ||||
102 | fi |
|
145 | fi | |
103 | fi |
|
146 | fi | |
104 |
|
147 | |||
@@ -107,17 +150,17 ln -sf firmware/config.txt "${R}/boot/config.txt" | |||||
107 | ln -sf firmware/cmdline.txt "${R}/boot/cmdline.txt" |
|
150 | ln -sf firmware/cmdline.txt "${R}/boot/cmdline.txt" | |
108 |
|
151 | |||
109 | # Install and setup kernel modules to load at boot |
|
152 | # Install and setup kernel modules to load at boot | |
110 |
mkdir -p "${R} |
|
153 | mkdir -p "${LIB_DIR}/modules-load.d/" | |
111 |
install_readonly files/modules/rpi2.conf "${R} |
|
154 | install_readonly files/modules/rpi2.conf "${LIB_DIR}/modules-load.d/rpi2.conf" | |
112 |
|
155 | |||
113 | # Load hardware random module at boot |
|
156 | # Load hardware random module at boot | |
114 | if [ "$ENABLE_HWRANDOM" = true ] && [ "$BUILD_KERNEL" = false ] ; then |
|
157 | if [ "$ENABLE_HWRANDOM" = true ] && [ "$BUILD_KERNEL" = false ] ; then | |
115 |
sed -i "s/^# bcm2708_rng/bcm2708_rng/" "${R} |
|
158 | sed -i "s/^# bcm2708_rng/bcm2708_rng/" "${LIB_DIR}/modules-load.d/rpi2.conf" | |
116 | fi |
|
159 | fi | |
117 |
|
160 | |||
118 | # Load sound module at boot |
|
161 | # Load sound module at boot | |
119 | if [ "$ENABLE_SOUND" = true ] ; then |
|
162 | if [ "$ENABLE_SOUND" = true ] ; then | |
120 |
sed -i "s/^# snd_bcm2835/snd_bcm2835/" "${R} |
|
163 | sed -i "s/^# snd_bcm2835/snd_bcm2835/" "${LIB_DIR}/modules-load.d/rpi2.conf" | |
121 | else |
|
164 | else | |
122 | echo "dtparam=audio=off" >> "${BOOT_DIR}/config.txt" |
|
165 | echo "dtparam=audio=off" >> "${BOOT_DIR}/config.txt" | |
123 | fi |
|
166 | fi | |
@@ -125,16 +168,16 fi | |||||
125 | # Enable I2C interface |
|
168 | # Enable I2C interface | |
126 | if [ "$ENABLE_I2C" = true ] ; then |
|
169 | if [ "$ENABLE_I2C" = true ] ; then | |
127 | echo "dtparam=i2c_arm=on" >> "${BOOT_DIR}/config.txt" |
|
170 | echo "dtparam=i2c_arm=on" >> "${BOOT_DIR}/config.txt" | |
128 |
sed -i "s/^# i2c-bcm2708/i2c-bcm2708/" "${R} |
|
171 | sed -i "s/^# i2c-bcm2708/i2c-bcm2708/" "${LIB_DIR}/modules-load.d/rpi2.conf" | |
129 |
sed -i "s/^# i2c-dev/i2c-dev/" "${R} |
|
172 | sed -i "s/^# i2c-dev/i2c-dev/" "${LIB_DIR}/modules-load.d/rpi2.conf" | |
130 | fi |
|
173 | fi | |
131 |
|
174 | |||
132 | # Enable SPI interface |
|
175 | # Enable SPI interface | |
133 | if [ "$ENABLE_SPI" = true ] ; then |
|
176 | if [ "$ENABLE_SPI" = true ] ; then | |
134 | echo "dtparam=spi=on" >> "${BOOT_DIR}/config.txt" |
|
177 | echo "dtparam=spi=on" >> "${BOOT_DIR}/config.txt" | |
135 |
echo "spi-bcm2708" >> "${R} |
|
178 | echo "spi-bcm2708" >> "${LIB_DIR}/modules-load.d/rpi2.conf" | |
136 | if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ]; then |
|
179 | if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ]; then | |
137 |
sed -i "s/spi-bcm2708/spi-bcm2835/" "${R} |
|
180 | sed -i "s/spi-bcm2708/spi-bcm2835/" "${LIB_DIR}/modules-load.d/rpi2.conf" | |
138 | fi |
|
181 | fi | |
139 | fi |
|
182 | fi | |
140 |
|
183 |
@@ -104,6 +104,7 COLLABORA_URL=${COLLABORA_URL:=https://repositories.collabora.co.uk/debian} | |||||
104 | FBTURBO_URL=${FBTURBO_URL:=https://github.com/ssvb/xf86-video-fbturbo.git} |
|
104 | FBTURBO_URL=${FBTURBO_URL:=https://github.com/ssvb/xf86-video-fbturbo.git} | |
105 | UBOOT_URL=${UBOOT_URL:=https://git.denx.de/u-boot.git} |
|
105 | UBOOT_URL=${UBOOT_URL:=https://git.denx.de/u-boot.git} | |
106 | VIDEOCORE_URL=${VIDEOCORE_URL=https://github.com/raspberrypi/userland} |
|
106 | VIDEOCORE_URL=${VIDEOCORE_URL=https://github.com/raspberrypi/userland} | |
|
107 | BLUETOOTH_URL=${BLUETOOTH_URL:=https://github.com/RPi-Distro/pi-bluetooth.git} | |||
107 |
|
108 | |||
108 | # Build directories |
|
109 | # Build directories | |
109 | BASEDIR=${BASEDIR:=$(pwd)/images/${RELEASE}} |
|
110 | BASEDIR=${BASEDIR:=$(pwd)/images/${RELEASE}} |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant