mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
Merge pull request #2319 from adamg88/le90_s905.drivers
Updates for S905
This commit is contained in:
commit
8e16fdc009
51
packages/linux-drivers/amlogic/RTL8188EU-aml/package.mk
Normal file
51
packages/linux-drivers/amlogic/RTL8188EU-aml/package.mk
Normal file
@ -0,0 +1,51 @@
|
||||
################################################################################
|
||||
# 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="RTL8188EU-aml"
|
||||
PKG_VERSION="2d358c5"
|
||||
PKG_SHA256="adf31d56d3a94bca814f1bd0de24af61fae85d25a259124b5d16c1d23cc72c91"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8188eu"
|
||||
PKG_URL="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8188eu/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="android_hardware_wifi_realtek_drivers_8188eu-$PKG_VERSION*"
|
||||
PKG_DEPENDS_TARGET="toolchain linux"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="Realtek RTL8188EU Linux driver"
|
||||
PKG_LONGDESC="Realtek RTL8188EU Linux driver"
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
post_unpack() {
|
||||
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile
|
||||
sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h
|
||||
}
|
||||
|
||||
make_target() {
|
||||
LDFLAGS="" make -C $(kernel_path) M=$PKG_BUILD/rtl8xxx_EU \
|
||||
ARCH=$TARGET_KERNEL_ARCH \
|
||||
KSRC=$(kernel_path) \
|
||||
CROSS_COMPILE=$TARGET_PREFIX \
|
||||
USER_EXTRA_CFLAGS="-fgnu89-inline"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
|
||||
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
From b67364bd4236f890238fb44df1bbba228b42ffe1 Mon Sep 17 00:00:00 2001
|
||||
From: kszaq <kszaquitto@gmail.com>
|
||||
Date: Mon, 2 Oct 2017 11:13:42 +0200
|
||||
Subject: [PATCH] Add support for a few USB dongles
|
||||
|
||||
---
|
||||
rtl8xxx_EU/os_dep/linux/usb_intf.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/rtl8xxx_EU/os_dep/linux/usb_intf.c b/rtl8xxx_EU/os_dep/linux/usb_intf.c
|
||||
index 2fbffd6..4892838 100755
|
||||
--- a/rtl8xxx_EU/os_dep/linux/usb_intf.c
|
||||
+++ b/rtl8xxx_EU/os_dep/linux/usb_intf.c
|
||||
@@ -138,6 +138,12 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
|
||||
/*=== Customer ID ===*/
|
||||
/****** 8188EUS ********/
|
||||
{USB_DEVICE(0x07B8, 0x8179), .driver_info = RTL8188E}, /* Abocom - Abocom */
|
||||
+ {USB_DEVICE(0x0DF6, 0x0076), .driver_info = RTL8188E}, /* Sitecom N150 v2 */
|
||||
+ {USB_DEVICE(0x2001, 0x330F), .driver_info = RTL8188E}, /* DLink DWA-125 REV D1 */
|
||||
+ {USB_DEVICE(0x2001, 0x3310), .driver_info = RTL8188E}, /* Dlink DWA-123 REV D1 */
|
||||
+ {USB_DEVICE(0x2001, 0x3311), .driver_info = RTL8188E}, /* DLink GO-USB-N150 REV B1 */
|
||||
+ {USB_DEVICE(0x056E, 0x4008), .driver_info = RTL8188E}, /* Elecom WDC-150SU2M */
|
||||
+ {USB_DEVICE(0x2357, 0x010c), .driver_info = RTL8188E}, /* TP-Link TL-WN722N v2 */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8812A
|
||||
--
|
||||
2.7.4
|
||||
|
55
packages/linux-drivers/amlogic/RTL8189ES-aml/package.mk
Normal file
55
packages/linux-drivers/amlogic/RTL8189ES-aml/package.mk
Normal file
@ -0,0 +1,55 @@
|
||||
################################################################################
|
||||
# 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="RTL8189ES-aml"
|
||||
PKG_VERSION="a7fc8d7"
|
||||
PKG_SHA256="8eb89d6fec7cd1548a01c97d233ed124490fa67925b5bfae28e934e8b32bbdc0"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189es"
|
||||
PKG_URL="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189es/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="android_hardware_wifi_realtek_drivers_8189es-$PKG_VERSION*"
|
||||
PKG_DEPENDS_TARGET="toolchain linux"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="Realtek RTL8189ES Linux driver"
|
||||
PKG_LONGDESC="Realtek RTL8189ES Linux driver"
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
post_unpack() {
|
||||
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile
|
||||
sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h
|
||||
}
|
||||
|
||||
pre_make_target() {
|
||||
unset LDFLAGS
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make -C $(kernel_path) M=$PKG_BUILD/rtl8189ES \
|
||||
ARCH=$TARGET_KERNEL_ARCH \
|
||||
KSRC=$(kernel_path) \
|
||||
CROSS_COMPILE=$TARGET_PREFIX \
|
||||
USER_EXTRA_CFLAGS="-fgnu89-inline"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
|
||||
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
|
||||
}
|
@ -16,10 +16,10 @@
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="RTL8189FS"
|
||||
PKG_NAME="RTL8189FS-aml"
|
||||
PKG_VERSION="ab83abd"
|
||||
PKG_SHA256="fab9511aaaa95e9764c76847ec418745bbb52f0751f3e17a51f84a6e3d4533cc"
|
||||
PKG_ARCH="any"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189ftv"
|
||||
PKG_URL="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189ftv/archive/$PKG_VERSION.tar.gz"
|
||||
@ -27,8 +27,8 @@ PKG_SOURCE_DIR="android_hardware_wifi_realtek_drivers_8189ftv-$PKG_VERSION*"
|
||||
PKG_DEPENDS_TARGET="toolchain linux"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="Realtek RTL8189FS Linux 3.x driver"
|
||||
PKG_LONGDESC="Realtek RTL8189FS Linux 3.x driver"
|
||||
PKG_SHORTDESC="Realtek RTL8189FS Linux driver"
|
||||
PKG_LONGDESC="Realtek RTL8189FS Linux driver"
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
@ -43,13 +43,13 @@ pre_make_target() {
|
||||
|
||||
make_target() {
|
||||
make -C $(kernel_path) M=$PKG_BUILD/rtl8189FS \
|
||||
ARCH=$TARGET_KERNEL_ARCH \
|
||||
KSRC=$(kernel_path) \
|
||||
CROSS_COMPILE=$TARGET_PREFIX \
|
||||
USER_EXTRA_CFLAGS="-fgnu89-inline"
|
||||
ARCH=$TARGET_KERNEL_ARCH \
|
||||
KSRC=$(kernel_path) \
|
||||
CROSS_COMPILE=$TARGET_PREFIX \
|
||||
USER_EXTRA_CFLAGS="-fgnu89-inline"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
|
||||
cp $PKG_BUILD/rtl8189FS/*.ko $INSTALL/$(get_full_module_dir)/$PKG_NAME
|
||||
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
|
||||
}
|
55
packages/linux-drivers/amlogic/RTL8723BS-aml/package.mk
Normal file
55
packages/linux-drivers/amlogic/RTL8723BS-aml/package.mk
Normal file
@ -0,0 +1,55 @@
|
||||
################################################################################
|
||||
# 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-aml"
|
||||
PKG_VERSION="c3eef6c"
|
||||
PKG_SHA256="db86d7237a047cdbb64ecb6919ab18035673b179ac56b253f050bfd0efc29fbc"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723bs"
|
||||
PKG_URL="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723bs/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="android_hardware_wifi_realtek_drivers_8723bs-$PKG_VERSION*"
|
||||
PKG_DEPENDS_TARGET="toolchain linux"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="Realtek RTL8723BS Linux driver"
|
||||
PKG_LONGDESC="Realtek RTL8723BS Linux driver"
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
post_unpack() {
|
||||
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile
|
||||
sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h
|
||||
}
|
||||
|
||||
pre_make_target() {
|
||||
unset LDFLAGS
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make -C $(kernel_path) M=$PKG_BUILD/rtl8723BS \
|
||||
ARCH=$TARGET_KERNEL_ARCH \
|
||||
KSRC=$(kernel_path) \
|
||||
CROSS_COMPILE=$TARGET_PREFIX \
|
||||
USER_EXTRA_CFLAGS="-fgnu89-inline"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
|
||||
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
|
||||
}
|
55
packages/linux-drivers/amlogic/RTL8723DS-aml/package.mk
Normal file
55
packages/linux-drivers/amlogic/RTL8723DS-aml/package.mk
Normal file
@ -0,0 +1,55 @@
|
||||
################################################################################
|
||||
# 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="RTL8723DS-aml"
|
||||
PKG_VERSION="96c22b8"
|
||||
PKG_SHA256="3cb93c41c400b5d929820cbc6d89e8f254853d9b8f3a5bff972d6d6cde035c86"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723ds"
|
||||
PKG_URL="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723ds/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="android_hardware_wifi_realtek_drivers_8723ds-$PKG_VERSION*"
|
||||
PKG_DEPENDS_TARGET="toolchain linux"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="Realtek RTL8723DS Linux driver"
|
||||
PKG_LONGDESC="Realtek RTL8723DS Linux driver"
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
post_unpack() {
|
||||
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile
|
||||
sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h
|
||||
}
|
||||
|
||||
pre_make_target() {
|
||||
unset LDFLAGS
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make -C $(kernel_path) M=$PKG_BUILD/rtl8723DS \
|
||||
ARCH=$TARGET_KERNEL_ARCH \
|
||||
KSRC=$(kernel_path) \
|
||||
CROSS_COMPILE=$TARGET_PREFIX \
|
||||
USER_EXTRA_CFLAGS="-fgnu89-inline"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
|
||||
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
|
||||
}
|
55
packages/linux-drivers/amlogic/RTL8822BU-aml/package.mk
Normal file
55
packages/linux-drivers/amlogic/RTL8822BU-aml/package.mk
Normal file
@ -0,0 +1,55 @@
|
||||
################################################################################
|
||||
# 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="RTL8822BU-aml"
|
||||
PKG_VERSION="f743231"
|
||||
PKG_SHA256="fadfe4f8ae38ba14acc9e37bdf3a2e723cfa11dca7d2f6b7ca6c5f1ffa84cf2b"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8822bu"
|
||||
PKG_URL="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8822bu/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="android_hardware_wifi_realtek_drivers_8822bu-$PKG_VERSION*"
|
||||
PKG_DEPENDS_TARGET="toolchain linux"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="Realtek RTL8822BU Linux driver"
|
||||
PKG_LONGDESC="Realtek RTL8822BU Linux driver"
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
post_unpack() {
|
||||
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile
|
||||
sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h
|
||||
}
|
||||
|
||||
pre_make_target() {
|
||||
unset LDFLAGS
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make -C $(kernel_path) M=$PKG_BUILD/rtl8822BU \
|
||||
ARCH=$TARGET_KERNEL_ARCH \
|
||||
KSRC=$(kernel_path) \
|
||||
CROSS_COMPILE=$TARGET_PREFIX \
|
||||
USER_EXTRA_CFLAGS="-fgnu89-inline"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
|
||||
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
|
||||
}
|
@ -0,0 +1 @@
|
||||
options dhd firmware_path=/usr/lib/firmware/brcm/ nvram_path=/usr/lib/firmware/brcm/
|
48
packages/linux-drivers/amlogic/ap6xxx-aml/package.mk
Normal file
48
packages/linux-drivers/amlogic/ap6xxx-aml/package.mk
Normal file
@ -0,0 +1,48 @@
|
||||
################################################################################
|
||||
# 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="ap6xxx-aml"
|
||||
PKG_VERSION="99b3459"
|
||||
PKG_SHA256="5f2bfc29616d869ad5fb41e0782887d73cafe0bae8a13e7e945bb32b2a2c0877"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/khadas/android_hardware_wifi_broadcom_drivers_ap6xxx"
|
||||
PKG_URL="https://github.com/khadas/android_hardware_wifi_broadcom_drivers_ap6xxx/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="android_hardware_wifi_broadcom_drivers_ap6xxx-$PKG_VERSION*"
|
||||
PKG_DEPENDS_TARGET="toolchain linux"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="ap6xxx: Linux drivers for AP6xxx WLAN chips used in some devices based on Amlogic SoCs"
|
||||
PKG_LONGDESC="ap6xxx: Linux drivers for AP6xxx WLAN chips used in some devices based on Amlogic SoCs"
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
pre_make_target() {
|
||||
unset LDFLAGS
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make -C $(kernel_path) M=$PKG_BUILD/bcmdhd.1.363.59.144.x.cn \
|
||||
ARCH=$TARGET_KERNEL_ARCH \
|
||||
CROSS_COMPILE=$TARGET_PREFIX
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
|
||||
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
From fb537b584b78c0407c663ed4076e4ff79b36a14c Mon Sep 17 00:00:00 2001
|
||||
From: kszaq <kszaquitto@gmail.com>
|
||||
Date: Thu, 14 Sep 2017 21:20:18 +0200
|
||||
Subject: [PATCH 1/4] bcmdhd: Add new SDIO vendor/device ID for AP6212
|
||||
|
||||
---
|
||||
bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c b/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c
|
||||
index af321a6..f7d9a09 100644
|
||||
--- a/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c
|
||||
+++ b/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c
|
||||
@@ -74,6 +74,9 @@
|
||||
#if !defined(SDIO_DEVICE_ID_BROADCOM_43239)
|
||||
#define SDIO_DEVICE_ID_BROADCOM_43239 43239
|
||||
#endif /* !defined(SDIO_DEVICE_ID_BROADCOM_43239) */
|
||||
+#if !defined(SDIO_DEVICE_ID_BROADCOM_4343)
|
||||
+#define SDIO_DEVICE_ID_BROADCOM_4343 0xa9a6
|
||||
+#endif /* !defined(SDIO_DEVICE_ID_BROADCOM_4343) */
|
||||
|
||||
extern void wl_cfg80211_set_parent_dev(void *dev);
|
||||
extern void sdioh_sdmmc_devintr_off(sdioh_info_t *sd);
|
||||
@@ -217,6 +220,7 @@ static void bcmsdh_sdmmc_remove(struct sdio_func *func)
|
||||
/* devices we support, null terminated */
|
||||
static const struct sdio_device_id bcmsdh_sdmmc_ids[] = {
|
||||
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_DEFAULT) },
|
||||
+ { SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4343) },
|
||||
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4325_SDGWB) },
|
||||
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4325) },
|
||||
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4329) },
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1,53 @@
|
||||
From cd000f263d8433f2a1a29d7e722cd57e47b30fc5 Mon Sep 17 00:00:00 2001
|
||||
From: kszaq <kszaquitto@gmail.com>
|
||||
Date: Thu, 14 Sep 2017 21:20:55 +0200
|
||||
Subject: [PATCH 2/4] bcmdhd: add BCM4335 firmware loading support
|
||||
|
||||
---
|
||||
bcmdhd.1.363.59.144.x.cn/dhd_config.c | 10 ++++++++++
|
||||
bcmdhd.1.363.59.144.x.cn/dhd_config.h | 1 +
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/bcmdhd.1.363.59.144.x.cn/dhd_config.c b/bcmdhd.1.363.59.144.x.cn/dhd_config.c
|
||||
index ff07d18..b668400 100644
|
||||
--- a/bcmdhd.1.363.59.144.x.cn/dhd_config.c
|
||||
+++ b/bcmdhd.1.363.59.144.x.cn/dhd_config.c
|
||||
@@ -141,6 +141,14 @@ const static char *bcm43241b4_ag_fw_name[] = {
|
||||
"fw_bcm43241b4_ag_mfg.bin"
|
||||
};
|
||||
|
||||
+const static char *bcm4335b0_ag_fw_name[] = {
|
||||
+ "fw_bcm4335b0_ag.bin",
|
||||
+ "fw_bcm4335b0_ag_apsta.bin",
|
||||
+ "fw_bcm4335b0_ag_p2p.bin",
|
||||
+ "fw_bcm4335b0_ag_es.bin",
|
||||
+ "fw_bcm4335b0_ag_mfg.bin"
|
||||
+};
|
||||
+
|
||||
const static char *bcm4339a0_ag_fw_name[] = {
|
||||
"fw_bcm4339a0_ag.bin",
|
||||
"fw_bcm4339a0_ag_apsta.bin",
|
||||
@@ -529,6 +537,8 @@ dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path)
|
||||
case BCM4335_CHIP_ID:
|
||||
if (chiprev == BCM4335A0_CHIP_REV)
|
||||
strcpy(&fw_path[i+1], bcm4339a0_ag_fw_name[fw_type]);
|
||||
+ else if (chiprev == BCM4335B0_CHIP_REV)
|
||||
+ strcpy(&fw_path[i+1], bcm4335b0_ag_fw_name[fw_type]);
|
||||
break;
|
||||
case BCM4345_CHIP_ID:
|
||||
case BCM43454_CHIP_ID:
|
||||
diff --git a/bcmdhd.1.363.59.144.x.cn/dhd_config.h b/bcmdhd.1.363.59.144.x.cn/dhd_config.h
|
||||
index cc76e8b..450df56 100644
|
||||
--- a/bcmdhd.1.363.59.144.x.cn/dhd_config.h
|
||||
+++ b/bcmdhd.1.363.59.144.x.cn/dhd_config.h
|
||||
@@ -28,6 +28,7 @@ extern uint dhd_slpauto;
|
||||
#define BCM43341B0_CHIP_REV 2
|
||||
#define BCM43241B4_CHIP_REV 5
|
||||
#define BCM4335A0_CHIP_REV 2
|
||||
+#define BCM4335B0_CHIP_REV 1
|
||||
#define BCM4339A0_CHIP_REV 1
|
||||
#define BCM43455C0_CHIP_REV 6
|
||||
#define BCM4354A1_CHIP_REV 1
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 24affe6bf59dfd6fd9b62b3118e4b2b9e555181a Mon Sep 17 00:00:00 2001
|
||||
From: kszaq <kszaquitto@gmail.com>
|
||||
Date: Thu, 14 Sep 2017 21:21:18 +0200
|
||||
Subject: [PATCH 3/4] bcmdhd: match only Broadcom SDIO devices
|
||||
|
||||
---
|
||||
bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c b/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c
|
||||
index f7d9a09..47ca535 100644
|
||||
--- a/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c
|
||||
+++ b/bcmdhd.1.363.59.144.x.cn/bcmsdh_sdmmc_linux.c
|
||||
@@ -229,7 +229,7 @@ static const struct sdio_device_id bcmsdh_sdmmc_ids[] = {
|
||||
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4334) },
|
||||
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4324) },
|
||||
{ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_43239) },
|
||||
- { SDIO_DEVICE_CLASS(SDIO_CLASS_NONE) },
|
||||
+ { SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_ANY_ID) },
|
||||
{ /* end: all zeroes */ },
|
||||
};
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1,37 @@
|
||||
From b9edf37b14f64a8bed5586898e3503322a5b8bfc Mon Sep 17 00:00:00 2001
|
||||
From: kszaq <kszaquitto@gmail.com>
|
||||
Date: Thu, 5 Oct 2017 22:04:11 +0200
|
||||
Subject: [PATCH 4/4] bcmdhd: if driver is not yet initialized, wait and retry
|
||||
|
||||
---
|
||||
bcmdhd.1.363.59.144.x.cn/dhd_linux.c | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/bcmdhd.1.363.59.144.x.cn/dhd_linux.c b/bcmdhd.1.363.59.144.x.cn/dhd_linux.c
|
||||
index c64f851..1754fb7 100644
|
||||
--- a/bcmdhd.1.363.59.144.x.cn/dhd_linux.c
|
||||
+++ b/bcmdhd.1.363.59.144.x.cn/dhd_linux.c
|
||||
@@ -6127,9 +6127,17 @@ dhd_open(struct net_device *net)
|
||||
int ifidx;
|
||||
int32 ret = 0;
|
||||
|
||||
- if (!dhd_download_fw_on_driverload && !dhd_driver_init_done) {
|
||||
- DHD_ERROR(("%s: WLAN driver is not initialized\n", __FUNCTION__));
|
||||
- return -1;
|
||||
+ for (int retry = 0; ++retry; ) {
|
||||
+ if (!dhd_download_fw_on_driverload && !dhd_driver_init_done) {
|
||||
+ DHD_ERROR(("%s: WLAN driver is not initialized\n", __FUNCTION__));
|
||||
+ if (retry > 1) {
|
||||
+ return -1;
|
||||
+ } else {
|
||||
+ OSL_SLEEP(1000);
|
||||
+ }
|
||||
+ } else {
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
printf("%s: Enter %p\n", __FUNCTION__, net);
|
||||
--
|
||||
2.7.4
|
||||
|
51
packages/linux-drivers/amlogic/mt7601u-aml/package.mk
Normal file
51
packages/linux-drivers/amlogic/mt7601u-aml/package.mk
Normal file
@ -0,0 +1,51 @@
|
||||
################################################################################
|
||||
# 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="mt7601u-aml"
|
||||
PKG_VERSION="4e61a61"
|
||||
PKG_SHA256="814a63d8654f87a76cc06425ad2120daa32646f5220341a26296e4a6643b013a"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7601"
|
||||
PKG_URL="https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7601/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="android_hardware_wifi_mtk_drivers_mt7601-$PKG_VERSION*"
|
||||
PKG_DEPENDS_TARGET="toolchain linux"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="mt7601u Linux driver"
|
||||
PKG_LONGDESC="mt7601u Linux driver"
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
pre_make_target() {
|
||||
unset LDFLAGS
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make -C $(kernel_path) M=$PKG_BUILD \
|
||||
ARCH=$TARGET_KERNEL_ARCH \
|
||||
CROSS_COMPILE=$TARGET_PREFIX
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
|
||||
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
|
||||
|
||||
mkdir -p $INSTALL/$(get_full_firmware_dir)
|
||||
cp $PKG_BUILD/RT2870STA_7601.dat $INSTALL/$(get_full_firmware_dir)
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
diff --git a/include/os/rt_linux.h b/include/os/rt_linux.h
|
||||
index 0303698..36dd603 100755
|
||||
--- a/include/os/rt_linux.h
|
||||
+++ b/include/os/rt_linux.h
|
||||
@@ -159,7 +159,7 @@ typedef struct usb_ctrlrequest devctrlrequest;
|
||||
#ifdef ALLWINNER
|
||||
#define STA_PROFILE_PATH "/system/vendor/modules/RT2870STA_7601.dat"
|
||||
#else
|
||||
-#define STA_PROFILE_PATH "/system/etc/wifi/RT2870STA_7601.dat"
|
||||
+#define STA_PROFILE_PATH "/lib/firmware/RT2870STA_7601.dat"
|
||||
#endif
|
||||
#define STA_DRIVER_VERSION "JEDI.L0.MP1.mt7601u.v1.2"
|
||||
#define DRIVER_ROLE "STA"
|
53
packages/linux-drivers/amlogic/mt7603u-aml/package.mk
Normal file
53
packages/linux-drivers/amlogic/mt7603u-aml/package.mk
Normal file
@ -0,0 +1,53 @@
|
||||
################################################################################
|
||||
# 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="mt7603u-aml"
|
||||
PKG_VERSION="0c53dfb"
|
||||
PKG_SHA256="9e3eab02f3c3dd7de373c5d631c2069771e6ad783ecda36a484030ab4ec0ccec"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7603"
|
||||
PKG_URL="https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7603/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="android_hardware_wifi_mtk_drivers_mt7603-$PKG_VERSION*"
|
||||
PKG_DEPENDS_TARGET="toolchain linux"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="mt7603u Linux driver"
|
||||
PKG_LONGDESC="mt7603u Linux driver"
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
pre_make_target() {
|
||||
unset LDFLAGS
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make LINUX_SRC=$(kernel_path) \
|
||||
ARCH=$TARGET_KERNEL_ARCH \
|
||||
CROSS_COMPILE=$TARGET_PREFIX \
|
||||
RT28xx_DIR=$PKG_BUILD \
|
||||
-f $PKG_BUILD/Makefile
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
|
||||
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
|
||||
|
||||
mkdir -p $INSTALL/$(get_full_firmware_dir)
|
||||
cp $PKG_BUILD/conf/MT7603USTA.dat $INSTALL/$(get_full_firmware_dir)
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
diff --git a/include/os/rt_linux.h b/include/os/rt_linux.h
|
||||
index 9ddc4ea..258907a 100755
|
||||
--- a/include/os/rt_linux.h
|
||||
+++ b/include/os/rt_linux.h
|
||||
@@ -201,7 +201,7 @@ typedef struct usb_ctrlrequest devctrlrequest;
|
||||
|
||||
#ifdef CONFIG_STA_SUPPORT
|
||||
#ifdef RTMP_MAC_PCI
|
||||
-#define STA_PROFILE_PATH "/system/etc/wifi/RT2870STA_7603.dat"
|
||||
+#define STA_PROFILE_PATH "/lib/firmware/RT2870STA_7603.dat"
|
||||
#define STA_DRIVER_VERSION "3.0.0.0"
|
||||
#ifdef MULTIPLE_CARD_SUPPORT
|
||||
#define CARD_INFO_PATH "/etc/Wireless/RT2860STA/RT2860STACard.dat"
|
||||
@@ -210,12 +210,12 @@ typedef struct usb_ctrlrequest devctrlrequest;
|
||||
|
||||
#ifdef RTMP_MAC_USB
|
||||
#ifdef HE_BD_CFG80211_SUPPORT
|
||||
-#define STA_PROFILE_PATH "/system/etc/wifi/RT2870STA_7603.dat"
|
||||
+#define STA_PROFILE_PATH "/lib/firmware/RT2870STA_7603.dat"
|
||||
#else
|
||||
#ifdef USE_CHIP_DEPENDENT_PROFILE_NAME
|
||||
-#define STA_PROFILE_PATH "/system/etc/wifi/RT2870STA_7603.dat"
|
||||
+#define STA_PROFILE_PATH "/lib/firmware/RT2870STA_7603.dat"
|
||||
#else
|
||||
-#define STA_PROFILE_PATH "/system/etc/wifi/RT2870STA_7603.dat"
|
||||
+#define STA_PROFILE_PATH "/lib/firmware/RT2870STA_7603.dat"
|
||||
#endif /* USE_CHIP_DEPENDENT_PROFILE_NAME */
|
||||
#endif /* HE_BD_CFG80211_SUPPORT */
|
||||
#define STA_DRIVER_VERSION "JEDI.L0.MP1.mt7603u.v1.8"
|
||||
@@ -227,7 +227,7 @@ typedef struct usb_ctrlrequest devctrlrequest;
|
||||
|
||||
|
||||
#ifdef RTMP_MAC_SDIO
|
||||
-#define STA_PROFILE_PATH "/system/etc/wifi/RT2870STA_7603.dat"
|
||||
+#define STA_PROFILE_PATH "/lib/firmware/RT2870STA_7603.dat"
|
||||
#define STA_DRIVER_VERSION "3.0.0.0"
|
||||
#ifdef MULTIPLE_CARD_SUPPORT
|
||||
#define CARD_INFO_PATH "/etc/Wireless/RT2870STA/RT2870STACard.dat"
|
@ -0,0 +1,13 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 65d0a5c..7fc16f4 100755
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -234,7 +234,7 @@ endif
|
||||
ifeq ($(PREALLOC), YES)
|
||||
#build prealloc.ko
|
||||
cp -f $(RT28xx_DIR)/os/linux/Makefile.6.prealloc $(RT28xx_DIR)/os/linux/Makefile
|
||||
- $(MAKE) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
|
||||
+ $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
|
||||
endif
|
||||
cp -f $(RT28xx_DIR)/os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
|
||||
ifeq ($(PLATFORM),DM6446)
|
55
packages/linux-drivers/amlogic/qca9377-aml/package.mk
Normal file
55
packages/linux-drivers/amlogic/qca9377-aml/package.mk
Normal file
@ -0,0 +1,55 @@
|
||||
################################################################################
|
||||
# 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="qca9377-aml"
|
||||
PKG_VERSION="0cc65f9"
|
||||
PKG_SHA256="336f6e95fc16874a81daf5289c656688a90c5df566ffeaea708f7ac2f5198b9e"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://boundarydevices.com/new-silex-wifi-802-11ac-bt4-1-module/"
|
||||
PKG_URL="https://github.com/boundarydevices/qcacld-2.0/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="qcacld-2.0-$PKG_VERSION*"
|
||||
PKG_DEPENDS_TARGET="toolchain linux"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="qca9377 Linux driver"
|
||||
PKG_LONGDESC="qca9377 Linux Driver"
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
post_unpack() {
|
||||
sed -i 's,-Wall,,g; s,-Werror,,g' $PKG_BUILD/Kbuild
|
||||
sed -i 's,CDEFINES :=,CDEFINES := -Wno-misleading-indentation -Wno-unused-variable -Wno-unused-function,g' $PKG_BUILD/Kbuild
|
||||
}
|
||||
|
||||
pre_make_target() {
|
||||
unset LDFLAGS
|
||||
unset CFLAGS
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make KERNEL_SRC="$(kernel_path)" \
|
||||
ARCH=$TARGET_KERNEL_ARCH \
|
||||
CROSS_COMPILE=$TARGET_PREFIX \
|
||||
CONFIG_CLD_HL_SDIO_CORE=y
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
|
||||
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
|
||||
}
|
@ -0,0 +1,538 @@
|
||||
From 7d4ee23fb20cc5e17d8d79db20a0d6704ac3df6c Mon Sep 17 00:00:00 2001
|
||||
From: kszaq <kszaquitto@gmail.com>
|
||||
Date: Tue, 10 Jan 2017 22:43:12 +0100
|
||||
Subject: [PATCH] Modify SDIO and firmware handling to support chips used in
|
||||
Amlogic devices
|
||||
|
||||
---
|
||||
CORE/HDD/src/wlan_hdd_cfg.c | 10 +-
|
||||
CORE/HDD/src/wlan_hdd_main.c | 180 ++++++++++++++++++++-
|
||||
CORE/SERVICES/BMI/ol_fw.c | 8 +-
|
||||
CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c | 6 -
|
||||
.../sdio/linux/native_sdio/include/hif_internal.h | 2 +-
|
||||
CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c | 62 +++----
|
||||
6 files changed, 209 insertions(+), 59 deletions(-)
|
||||
|
||||
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
|
||||
index af7f399..5eedfcb 100644
|
||||
--- a/CORE/HDD/src/wlan_hdd_cfg.c
|
||||
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
|
||||
@@ -60,6 +60,8 @@
|
||||
#include <pmcApi.h>
|
||||
#include <wlan_hdd_misc.h>
|
||||
|
||||
+extern int qca_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device);
|
||||
+
|
||||
static char *mac_param;
|
||||
module_param_named(mac, mac_param, charp, S_IRUGO);
|
||||
MODULE_PARM_DESC(mac, "mac address override");
|
||||
@@ -4411,11 +4413,11 @@ VOS_STATUS hdd_parse_config_ini(hdd_context_t* pHddCtx)
|
||||
|
||||
memset(cfgIniTable, 0, sizeof(cfgIniTable));
|
||||
|
||||
- status = request_firmware(&fw, WLAN_INI_FILE, pHddCtx->parent_dev);
|
||||
+ status = qca_request_firmware(&fw, WLAN_INI_FILE, pHddCtx->parent_dev);
|
||||
|
||||
if(status)
|
||||
{
|
||||
- hddLog(VOS_TRACE_LEVEL_FATAL, "%s: request_firmware failed %d",__func__, status);
|
||||
+ hddLog(VOS_TRACE_LEVEL_FATAL, "%s: qca_request_firmware failed %d",__func__, status);
|
||||
vos_status = VOS_STATUS_E_FAILURE;
|
||||
goto config_exit;
|
||||
}
|
||||
@@ -5104,11 +5106,11 @@ VOS_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)
|
||||
}
|
||||
|
||||
memset(macTable, 0, sizeof(macTable));
|
||||
- status = request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);
|
||||
+ status = qca_request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);
|
||||
|
||||
if (status)
|
||||
{
|
||||
- hddLog(VOS_TRACE_LEVEL_WARN, "%s: request_firmware failed %d",
|
||||
+ hddLog(VOS_TRACE_LEVEL_WARN, "%s: qca_request_firmware failed %d",
|
||||
__func__, status);
|
||||
vos_status = VOS_STATUS_E_FAILURE;
|
||||
return vos_status;
|
||||
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
|
||||
index 1919627..3bcc6b0 100644
|
||||
--- a/CORE/HDD/src/wlan_hdd_main.c
|
||||
+++ b/CORE/HDD/src/wlan_hdd_main.c
|
||||
@@ -239,6 +239,163 @@ static VOS_STATUS hdd_parse_ese_beacon_req(tANI_U8 *pValue,
|
||||
/*
|
||||
* Android DRIVER command structures
|
||||
*/
|
||||
+//tkun add
|
||||
+ typedef char A_CHAR;
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
|
||||
+ #define GET_INODE_FROM_FILEP(filp) \
|
||||
+ (filp)->f_path.dentry->d_inode
|
||||
+ #else
|
||||
+ #define GET_INODE_FROM_FILEP(filp) \
|
||||
+ (filp)->f_dentry->d_inode
|
||||
+ #endif
|
||||
+// #define A_MALLOC(size) kmalloc((size), GFP_KERNEL)
|
||||
+ #define A_MALLOC_NOWAIT(size) kmalloc((size), GFP_ATOMIC)
|
||||
+// #define A_FREE(addr) kfree(addr);addr=NULL;
|
||||
+//#define A_MEMCPY(dst, src, len) memcpy((dst), (src), (len))
|
||||
+// #define A_MEMZERO(addr, len) memset((addr), 0, (len))
|
||||
+ #define A_MEMCMP(addr1, addr2, len) memcmp((addr1), (addr2), (len))
|
||||
+ #define A_ROUND_UP(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
|
||||
+
|
||||
+ char qcafwpath[256] = "/lib/firmware";
|
||||
+
|
||||
+ int android_readwrite_file(const A_CHAR *filename, A_CHAR *rbuf, const A_CHAR *wbuf, size_t length)
|
||||
+ {
|
||||
+ int ret = 0;
|
||||
+ struct file *filp = (struct file *)-ENOENT;
|
||||
+ mm_segment_t oldfs;
|
||||
+ oldfs = get_fs();
|
||||
+ set_fs(KERNEL_DS);
|
||||
+
|
||||
+ // printk("%s: filename %s \n",__func__,filename);
|
||||
+ do {
|
||||
+ int mode = (wbuf) ? O_RDWR : O_RDONLY;
|
||||
+ filp = filp_open(filename, mode, S_IRUSR);
|
||||
+ if (IS_ERR(filp) || !filp->f_op) {
|
||||
+ printk("%s: file %s filp_open error\n", __FUNCTION__, filename);
|
||||
+ ret = -ENOENT;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (length==0) {
|
||||
+ /* Read the length of the file only */
|
||||
+ struct inode *inode;
|
||||
+
|
||||
+ inode = GET_INODE_FROM_FILEP(filp);
|
||||
+ if (!inode) {
|
||||
+ // printk("%s: Get inode from %s failed\n", __FUNCTION__, filen ame);
|
||||
+ ret = -ENOENT;
|
||||
+ break;
|
||||
+ }
|
||||
+ ret = i_size_read(inode->i_mapping->host);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (wbuf) {
|
||||
+ if ( (ret=filp->f_op->write(filp, wbuf, length, &filp->f_pos)) < 0) {
|
||||
+// printk("%s: Write %u bytes to file %s error %d\n", __FUNCTION__,
|
||||
+ // length, filename, ret);
|
||||
+ break;
|
||||
+ }
|
||||
+ } else {
|
||||
+ if ( (ret=filp->f_op->read(filp, rbuf, length, &filp->f_pos)) < 0) {
|
||||
+// printk ("%s: Read %u bytes from file %s error %d\n", __FUNCTION__,
|
||||
+ // length, filename, ret);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ } while (0);
|
||||
+
|
||||
+ if (!IS_ERR(filp)) {
|
||||
+ filp_close(filp, NULL);
|
||||
+ }
|
||||
+ set_fs(oldfs);
|
||||
+
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ int android_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device)
|
||||
+ {
|
||||
+ int ret = 0;
|
||||
+ struct firmware *firmware;
|
||||
+ char filename[256];
|
||||
+ const char *raw_filename = name;
|
||||
+ *firmware_p = firmware = A_MALLOC(sizeof(*firmware));
|
||||
+ if (!firmware)
|
||||
+ return -ENOMEM;
|
||||
+ A_MEMZERO(firmware, sizeof(*firmware));
|
||||
+ do {
|
||||
+ size_t length, bufsize, bmisize;
|
||||
+
|
||||
+ if (snprintf(filename, sizeof(filename), "%s/%s", qcafwpath,
|
||||
+ raw_filename) >= sizeof(filename)) {
|
||||
+ printk("snprintf: %s/%s\n", qcafwpath, raw_filename);
|
||||
+ ret = -1;
|
||||
+ break;
|
||||
+ }
|
||||
+ if ( (ret=android_readwrite_file(filename, NULL, NULL, 0)) < 0) {
|
||||
+ break;
|
||||
+ } else {
|
||||
+ length = ret;
|
||||
+ }
|
||||
+
|
||||
+ if (strcmp(raw_filename, "softmac") == 0) {
|
||||
+ bufsize = length = 17;
|
||||
+ } else {
|
||||
+ bufsize = ALIGN(length, PAGE_SIZE);
|
||||
+ bmisize = A_ROUND_UP(length, 4);
|
||||
+ bufsize = max(bmisize, bufsize);
|
||||
+ }
|
||||
+ firmware->data = vmalloc(bufsize);
|
||||
+ firmware->size = length;
|
||||
+
|
||||
+ // printk("AR6K: %s(): raw_filename=%s, bufsize=%d\n", __FUNCTION__, ra w_filename, bufsize);
|
||||
+
|
||||
+ if (!firmware->data) {
|
||||
+ printk("%s: Cannot allocate buffer for firmware\n", __FUNCTION__);
|
||||
+ ret = -ENOMEM;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if ( (ret=android_readwrite_file(filename, (char*)firmware->data, NULL, length)) != length) {
|
||||
+// printk("%s: file read error, ret %d request %d\n", __FUNCTION__,ret,length);
|
||||
+// ret = -1;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ } while (0);
|
||||
+
|
||||
+ if (ret<0) {
|
||||
+ if (firmware) {
|
||||
+ if (firmware->data)
|
||||
+ vfree(firmware->data);
|
||||
+ A_FREE(firmware);
|
||||
+ }
|
||||
+ *firmware_p = NULL;
|
||||
+ } else {
|
||||
+ ret = 0;
|
||||
+ }
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ void android_release_firmware(const struct firmware *firmware)
|
||||
+ {
|
||||
+ if (firmware) {
|
||||
+ if (firmware->data)
|
||||
+ vfree(firmware->data);
|
||||
+ kfree(firmware);
|
||||
+ }
|
||||
+ }
|
||||
+extern int qca_request_firmware(const struct firmware **firmware_p,const char *name,struct device *device)
|
||||
+ {
|
||||
+ // int uevent = 1;
|
||||
+
|
||||
+ //return _request_firmware(firmware_p, name, device, uevent, false);
|
||||
+
|
||||
+ return android_request_firmware(firmware_p, name,device);
|
||||
+
|
||||
+
|
||||
+ }
|
||||
struct android_wifi_reassoc_params {
|
||||
unsigned char bssid[18];
|
||||
int channel;
|
||||
@@ -7778,7 +7935,7 @@ VOS_STATUS hdd_get_cfg_file_size(v_VOID_t *pCtx, char *pFileName, v_SIZE_t *pBuf
|
||||
|
||||
ENTER();
|
||||
|
||||
- status = request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);
|
||||
+ status = qca_request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);
|
||||
|
||||
if(status || !pHddCtx->fw || !pHddCtx->fw->data) {
|
||||
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: CFG download failed",__func__);
|
||||
@@ -7819,7 +7976,7 @@ VOS_STATUS hdd_read_cfg_file(v_VOID_t *pCtx, char *pFileName,
|
||||
|
||||
ENTER();
|
||||
|
||||
- status = request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);
|
||||
+ status = qca_request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);
|
||||
|
||||
if(status || !pHddCtx->fw || !pHddCtx->fw->data) {
|
||||
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: CFG download failed",__func__);
|
||||
@@ -12860,15 +13017,34 @@ static int hdd_driver_init( void)
|
||||
\return - 0 for success, non zero for failure
|
||||
|
||||
--------------------------------------------------------------------------*/
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
|
||||
+extern int wifi_setup_dt(void);
|
||||
+extern void wifi_teardown_dt(void);
|
||||
+#endif
|
||||
+extern void extern_wifi_set_enable(int is_on);
|
||||
+extern void sdio_reinit(void);
|
||||
+
|
||||
#ifdef MODULE
|
||||
static int __init hdd_module_init ( void)
|
||||
{
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
|
||||
+ wifi_setup_dt();
|
||||
+#endif
|
||||
+ extern_wifi_set_enable(0);
|
||||
+ mdelay(200);
|
||||
+ extern_wifi_set_enable(1);
|
||||
+ mdelay(200);
|
||||
+sdio_reinit();
|
||||
+
|
||||
return hdd_driver_init();
|
||||
}
|
||||
#else /* #ifdef MODULE */
|
||||
static int __init hdd_module_init ( void)
|
||||
{
|
||||
/* Driver initialization is delayed to fwpath_changed_handler */
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
|
||||
+wifi_teardown_dt();
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
#endif /* #ifdef MODULE */
|
||||
diff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c
|
||||
index 66d741e..6e0e8d8 100644
|
||||
--- a/CORE/SERVICES/BMI/ol_fw.c
|
||||
+++ b/CORE/SERVICES/BMI/ol_fw.c
|
||||
@@ -118,7 +118,7 @@ static int ol_get_fw_files_for_target(struct ol_fw_files *pfw_files,
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
-
|
||||
+extern int qca_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device);
|
||||
#ifdef HIF_USB
|
||||
static A_STATUS ol_usb_extra_initialization(struct ol_softc *scn);
|
||||
#endif
|
||||
@@ -164,7 +164,7 @@ static int ol_transfer_single_bin_file(struct ol_softc *scn,
|
||||
__func__));
|
||||
}
|
||||
|
||||
- if (request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)
|
||||
+ if (qca_request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
|
||||
("%s: Failed to get %s\n",
|
||||
@@ -492,7 +492,7 @@ static int ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,
|
||||
break;
|
||||
}
|
||||
|
||||
- if (request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)
|
||||
+ if (qca_request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)
|
||||
{
|
||||
printk("%s: Failed to get %s\n", __func__, filename);
|
||||
|
||||
@@ -506,7 +506,7 @@ static int ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,
|
||||
filename = scn->fw_files.board_data;
|
||||
printk("%s: Trying to load default %s\n",
|
||||
__func__, filename);
|
||||
- if (request_firmware(&fw_entry, filename,
|
||||
+ if (qca_request_firmware(&fw_entry, filename,
|
||||
scn->sc_osdev->device) != 0) {
|
||||
printk("%s: Failed to get %s\n",
|
||||
__func__, filename);
|
||||
diff --git a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c
|
||||
index c99020e..6bafed8 100644
|
||||
--- a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c
|
||||
+++ b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c
|
||||
@@ -234,12 +234,6 @@ ath_hif_sdio_remove(void *context, void *hif_handle)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
- if (!sc) {
|
||||
- VOS_TRACE(VOS_MODULE_ID_HIF, VOS_TRACE_LEVEL_ERROR,
|
||||
- "Global SDIO context is NULL");
|
||||
- return A_ERROR;
|
||||
- }
|
||||
-
|
||||
athdiag_procfs_remove();
|
||||
|
||||
#ifndef TARGET_DUMP_FOR_NON_QC_PLATFORM
|
||||
diff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h b/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h
|
||||
index 382e38c..234bc09 100644
|
||||
--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h
|
||||
+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h
|
||||
@@ -112,7 +112,7 @@ struct hif_device {
|
||||
A_BOOL swap_mailbox;
|
||||
};
|
||||
|
||||
-#define HIF_DMA_BUFFER_SIZE (4 * 1024)
|
||||
+#define HIF_DMA_BUFFER_SIZE (56 * 1024)
|
||||
#define CMD53_FIXED_ADDRESS 1
|
||||
#define CMD53_INCR_ADDRESS 2
|
||||
|
||||
diff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
|
||||
index d45ebd9..9fb1057 100644
|
||||
--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
|
||||
+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
|
||||
@@ -64,7 +64,8 @@
|
||||
((request->request & HIF_WRITE)&& \
|
||||
(request->address >= 0x1000 && request->address < 0x1FFFF))
|
||||
#endif
|
||||
-unsigned int mmcbusmode = 0;
|
||||
+//unsigned int mmcbusmode = 0;
|
||||
+unsigned int mmcbusmode = 5;
|
||||
module_param(mmcbusmode, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
MODULE_PARM_DESC(mmcbusmode, "Set MMC driver Bus Mode: 1-SDR12, 2-SDR25, 3-SDR50, 4-DDR50, 5-SDR104");
|
||||
EXPORT_SYMBOL(mmcbusmode);
|
||||
@@ -74,7 +75,9 @@ module_param(mmcbuswidth, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
MODULE_PARM_DESC(mmcbuswidth, "Set MMC driver Bus Width: 1-1Bit, 4-4Bit, 8-8Bit");
|
||||
EXPORT_SYMBOL(mmcbuswidth);
|
||||
|
||||
-unsigned int mmcclock = 0;
|
||||
+//unsigned int mmcclock = 0;
|
||||
+//unsigned int mmcclock = 166666666;
|
||||
+unsigned int mmcclock = 200000000;
|
||||
module_param(mmcclock, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
MODULE_PARM_DESC(mmcclock, "Set MMC driver Clock value");
|
||||
EXPORT_SYMBOL(mmcclock);
|
||||
@@ -95,7 +98,7 @@ unsigned int asyncintdelay = 2;
|
||||
module_param(asyncintdelay, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
MODULE_PARM_DESC(asyncintdelay, "Delay clock count for aysnc interrupt, 2 is default, vaild values are 1 and 2");
|
||||
#else
|
||||
-unsigned int asyncintdelay = 0;
|
||||
+unsigned int asyncintdelay = 2;
|
||||
module_param(asyncintdelay, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
MODULE_PARM_DESC(asyncintdelay, "Delay clock count for aysnc interrupt, 0 is default, vaild values are 1 and 2");
|
||||
#endif
|
||||
@@ -412,12 +415,6 @@ __HIFReadWrite(HIF_DEVICE *device,
|
||||
tbuffer = device->dma_buffer;
|
||||
/* copy the write data to the dma buffer */
|
||||
AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);
|
||||
- if (length > HIF_DMA_BUFFER_SIZE) {
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,
|
||||
- ("AR6000: Invalid write length: %d\n", length));
|
||||
- status = A_EINVAL;
|
||||
- break;
|
||||
- }
|
||||
memcpy(tbuffer, buffer, length);
|
||||
bounced = TRUE;
|
||||
} else {
|
||||
@@ -440,12 +437,6 @@ __HIFReadWrite(HIF_DEVICE *device,
|
||||
if (BUFFER_NEEDS_BOUNCE(buffer)) {
|
||||
AR_DEBUG_ASSERT(device->dma_buffer != NULL);
|
||||
AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);
|
||||
- if (length > HIF_DMA_BUFFER_SIZE) {
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,
|
||||
- ("AR6000: Invalid read length: %d\n", length));
|
||||
- status = A_EINVAL;
|
||||
- break;
|
||||
- }
|
||||
tbuffer = device->dma_buffer;
|
||||
bounced = TRUE;
|
||||
} else {
|
||||
@@ -695,7 +686,7 @@ static int async_task(void *param)
|
||||
complete_and_exit(&device->async_completion, 0);
|
||||
return 0;
|
||||
}
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))
|
||||
+#if 1
|
||||
static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg, A_UINT32 flags, A_UINT32 *resp)
|
||||
{
|
||||
struct mmc_command cmd;
|
||||
@@ -719,6 +710,7 @@ static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg,
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
+//extern int sdio_reset_comm(struct mmc_card *card);
|
||||
A_STATUS ReinitSDIO(HIF_DEVICE *device)
|
||||
{
|
||||
A_INT32 err = 0;
|
||||
@@ -733,10 +725,12 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
|
||||
host = card->host;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +ReinitSDIO \n"));
|
||||
+
|
||||
+// err = sdio_reset_comm(card);
|
||||
+#if 1
|
||||
sdio_claim_host(func);
|
||||
|
||||
do {
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))
|
||||
/* 2.6.32 kernel does part of the SDIO initalization upon resume */
|
||||
A_BOOL lt_2_6_32 = (LINUX_VERSION_CODE<KERNEL_VERSION(2,6,32));
|
||||
if (lt_2_6_32) {
|
||||
@@ -783,19 +777,10 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
|
||||
break;
|
||||
}
|
||||
|
||||
- if (!host->ocr) {
|
||||
- /* Issue CMD5, arg = 0 */
|
||||
- err = IssueSDCommand(device, SD_IO_SEND_OP_COND, 0, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);
|
||||
- if (err) {
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("ReinitSDIO: CMD5 failed : %d \n",err));
|
||||
- break;
|
||||
- }
|
||||
- host->ocr = resp;
|
||||
- }
|
||||
|
||||
/* Issue CMD5, arg = ocr. Wait till card is ready */
|
||||
for (i=0;i<100;i++) {
|
||||
- err = IssueSDCommand(device, SD_IO_SEND_OP_COND, host->ocr, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);
|
||||
+ err = IssueSDCommand(device, SD_IO_SEND_OP_COND, 0, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);
|
||||
if (err) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("ReinitSDIO: CMD5 failed : %d \n",err));
|
||||
break;
|
||||
@@ -828,7 +813,7 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
|
||||
break;
|
||||
}
|
||||
}
|
||||
-#endif
|
||||
+
|
||||
/* Enable high speed */
|
||||
if (card->host->caps & MMC_CAP_SD_HIGHSPEED) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("ReinitSDIO: Set high speed mode\n"));
|
||||
@@ -891,7 +876,7 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
|
||||
|
||||
sdio_release_host(func);
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -ReinitSDIO \n"));
|
||||
-
|
||||
+#endif
|
||||
return (err) ? A_ERROR : A_OK;
|
||||
}
|
||||
|
||||
@@ -1320,6 +1305,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id
|
||||
/*
|
||||
TODO: MMC SDIO3.0 Setting should also be modified in ReInit() function when Power Manage work.
|
||||
*/
|
||||
+#if 1
|
||||
{
|
||||
A_UINT32 clock, clock_set = 12500000;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
|
||||
@@ -1578,7 +1564,7 @@ TODO: MMC SDIO3.0 Setting should also be modified in ReInit() function when Powe
|
||||
|
||||
sdio_release_host(func);
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
spin_lock_init(&device->lock);
|
||||
|
||||
spin_lock_init(&device->asynclock);
|
||||
@@ -2070,12 +2056,10 @@ static int hifDeviceSuspend(struct device *dev)
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
- if (wma_suspend_target(temp_module, 0)) {
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("PDEV Suspend Failed\n"));
|
||||
- return -1;
|
||||
- }
|
||||
+ if (wma_suspend_target(temp_module, 0)) {
|
||||
+ printk(KERN_ERR "wma_suspend_target failed.\n");
|
||||
+ }
|
||||
}
|
||||
-
|
||||
if (pm_flag & MMC_PM_WAKE_SDIO_IRQ){
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("hifDeviceSuspend: wow enter\n"));
|
||||
config = HIF_DEVICE_POWER_DOWN;
|
||||
@@ -2295,9 +2279,7 @@ static HIF_DEVICE *
|
||||
addHifDevice(struct sdio_func *func)
|
||||
{
|
||||
HIF_DEVICE *hifdevice = NULL;
|
||||
-#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) && !defined(WITH_BACKPORTS)
|
||||
int ret = 0;
|
||||
-#endif
|
||||
ENTER();
|
||||
AR_DEBUG_ASSERT(func != NULL);
|
||||
hifdevice = (HIF_DEVICE *)A_MALLOC(sizeof(HIF_DEVICE));
|
||||
@@ -2310,13 +2292,9 @@ addHifDevice(struct sdio_func *func)
|
||||
hifdevice->func = func;
|
||||
hifdevice->powerConfig = HIF_DEVICE_POWER_UP;
|
||||
hifdevice->DeviceState = HIF_DEVICE_STATE_ON;
|
||||
-#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) && !defined(WITH_BACKPORTS)
|
||||
ret = sdio_set_drvdata(func, hifdevice);
|
||||
+
|
||||
EXIT("status %d", ret);
|
||||
-#else
|
||||
- sdio_set_drvdata(func, hifdevice);
|
||||
- EXIT();
|
||||
-#endif
|
||||
return hifdevice;
|
||||
}
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1 @@
|
||||
ACTION=="add|change", SUBSYSTEM=="net", ENV{INTERFACE}=="wlan*", ATTRS{vendor}=="0x0271", RUN+="/usr/bin/systemctl restart connman.service"
|
64
packages/linux-drivers/amlogic/ssv6xxx-aml/package.mk
Normal file
64
packages/linux-drivers/amlogic/ssv6xxx-aml/package.mk
Normal file
@ -0,0 +1,64 @@
|
||||
################################################################################
|
||||
# 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="ssv6xxx-aml"
|
||||
PKG_VERSION="1041e7d"
|
||||
PKG_SHA256="1d96db8eec06c8a2c43f2c8024cc573e2bbce08fb0504fd9b6671224335e7d5f"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://libreelec.tv"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS_TARGET="toolchain linux"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="ssv6xxx Linux driver"
|
||||
PKG_LONGDESC="ssv6xxx Linux driver"
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
pre_configure_target() {
|
||||
sed -i 's,hw_cap_p2p = on,hw_cap_p2p = off,g' firmware/ssv6051-wifi.cfg
|
||||
}
|
||||
|
||||
pre_make_target() {
|
||||
unset LDFLAGS
|
||||
}
|
||||
|
||||
make_target() {
|
||||
if [ "$TARGET_KERNEL_ARCH" = "arm64" ]; then
|
||||
PLATFORM="aml-s905"
|
||||
else
|
||||
PLATFORM="aml-s805"
|
||||
fi
|
||||
|
||||
cd $PKG_BUILD
|
||||
./ver_info.pl include/ssv_version.h
|
||||
cp Makefile.android Makefile
|
||||
sed -i 's,PLATFORMS =,PLATFORMS = '"$PLATFORM"',g' Makefile
|
||||
make module SSV_ARCH="$TARGET_KERNEL_ARCH" \
|
||||
SSV_CROSS="$TARGET_PREFIX" \
|
||||
SSV_KERNEL_PATH="$(kernel_path)"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
|
||||
find $PKG_BUILD/ -name \*.ko -not -path '*/\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \;
|
||||
|
||||
mkdir -p $INSTALL/$(get_full_firmware_dir)/$PKG_NAME
|
||||
cp $PKG_BUILD/firmware/* $INSTALL/$(get_full_firmware_dir)/$PKG_NAME
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
diff --git a/Makefile.android b/Makefile.android
|
||||
index 82211e1..0deeee5 100755
|
||||
--- a/Makefile.android
|
||||
+++ b/Makefile.android
|
||||
@@ -2,10 +2,8 @@ PLATFORMS =
|
||||
|
||||
KBUILD_TOP := $(PWD)
|
||||
|
||||
-SSV_PATH=$(ANDROID_BUILD_TOP)/hardware/wifi/icomm/ssv6xxx/ssv6051/
|
||||
-
|
||||
-include $(SSV_PATH)/ssv6051.cfg
|
||||
-include $(SSV_PATH)/platform-config.mak
|
||||
+include ${KBUILD_TOP}/ssv6051.cfg
|
||||
+include ${KBUILD_TOP}/platform-config.mak
|
||||
|
||||
PWD := $(shell pwd)
|
||||
|
||||
@@ -69,7 +67,7 @@ obj-$(CONFIG_SSV6200_CORE) += $(KMODULE_NAME).o
|
||||
all:module strip
|
||||
|
||||
module:
|
||||
- make -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \
|
||||
+ $(MAKE) -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" M=$(PWD) modules
|
||||
|
||||
install:
|
||||
@@ -92,6 +90,6 @@ ifneq ($(SSV_STRIP),)
|
||||
endif
|
||||
|
||||
clean:
|
||||
- make -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \
|
||||
+ $(MAKE) -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \
|
||||
M=$(PWD) clean
|
||||
rm $(DEF_PARSER_H)
|
||||
diff --git a/firmware/ssv6051-wifi.cfg b/firmware/ssv6051-wifi.cfg
|
||||
index 6c3a823..9c623a0 100755
|
||||
--- a/firmware/ssv6051-wifi.cfg
|
||||
+++ b/firmware/ssv6051-wifi.cfg
|
||||
@@ -11,7 +11,7 @@
|
||||
# Priority.3 default firmware
|
||||
##################################################
|
||||
|
||||
-firmware_path = /system/etc/wifi/ssv6051/
|
||||
+firmware_path = /usr/lib/firmware/
|
||||
|
||||
############################################################
|
||||
# MAC address
|
||||
|
||||
diff --git a/platform-config.mak b/platform-config.mak
|
||||
index bf35b70..f02e2b5 100755
|
||||
--- a/platform-config.mak
|
||||
+++ b/platform-config.mak
|
||||
@@ -5,7 +5,7 @@ CONFIG_SSV6200_CORE=m
|
||||
###########################################################################
|
||||
# Compiler options #
|
||||
###########################################################################
|
||||
-ccflags-y += -Werror
|
||||
+# ccflags-y += -Werror
|
||||
|
||||
# Enable -g to help debug. Deassembly from .o to .S would help to track to
|
||||
# the problomatic line from call stack dump.
|
||||
diff --git a/ssv6051.cfg b/ssv6051.cfg
|
||||
index 7cf12c2..a6960fa 100755
|
||||
--- a/ssv6051.cfg
|
||||
+++ b/ssv6051.cfg
|
||||
@@ -16,6 +16,6 @@ ccflags-y += -DCONFIG_SSV_RSSI
|
||||
#SSV_CROSS = $(ANDROID_BUILD_TOP)/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
|
||||
#SSV_KERNEL_PATH = $(ANDROID_BUILD_TOP)/out/target/product/p201/obj/KERNEL_OBJ/
|
||||
|
||||
-SSV_ARCH = arm64
|
||||
+#SSV_ARCH = arm64
|
||||
#KMODDESTDIR = $(MODDESTDIR)
|
||||
|
||||
diff --git a/ssvdevice/ssvdevice.c b/ssvdevice/ssvdevice.c
|
||||
index ff4305e..375827f 100755
|
||||
--- a/ssvdevice/ssvdevice.c
|
||||
+++ b/ssvdevice/ssvdevice.c
|
||||
@@ -35,7 +35,7 @@
|
||||
MODULE_AUTHOR("iComm Semiconductor Co., Ltd");
|
||||
MODULE_DESCRIPTION("Shared library for SSV wireless LAN cards.");
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
-static char *stacfgpath = NULL;
|
||||
+static char *stacfgpath = "/usr/lib/firmware/ssv6051-wifi.cfg";
|
||||
EXPORT_SYMBOL(stacfgpath);
|
||||
module_param(stacfgpath, charp, 0000);
|
||||
MODULE_PARM_DESC(stacfgpath, "Get path of sta cfg");
|
@ -0,0 +1,40 @@
|
||||
################################################################################
|
||||
# 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="brcmfmac_sdio-firmware-all-aml"
|
||||
PKG_VERSION="f9d6101"
|
||||
PKG_SHA256="4676dfb1053795fd4c3c3ba59430da251d273202f016a9fdc13f22e12ac34947"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/kszaq/brcmfmac_sdio-firmware-aml"
|
||||
PKG_URL="https://github.com/kszaq/brcmfmac_sdio-firmware-aml/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="brcmfmac_sdio-firmware-aml-$PKG_VERSION*"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="firmware"
|
||||
PKG_SHORTDESC="brcmfmac_sdio-firmware: firmware for brcm bluetooth chips used in some Amlogic based devices"
|
||||
PKG_LONGDESC="Firmware for Broadcom Bluetooth devices used in some Amlogic based devices, and brcm-patchram-plus that downloads a patchram files in the HCD format to the Bluetooth based silicon and combo chips and other utility functions."
|
||||
|
||||
post_makeinstall_target() {
|
||||
cd $INSTALL/$(get_full_firmware_dir)/brcm
|
||||
for f in *.hcd; do
|
||||
ln -sr $f $(grep --text -o 'BCM\S*' $f).hcd 2>/dev/null || true
|
||||
ln -sr $f $(grep --text -o 'BCM\S*' $f | cut -c4-).hcd 2>/dev/null || true
|
||||
ln -sr $f $(echo $f | sed -r 's/[^.]*/\U&/') 2>/dev/null || true
|
||||
ln -sr bcm4335_V0343.0353.hcd BCM4335A0.hcd 2>/dev/null || true
|
||||
done
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
diff -Naur a/Makefile b/Makefile
|
||||
--- a/Makefile 2014-10-07 14:00:34.000000000 -0700
|
||||
+++ b/Makefile 2016-12-06 11:24:34.855522455 -0800
|
||||
@@ -15,8 +15,8 @@
|
||||
install:
|
||||
mkdir -p $(DESTDIR)/usr/bin
|
||||
cp -P $(PROG) $(DESTDIR)/usr/bin
|
||||
- mkdir -p $(DESTDIR)/lib/firmware
|
||||
- cp -PR firmware/brcm $(DESTDIR)/lib/firmware/
|
||||
+ mkdir -p $(DESTDIR)/usr/lib/kernel-overlays/base/lib/firmware
|
||||
+ cp -PR firmware/brcm $(DESTDIR)/usr/lib/kernel-overlays/base/lib/firmware/
|
||||
|
||||
clean:
|
||||
rm -f $(PROG)
|
@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Broadcom sdio firmware update
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/usr/share/bttty.conf
|
||||
ExecStart=/usr/bin/hciattach -n -s 115200 ${BTTTY} bcm43xx 2000000
|
@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Broadcom sdio firmware update for %I
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/usr/share/bttty.conf
|
||||
ExecStart=/usr/bin/brcm_patchram_plus --patchram /usr/lib/kernel-overlays/base/lib/firmware/brcm/%I.hcd --baudrate 2000000 --use_baudrate_for_download ${BTTTY} --enable_hci --no2bytes --tosleep=50000
|
@ -0,0 +1,12 @@
|
||||
################################################################################
|
||||
# udev rules file for loading brcmfmac_sdio-firmware
|
||||
################################################################################
|
||||
|
||||
### Broadcom bcm43362/bcm20710a1 bluetooth device
|
||||
SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x02d0", ATTRS{device}=="0xa962", ACTION=="add", \
|
||||
TAG+="systemd", ENV{SYSTEMD_WANTS}+="brcmfmac_sdio-firmware@bcm20710a1.service", GOTO="end"
|
||||
|
||||
SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x02d0", ACTION=="add", \
|
||||
TAG+="systemd", ENV{SYSTEMD_WANTS}+="brcmfmac_sdio-firmware-aml.service"
|
||||
|
||||
LABEL="end"
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
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
|
||||
}
|
@ -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
|
@ -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"
|
29
packages/linux-firmware/rtl8723bs_bt/package.mk
Normal file
29
packages/linux-firmware/rtl8723bs_bt/package.mk
Normal file
@ -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"
|
@ -39,8 +39,8 @@ case "$LINUX" in
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET aml-dtbtools:host"
|
||||
;;
|
||||
amlogic-3.14)
|
||||
PKG_VERSION="2e193b8"
|
||||
PKG_SHA256="cc6139490d461c1c5c0fad1003d3f94153272a11db9a786362fb2a0daa04b926"
|
||||
PKG_VERSION="da53aa7"
|
||||
PKG_SHA256="f79650b9c31f668e48d7a8bd6c419deed11ba8ea728a613b902445ad8feefa89"
|
||||
PKG_URL="https://github.com/LibreELEC/linux-amlogic/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="$PKG_NAME-amlogic-$PKG_VERSION*"
|
||||
PKG_PATCH_DIRS="amlogic-3.14"
|
||||
|
@ -1083,6 +1083,7 @@ CONFIG_POST_PROCESS_MANAGER_PPSCALER=y
|
||||
# Amlogic Wifi Driver
|
||||
#
|
||||
# CONFIG_AM_WIFI is not set
|
||||
# CONFIG_AM_WIFI_DUMMY is not set
|
||||
CONFIG_AML_POWER_RESET=y
|
||||
# CONFIG_M8_POWER_RESET is not set
|
||||
CONFIG_GXBB_POWER_RESET=y
|
||||
|
@ -0,0 +1 @@
|
||||
wifi_dummy
|
@ -68,11 +68,11 @@ for arg in $(cat /proc/cmdline); do
|
||||
case $boot in
|
||||
/dev/system)
|
||||
dd if=/dev/zero of=/dev/dtb bs=256k count=1 status=none
|
||||
dd if=$UPDATE_DTB_SOURCE of=/dev/dtb bs=256k status=none
|
||||
dd if="$UPDATE_DTB_SOURCE" of=/dev/dtb bs=256k status=none
|
||||
;;
|
||||
/dev/mmc*|LABEL=*)
|
||||
mount -o rw,remount $BOOT_ROOT
|
||||
cp -f $UPDATE_DTB_SOURCE "$BOOT_ROOT/dtb.img"
|
||||
cp -f "$UPDATE_DTB_SOURCE" "$BOOT_ROOT/dtb.img"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
1
projects/S905/filesystem/usr/share/bttty.conf
Normal file
1
projects/S905/filesystem/usr/share/bttty.conf
Normal file
@ -0,0 +1 @@
|
||||
BTTTY="/dev/ttyS1"
|
@ -1055,6 +1055,7 @@ CONFIG_POST_PROCESS_MANAGER_PPSCALER=y
|
||||
# Amlogic Wifi Driver
|
||||
#
|
||||
CONFIG_AM_WIFI=y
|
||||
CONFIG_AM_WIFI_DUMMY=m
|
||||
CONFIG_BCMDHD_USE_STATIC_BUF=y
|
||||
CONFIG_AML_POWER_RESET=y
|
||||
# CONFIG_M8_POWER_RESET is not set
|
||||
|
@ -113,12 +113,15 @@
|
||||
# Space separated list is supported,
|
||||
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
|
||||
ADDITIONAL_DRIVERS="RTL8192CU RTL8192DU RTL8192EU RTL8812AU gpu-aml \
|
||||
ap6xxx mt7601u mt7603u qca9377 RTL8188EU RTL8189ES RTL8189FS RTL8723BS RTL8723DS RTL8822BU ssv6xxx"
|
||||
ap6xxx-aml mt7601u-aml mt7603u-aml qca9377-aml \
|
||||
RTL8188EU-aml RTL8189ES-aml RTL8189FS-aml RTL8723BS-aml \
|
||||
RTL8723DS-aml RTL8822BU-aml ssv6xxx-aml"
|
||||
|
||||
|
||||
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
|
||||
# Space separated list is supported,
|
||||
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
|
||||
FIRMWARE="misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-aml rtl8723bs_bt qca9377-firmware"
|
||||
FIRMWARE="misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-all-aml rtl8723bs_bt qca9377-firmware-aml"
|
||||
|
||||
# build and install ATV IR remote support (yes / no)
|
||||
ATVCLIENT_SUPPORT="no"
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 561186ae0cd8814a8d518eed424ae453a1dae1d3 Mon Sep 17 00:00:00 2001
|
||||
From: kszaq <kszaquitto@gmail.com>
|
||||
Date: Mon, 27 Jun 2016 01:37:55 +0200
|
||||
Subject: [PATCH] drivers/of: put extended cmdline at the end
|
||||
|
||||
---
|
||||
drivers/of/fdt.c | 16 ++++------------
|
||||
1 file changed, 4 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
|
||||
index 2e9f7d96617..a29163d21f4 100644
|
||||
--- a/drivers/of/fdt.c
|
||||
+++ b/drivers/of/fdt.c
|
||||
@@ -894,20 +894,12 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
|
||||
p = (char *)of_get_flat_dt_prop(node, "bootargs", &l);
|
||||
|
||||
if (p != NULL && l > 0) {
|
||||
- if (concat_cmdline) {
|
||||
- int cmdline_len;
|
||||
- int copy_len;
|
||||
- strlcat(cmdline, " ", COMMAND_LINE_SIZE);
|
||||
- cmdline_len = strlen(cmdline);
|
||||
- copy_len = COMMAND_LINE_SIZE - cmdline_len - 1;
|
||||
- copy_len = min((int)l, copy_len);
|
||||
- strncpy(cmdline + cmdline_len, p, copy_len);
|
||||
- cmdline[cmdline_len + copy_len] = '\0';
|
||||
- } else {
|
||||
- strlcpy(cmdline, p, min((int)l, COMMAND_LINE_SIZE));
|
||||
- }
|
||||
+ strlcpy(cmdline, p, min((int)l, COMMAND_LINE_SIZE));
|
||||
}
|
||||
|
||||
+ if (concat_cmdline)
|
||||
+ strlcat(cmdline, config_cmdline, COMMAND_LINE_SIZE);
|
||||
+
|
||||
pr_debug("Command line is: %s\n", (char*)data);
|
||||
|
||||
/* break now */
|
@ -1074,6 +1074,7 @@ CONFIG_POST_PROCESS_MANAGER_PPSCALER=y
|
||||
# Amlogic Wifi Driver
|
||||
#
|
||||
CONFIG_AM_WIFI=y
|
||||
# CONFIG_AM_WIFI_DUMMY is not set
|
||||
# CONFIG_BCMDHD_USE_STATIC_BUF is not set
|
||||
CONFIG_AML_POWER_RESET=y
|
||||
# CONFIG_M8_POWER_RESET is not set
|
||||
|
@ -1074,6 +1074,7 @@ CONFIG_POST_PROCESS_MANAGER_PPSCALER=y
|
||||
# Amlogic Wifi Driver
|
||||
#
|
||||
CONFIG_AM_WIFI=y
|
||||
# CONFIG_AM_WIFI_DUMMY is not set
|
||||
# CONFIG_BCMDHD_USE_STATIC_BUF is not set
|
||||
CONFIG_AML_POWER_RESET=y
|
||||
# CONFIG_M8_POWER_RESET is not set
|
||||
|
Loading…
x
Reference in New Issue
Block a user