Skip to content
Permalink
Browse files

rtkbt-firmware-aml: introduce new package

  • Loading branch information
adamg88 committed Feb 12, 2020
1 parent 3fa2943 commit a974b204668f92a862a7d9e1cc1fe9826315c379
@@ -0,0 +1,26 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)

PKG_NAME="rtkbt-firmware-aml"
PKG_VERSION="28865e18c4dde6efc5ef34a7bb77ad5e9b85ba1c"
PKG_SHA256="4621a45cb5a66d05f93fa5710386b74bd6cbcb4e931531f5e22fc4d05131f5ea"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/khadas/android_hardware_amlogic_bluetooth"
PKG_URL="https://github.com/khadas/android_hardware_amlogic_bluetooth/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain rtk_hciattach"
PKG_LONGDESC="Realtek BT Linux firmware"
PKG_TOOLCHAIN="manual"

unpack() {
mkdir -p $PKG_BUILD
tar --strip-components=5 -xf $SOURCES/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz -C $PKG_BUILD android_hardware_amlogic_bluetooth-$PKG_VERSION/realtek/rtkbt/Firmware/TV
}

makeinstall_target() {
FWDIR=$INSTALL/$(get_full_firmware_dir)/rtlbt

mkdir -p $FWDIR
cp -a $PKG_BUILD/rtl8723bs_* $FWDIR
cp -a $PKG_BUILD/rtl8822b_* $FWDIR
cp -a $PKG_BUILD/rtl8822cs_* $FWDIR
}
@@ -0,0 +1,12 @@
[Unit]
Description=Attach /dev/ttyS1 to BlueZ stack
Wants=bluetooth.service
Before=bluetooth.service
After=dev-ttyS1.device

[Service]
Type=simple
ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/rfkill/rfkill0/state'
ExecStartPre=/usr/sbin/rfkill unblock bluetooth
ExecStart=/usr/bin/rtk_hciattach -n -s 115200 /dev/ttyS1 rtk_h5
ExecStopPost=/usr/sbin/rfkill block bluetooth
@@ -0,0 +1,11 @@
################################################################################
# udev rules file for loading realtek bt firmware
################################################################################

ACTION!="add", GOTO="end"
SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x024c", ATTRS{device}=="0xb723", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rtkbt-firmware-aml.service"
SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x024c", ATTRS{device}=="0xb822", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rtkbt-firmware-aml.service"
SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x024c", ATTRS{device}=="0xc822", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rtkbt-firmware-aml.service"
GOTO="end"

LABEL="end"

0 comments on commit a974b20

Please sign in to comment.
You can’t perform that action at this time.