mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-06 17:37:52 +00:00
mt7603-aml: new driver package
This commit is contained in:
parent
c25c422a9b
commit
6189c087c7
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)
|
Loading…
x
Reference in New Issue
Block a user