From 28edde3ee3bddb3c1d60f591d425e071093e89be Mon Sep 17 00:00:00 2001 From: yafen Date: Sat, 1 Aug 2020 18:48:59 +0800 Subject: [PATCH] =?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=20spec=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=94=A8=E4=BA=8E=E6=9E=84=E5=BB=BA=E6=A0=91=E8=8E=93?= =?UTF-8?q?=E6=B4=BE=20hciuart=20=E7=AD=89=E6=9C=8D=E5=8A=A1=E7=9A=84=20RP?= =?UTF-8?q?M?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENCE.pi-bluetooth | 32 +++++++++++++++++ README.en.md | 36 +++++++++---------- README.md | 35 +++++++++--------- raspberrypi-bluetooth-20200729.tar.gz | Bin 0 -> 1469 bytes raspberrypi-bluetooth.spec | 50 ++++++++++++++++++++++++++ 5 files changed, 117 insertions(+), 36 deletions(-) create mode 100644 LICENCE.pi-bluetooth create mode 100644 raspberrypi-bluetooth-20200729.tar.gz create mode 100644 raspberrypi-bluetooth.spec diff --git a/LICENCE.pi-bluetooth b/LICENCE.pi-bluetooth new file mode 100644 index 0000000..316c2c6 --- /dev/null +++ b/LICENCE.pi-bluetooth @@ -0,0 +1,32 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: pi-bluetooth +Source: https://github.com/RPi-Distro/pi-bluetooth + +Files: * +Copyright: 2016 Raspberry Pi (Trading) Ltd. +License: BSD-3-Clause + +License: BSD-3-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.en.md b/README.en.md index 03cd9b0..acf0085 100644 --- a/README.en.md +++ b/README.en.md @@ -1,22 +1,32 @@ # raspberrypi-bluetooth #### Description -Load firmware of bluetooth on boot for Raspberry Pi +The bluetooth service for RaspberryPi, which loads BCM43430A1 firmware on boot. These files are from the repositories in RaspberryPi community. + +- https://github.com/RPi-Distro/pi-bluetooth #### Software Architecture -Software architecture description + +AArch64 #### Installation -1. xxxx -2. xxxx -3. xxxx +`dnf install raspberrypi-bluetooth` #### Instructions -1. xxxx -2. xxxx -3. xxxx +After installing raspberrypi-bluetooth, + +1. Start the bluetooth service (i.e., hciuart service) to load related firmware: `systemctl start hciuart`. + +2. Check the service's status using the status command: `systemctl status hciuart`. + +3. If this service isn’t running, you can use the restart command: `systemctl restart hciuart` to restart the service. + +4. To view the name and basic information of the bluetooth device, you can use the command: `hciconfig`. + +5. Set the service to start on boot: `systemctl enable hciuart`. + #### Contribution @@ -24,13 +34,3 @@ Software architecture description 2. Create Feat_xxx branch 3. Commit your code 4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index d149d40..2dc33d1 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,32 @@ # raspberrypi-bluetooth #### 介绍 -Load firmware of bluetooth on boot for Raspberry Pi + +Raspberry Pi 的蓝牙相关服务组件,用于树莓派开机时加载 BCM43430A1 固件。文件来自于 Raspberry Pi 社区的上游仓库: + +- https://github.com/RPi-Distro/pi-bluetooth #### 软件架构 -软件架构说明 +AArch64 #### 安装教程 -1. xxxx -2. xxxx -3. xxxx +`dnf install raspberrypi-bluetooth` #### 使用说明 -1. xxxx -2. xxxx -3. xxxx +安装 raspberrypi-bluetooth 后, + +1. 启动蓝牙服务(hciuart 服务)用于加载相关固件:`systemctl status hciuart`。 + +2. 查看该服务的运行状态:`systemctl status hciuart`。 + +3. 如果该服务启动失败,重启该服务:`systemctl restart hciuart`。 + +4. 查看蓝牙设备的名称和基本信息:`hciconfig`。 + +5. 设置该服务开机启动:`systemctl enable hciuart`。 #### 参与贡献 @@ -25,13 +34,3 @@ Load firmware of bluetooth on boot for Raspberry Pi 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/raspberrypi-bluetooth-20200729.tar.gz b/raspberrypi-bluetooth-20200729.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..11f025b17301efdb4e296c8b47a24a10231fc1f0 GIT binary patch literal 1469 zcmV;u1w#5CiwFR->#{r^#9pXWay9(Ch;n!zpjuj)FEGpZHalKig&tMPxab9dm=!p+!jPO?9!PnPT8 z1XpeQM*eNfnEO8(z=m$xM$Oy+{mXCvo9F-ZB&O_4X_MT~Xv%03JFO%R>3NY6XwEo? zS4lvIIrvE&6Q7X)yfK_Kj(Z9Y4k(}Yf=1*pVVz;h#!flS5+99++lR(7LdrS*K2K@# zyhcnxdf8)dQyS-GFY|{__yRJhy?N03QOzDkN z;)F@|j>hLoXGHuiQp=ojk!NL(#;B3oEzUTIk@P4!Q{K2SZl*bQhDF4vR-o)%oO4c? z^0kRs6Yk*u9vhG-CE4>;Bfv8MH!btB|Jzng`u{p`jsG9dOahK5%xQ-S=?f=a7{t^J zrapSL{j!VZbeKludJmmwfky}5iUWRSEb)I%%)NEoKL4*8wl4F(bzlYlxntf-hv2`m z68|Po{E`2fF7yAjU`76Cf%#54mhf*FR`pZ|C^1>g0n?slQyrk)h+yjnWn(-=Oi_h~2 zOm+|`3xl66#%B?v$p_3yk}&*yf2=6DYDX;@DhfU%SSE4lT#?vPk)kTBPY6Uw!iyAe z8N6z=`0{Xrz8mwU;4a`#k|j9=g_z1WstBbh#23XGzEaerqQo0IKEioMQqbOaKy9|6 z5d`=y@;YocpVrM^IZq*yrx@GRvarDR8E1vHUCF1rX(CAF0KMX)0Ss^|QA0N8G zA0~h3^PdJh177!)<06U_nZy0-v2y(9rSlziEQ|kkif zzH>1OxQw~}fCutvL;)4cLR*EacRa%+AkjR)H`|SN``A%PloR~f?HnI8UOIgrW8O8_ zL*i0Li;E!|BStU3!1Kf3)B0SH;q=8}QJTn@cUzh*`pp~qD_T|bTQ~IAw5R>WLi;I3 zTNZ*RA|&zZk92dictB};TOXC02K^x)@zZfQV|L662`V`F@3d2eGng{6DSE}78;btm;|sWsh%5JWi)rGj?l*B) zH+zR6p6OZukKr*cWAoxN#0;?(qk3@_o29v(O-_pGO2PAowlx}oHHiuk^21z%(u5vm zQ`ph+>3gP8#o2Lkc|H;`5wT2yUDcmnCjkX~ZEt;eEQ$XS^&Y7HU#%Vni1^x@}B=^yAd;YQfm-jzw!K(ac1r~U_!JX{j*8F4ruiKLUb>O!A@9EknAA>~u z5*^FF|5%1`iGSNNY?=SB16y#z=N?Svk=pw7W<*>C@ym!LTzVg*G+Mob*N2XyxWMe)`@~^Ks6|kk9QL{_@vka{KL@ z#$m7fH+IiIKt6gm`^KdH4^uM<2?+@a2?+@a2?+@a2?+@a2?+@a2?+@a2?+@a2?+@a X2?+@a2?+@ai7WUA$j8{p08jt`1iaoS literal 0 HcmV?d00001 diff --git a/raspberrypi-bluetooth.spec b/raspberrypi-bluetooth.spec new file mode 100644 index 0000000..47df891 --- /dev/null +++ b/raspberrypi-bluetooth.spec @@ -0,0 +1,50 @@ +%global _bin_path /usr/bin +%global _rules_path /lib/udev/rules.d +%global _systemd_path /lib/systemd/system +%global _license_path /usr/share/licenses/raspi +%global debug_package %{nil} + +Name: raspberrypi-bluetooth +Version: 20200729 +Release: 1 +Summary: bluetooth files used for RaspberryPi +License: BSD-3-Clause +ExclusiveArch: aarch64 + +Provides: raspberrypi-bluetooth = %{version}-%{release} + +Source0: %{name}-%{version}.tar.gz +Source1: LICENCE.pi-bluetooth + +%prep +%setup -q -c + +%description +This package contains executable files of bluetooth required by some RaspberryPi devices. + +%install +mkdir -p %{buildroot}%{_bin_path} +mkdir -p %{buildroot}%{_rules_path} +mkdir -p %{buildroot}%{_systemd_path} +mkdir -p %{buildroot}%{_license_path} +install -p -m 644 %{_sourcedir}/LICENCE.* %{buildroot}%{_license_path}/ +cd %{name}-%{version} +install -p -m 755 usr/bin/* %{buildroot}%{_bin_path}/ +install -p -m 644 lib/udev/rules.d/90-pi-bluetooth.rules %{buildroot}%{_rules_path}/ +install -p -m 644 debian/pi-bluetooth.bthelper\@.service %{buildroot}%{_systemd_path}/bthelper\@.service +install -p -m 644 debian/pi-bluetooth.hciuart.service %{buildroot}%{_systemd_path}/hciuart.service + +cd - + +%files +%dir %{_rules_path} +%dir %{_systemd_path} +%dir %{_license_path} +%{_license_path} +%{_bin_path}/* +%{_rules_path}/* +%{_systemd_path}/* + +%changelog +* Wed Jul 29 2020 Yafen Fang - 20200729-1 +- Add rules file, bthelper and hciuart from pi-bluetooth.