-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change bluetooth-raspberry.service to template unit
Serial device name is an instance - ttyAMA0 by default
- Loading branch information
Showing
3 changed files
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Maintainer: Edmunt Pienkowsky <[email protected]> | ||
|
||
pkgname=bluetooth-raspberrypi | ||
pkgver=1 | ||
pkgver=2 | ||
pkgrel=1 | ||
pkgdesc='Bluetooth support for Raspberry Pi' | ||
arch=('any') | ||
|
@@ -10,11 +10,11 @@ url='http://wiki.archlinux.org/index.php/bluetooth' | |
depends=('firmware-raspberrypi' 'bluez-utils') | ||
conflicts=('pi-bluetooth') | ||
options=('!strip') | ||
source=('bluetooth-raspberrypi.service' | ||
source=('bluetooth-raspberrypi@.service' | ||
'bluetooth-raspberrypi.conf' | ||
'61-amba-tty-alias.rules') | ||
md5sums=('8e965b8e57cb70f7ef8a82b431380b94' | ||
'80ee98fd2dfec67abeeb8e602f226a15' | ||
md5sums=('690edc48aed27f518128d79a5e24a952' | ||
'7d32416a03fba468845cf8b22ef96a05' | ||
'9406dbec74def6d99605b5bbab2a6ed5') | ||
|
||
package() { | ||
|
@@ -24,7 +24,7 @@ package() { | |
install -d "${pkgdir}/usr/lib/udev/rules.d" | ||
install -d "${pkgdir}/usr/lib/firmware/updates/brcm" | ||
|
||
install -m 0644 bluetooth-raspberrypi.service "${pkgdir}/usr/lib/systemd/system" | ||
install -m 0644 bluetooth-raspberrypi@.service "${pkgdir}/usr/lib/systemd/system" | ||
install -m 0644 bluetooth-raspberrypi.conf "${pkgdir}/usr/lib/systemd/system/bluetooth.service.d" | ||
install -m 0644 61-amba-tty-alias.rules "${pkgdir}/usr/lib/udev/rules.d" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[Unit] | ||
Wants=bluetooth-raspberrypi.service | ||
Wants=bluetooth-raspberrypi@ttyAMA0.service | ||
|
||
[Install] | ||
Also=bluetooth-raspberrypi.service | ||
Also=bluetooth-raspberrypi@ttyAMA0.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
[Unit] | ||
Description=Broadcom BCM43438 bluetooth HCI | ||
Description=Broadcom BCM434* Bluetooth HCI | ||
ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins | ||
DefaultDependencies=no | ||
Wants=local-fs.target | ||
Before=sysinit.target shutdown.target | ||
After=systemd-modules-load.service local-fs.target | ||
After=sys-subsystem-serial-devices-ttyAMA0.device | ||
BindsTo=sys-subsystem-serial-devices-%i.device | ||
After=sys-subsystem-serial-devices-%i.device local-fs.target | ||
RefuseManualStart=yes | ||
RefuseManualStop=yes | ||
Conflicts=shutdown.target | ||
|
||
[Service] | ||
ExecStart=/usr/bin/btattach -B /dev/ttyAMA0 -P bcm -S 3000000 -N | ||
ExecStart=/usr/bin/btattach -B /dev/%i -P bcm -S 3000000 -N | ||
LimitNPROC=1 | ||
ProtectHome=true | ||
ProtectSystem=full | ||
|
||
[Install] | ||
WantedBy=sysinit.target | ||
DefaultInstance=ttyAMA0 |