[ rk3399 bluetooth ] Fixed and tested on Rockpi4, NanopiM4, Orangepi RK3399
This commit is contained in:
parent
5b23276452
commit
d172d37dd8
@ -93,7 +93,7 @@ family_tweaks()
|
||||
[[ $BOARD == firefly-rk3399 ]] && echo "fdtfile=rockchip/rk3399-firefly.dtb" >> $SDCARD/boot/armbianEnv.txt
|
||||
# install and enable Bluetooth
|
||||
chroot $SDCARD /bin/bash -c "apt-get -y -qq install bluetooth bluez bluez-tools"
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable nanopi-bluetooth.service >/dev/null 2>&1"
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable rk3399-bluetooth.service >/dev/null 2>&1"
|
||||
}
|
||||
|
||||
family_tweaks_bsp()
|
||||
@ -104,6 +104,7 @@ family_tweaks_bsp()
|
||||
cp $SRC/packages/bsp/rk3399/50-rk3399-vpu.rules $destination/etc/udev/rules.d/
|
||||
mkdir -p $destination/etc/sysfs.d
|
||||
cp $SRC/packages/bsp/rk3399/20-gpu-governor.conf $destination/etc/sysfs.d/
|
||||
# Copy Bluetooth service
|
||||
cp $SRC/packages/bsp/rk3399/nanopi-bluetooth.service $destination/lib/systemd/system/
|
||||
# Bluetooth
|
||||
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
|
||||
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ family_tweaks()
|
||||
|
||||
if [[ $BOARD == rockpi-4b ]]; then
|
||||
chroot $SDCARD /bin/bash -c "apt-get -y -qq install bluetooth bluez bluez-tools"
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable rockpi4-bluetooth.service >/dev/null 2>&1"
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable rk3399-bluetooth.service >/dev/null 2>&1"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ family_tweaks_bsp()
|
||||
|
||||
if [[ $BOARD == rockpi-4b ]]; then
|
||||
# Bluetooth
|
||||
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rockpi $destination/usr/bin
|
||||
cp $SRC/packages/bsp/rk3399/rockpi4-bluetooth.service $destination/lib/systemd/system/
|
||||
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
|
||||
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
[Unit]
|
||||
Description=Bluetooth nanopi
|
||||
After=bluetooth.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStartPre=/bin/echo 1 > /sys/class/rfkill/rfkill0/state
|
||||
ExecStart=/usr/bin/hciattach /dev/ttyS0 bcm43xx 115200 > /dev/null
|
||||
TimeoutSec=0
|
||||
RemainAfterExit=yes
|
||||
SysVStartPriority=99
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@ -5,7 +5,7 @@ After=bluetooth.target
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStartPre=/usr/sbin/rfkill unblock all
|
||||
ExecStart=/usr/bin/brcm_patchram_plus_rockpi -d --enable_hci --no2bytes --use_baudrate_for_downloade --tosleep 200000 --baudrate 1500000 --patchram /lib/firmware/brcm/BCM4345C5.hcd /dev/ttyS0
|
||||
ExecStart=/usr/bin/brcm_patchram_plus_rk3399 -d --enable_hci --no2bytes --use_baudrate_for_downloade --tosleep 200000 --baudrate 1500000 --patchram /lib/firmware/brcm/BCM4345C5.hcd /dev/ttyS0
|
||||
TimeoutSec=0
|
||||
RemainAfterExit=yes
|
||||
SysVStartPriority=99
|
||||
Loading…
Reference in New Issue
Block a user