1
0

rtl8723bs_bt: new firmware package

This commit is contained in:
Adam Green
2017-12-13 00:58:43 +00:00
parent ba81a8ebac
commit eff30ed660
5 changed files with 92 additions and 0 deletions

@ -0,0 +1,29 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2017-present Team LibreELEC
#
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="rtl8723bs_bt"
PKG_VERSION="09eb91f"
PKG_SHA256="4bb8483c4a14a9e0dfc4a6ddca18486caab5f361be2441b91e9e2a399ca9f33e"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/lwfinger/rtl8723bs_bt"
PKG_URL="https://github.com/lwfinger/rtl8723bs_bt/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="firmware"
PKG_SHORTDESC="rtl8723bs_bt Linux firmware"
PKG_LONGDESC="rtl8723bs_bt Linux firmware"

@ -0,0 +1,26 @@
diff --git a/Makefile b/Makefile
index 52506b9..fd196f3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,15 @@
rtk_hciattach:hciattach.c hciattach_rtk.o
- cc -o rtk_hciattach hciattach.c hciattach_rtk.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o rtk_hciattach hciattach.c hciattach_rtk.o
hciattach_rtk.o:hciattach_rtk.c
- cc -c hciattach_rtk.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -c hciattach_rtk.c
-clean:
- rm -f *.o rtk_hciattach
+all:
+ rtk_hciattach
install:
- mkdir -p /lib/firmware/rtl_bt
- cp -p rtlbt_* /lib/firmware/rtl_bt/.
+ mkdir -p $(DESTDIR)/usr/bin
+ cp -P rtk_hciattach $(DESTDIR)/usr/bin
+
+clean:
+ rm -f *.o rtk_hciattach

@ -0,0 +1,20 @@
--- a/hciattach_rtk.c 2016-07-18 00:47:52.000000000 +0100
+++ b/hciattach_rtk.c 2017-12-15 04:27:39.481299996 +0000
@@ -1419,7 +1419,7 @@
int ret = 0;
struct stat st;
- ret = sprintf(firmware_file_name, FIRMWARE_DIRECTORY"rtlbt_fw");
+ ret = sprintf(firmware_file_name, FIRMWARE_DIRECTORY"rtl8723b_fw");
return firmware_file_name;
}
@@ -1504,7 +1504,7 @@
int ret = 0;
int i = 0;
- ret = sprintf(bt_config_file_name, BT_CONFIG_DIRECTORY"rtlbt_config");
+ ret = sprintf(bt_config_file_name, BT_CONFIG_DIRECTORY"rtl8723b_config");
if (stat(bt_config_file_name, &st) < 0) {
RS_ERR("can't access bt config file:%s, errno:%d\n", bt_config_file_name, errno);
return -1;

@ -0,0 +1,8 @@
[Unit]
Description=Realtek sdio firmware update
[Service]
Type=simple
RemainAfterExit=yes
EnvironmentFile=/usr/share/bttty.conf
ExecStart=/usr/bin/rtk_hciattach -n -s 115200 ${BTTTY} rtk_h5 2000000

@ -0,0 +1,9 @@
################################################################################
# udev rules file for loading rtl8723bs_bt-firmware
################################################################################
ACTION!="add", GOTO="end"
SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x024c", ATTRS{device}=="0xb723", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rtl8723bs_bt-firmware.service"
GOTO="end"
LABEL="end"