From 8137a796aaf7013a826845e795d4123a43c89d52 Mon Sep 17 00:00:00 2001 From: Adam Green Date: Wed, 13 Dec 2017 01:07:40 +0000 Subject: [PATCH] qca9377-firmware-aml: new firmware package --- .../qca9377-firmware-aml/package.mk | 39 +++++++++++++++++++ .../system.d/qca9377-firmware-aml.service | 8 ++++ .../udev.d/80-qca9377-firmware-aml.rules | 6 +++ 3 files changed, 53 insertions(+) create mode 100644 packages/linux-firmware/qca9377-firmware-aml/package.mk create mode 100644 packages/linux-firmware/qca9377-firmware-aml/system.d/qca9377-firmware-aml.service create mode 100644 packages/linux-firmware/qca9377-firmware-aml/udev.d/80-qca9377-firmware-aml.rules diff --git a/packages/linux-firmware/qca9377-firmware-aml/package.mk b/packages/linux-firmware/qca9377-firmware-aml/package.mk new file mode 100644 index 0000000000..41c161248b --- /dev/null +++ b/packages/linux-firmware/qca9377-firmware-aml/package.mk @@ -0,0 +1,39 @@ +################################################################################ +# 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 . +################################################################################ + +PKG_NAME="qca9377-firmware-aml" +PKG_VERSION="1.0.0" +PKG_SHA256="239b10d6fb006f566aa20638a81f98a447fa222e6b74bed2f6039a75b8ccd422" +PKG_ARCH="arm aarch64" +PKG_LICENSE="BSD-3c" +PKG_SITE="http://linode.boundarydevices.com/repos/apt/ubuntu-relx/pool/main/q/qca-firmware/" +PKG_URL="http://linode.boundarydevices.com/repos/apt/ubuntu-relx/pool/main/q/qca-firmware/qca-firmware_${PKG_VERSION}.orig.tar.gz" +PKG_SOURCE_DIR="qca-firmware-$PKG_VERSION" +PKG_DEPENDS_TARGET="toolchain" +PKG_SECTION="firmware" +PKG_SHORTDESC="qca9377 Linux firmware" +PKG_LONGDESC="qca9377 Linux firmware" +PKG_TOOLCHAIN="manual" + +makeinstall_target() { + mkdir -p $INSTALL/$(get_full_firmware_dir) + cp -a *.bin $INSTALL/$(get_full_firmware_dir) + cp -a qca $INSTALL/$(get_full_firmware_dir) + cp -a wlan $INSTALL/$(get_full_firmware_dir) + cp LICENSE.TXT $INSTALL/$(get_full_firmware_dir)/LICENSE.qca +} diff --git a/packages/linux-firmware/qca9377-firmware-aml/system.d/qca9377-firmware-aml.service b/packages/linux-firmware/qca9377-firmware-aml/system.d/qca9377-firmware-aml.service new file mode 100644 index 0000000000..be1f8a9e57 --- /dev/null +++ b/packages/linux-firmware/qca9377-firmware-aml/system.d/qca9377-firmware-aml.service @@ -0,0 +1,8 @@ +[Unit] +Description=QCA Bluetooth firmware service +ConditionPathExists=/dev/ttyS1 + +[Service] +Type=simple +RemainAfterExit=yes +ExecStart=/usr/bin/hciattach -n -s 115200 /dev/ttyS1 qca 2000000 diff --git a/packages/linux-firmware/qca9377-firmware-aml/udev.d/80-qca9377-firmware-aml.rules b/packages/linux-firmware/qca9377-firmware-aml/udev.d/80-qca9377-firmware-aml.rules new file mode 100644 index 0000000000..d3dd577bf2 --- /dev/null +++ b/packages/linux-firmware/qca9377-firmware-aml/udev.d/80-qca9377-firmware-aml.rules @@ -0,0 +1,6 @@ +################################################################################ +# udev rules file for loading qca9377-firmware-aml +################################################################################ + +ACTION=="add", SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x0271", ATTRS{device}=="0x0701", \ + TAG+="systemd", ENV{SYSTEMD_WANTS}+="qca9377-firmware-aml.service"