Skip to content

Commit

Permalink
Add out-of-tree Realtek WiFi drivers for Amlogic S9*
Browse files Browse the repository at this point in the history
  • Loading branch information
kszaq committed Sep 17, 2017
1 parent 3fbc9c3 commit 2d04956
Show file tree
Hide file tree
Showing 5 changed files with 285 additions and 0 deletions.
57 changes: 57 additions & 0 deletions packages/linux-drivers/amlogic/RTL8188EU-aml/package.mk
@@ -0,0 +1,57 @@
################################################################################
# This file is part of LibreELEC - https://LibreELEC.tv
# Copyright (C) 2016 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_REV="1"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
# amlogic: PKG_SITE="http://openlinux.amlogic.com:8000/download/ARM/wifi/"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8188eu"
PKG_URL="$PKG_SITE/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_PRIORITY="optional"
PKG_SECTION="driver"

PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

if [ "$TARGET_KERNEL_ARCH" = "arm64" -a "$TARGET_ARCH" = "arm" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET gcc-linaro-aarch64-linux-gnu:host"
export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-linux-gnu/bin/:$PATH
TARGET_PREFIX=aarch64-linux-gnu-
fi

post_unpack() {
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g' $PKG_BUILD/rtl8xxx_EU/Makefile
}

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/usr/lib/modules/$(get_module_dir)/$PKG_NAME
find $PKG_BUILD -name *.ko -exec cp {} $INSTALL/usr/lib/modules/$(get_module_dir)/$PKG_NAME \;
}
57 changes: 57 additions & 0 deletions packages/linux-drivers/amlogic/RTL8189ES-aml/package.mk
@@ -0,0 +1,57 @@
################################################################################
# This file is part of LibreELEC - https://LibreELEC.tv
# Copyright (C) 2016 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_REV="1"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
# amlogic: PKG_SITE="http://openlinux.amlogic.com:8000/download/ARM/wifi/"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189es"
PKG_URL="$PKG_SITE/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_PRIORITY="optional"
PKG_SECTION="driver"

PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

if [ "$TARGET_KERNEL_ARCH" = "arm64" -a "$TARGET_ARCH" = "arm" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET gcc-linaro-aarch64-linux-gnu:host"
export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-linux-gnu/bin/:$PATH
TARGET_PREFIX=aarch64-linux-gnu-
fi

post_unpack() {
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g' $PKG_BUILD/rtl8189ES/Makefile
}

make_target() {
LDFLAGS="" 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/usr/lib/modules/$(get_module_dir)/$PKG_NAME
cp $PKG_BUILD/rtl8189ES/*.ko $INSTALL/usr/lib/modules/$(get_module_dir)/$PKG_NAME
}
57 changes: 57 additions & 0 deletions packages/linux-drivers/amlogic/RTL8189FS-aml/package.mk
@@ -0,0 +1,57 @@
################################################################################
# This file is part of LibreELEC - https://LibreELEC.tv
# Copyright (C) 2016 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="RTL8189FS-aml"
PKG_VERSION="ab83abd"
PKG_REV="1"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
# amlogic: PKG_SITE="http://openlinux.amlogic.com:8000/download/ARM/wifi/"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189ftv"
PKG_URL="$PKG_SITE/archive/$PKG_VERSION.tar.gz"
PKG_SOURCE_DIR="android_hardware_wifi_realtek_drivers_8189ftv-$PKG_VERSION*"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_PRIORITY="optional"
PKG_SECTION="driver"

PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

if [ "$TARGET_KERNEL_ARCH" = "arm64" -a "$TARGET_ARCH" = "arm" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET gcc-linaro-aarch64-linux-gnu:host"
export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-linux-gnu/bin/:$PATH
TARGET_PREFIX=aarch64-linux-gnu-
fi

post_unpack() {
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g' $PKG_BUILD/rtl8189FS/Makefile
}

make_target() {
LDFLAGS="" make -C $(kernel_path) M=$PKG_BUILD/rtl8189FS \
ARCH=$TARGET_KERNEL_ARCH \
KSRC=$(kernel_path) \
CROSS_COMPILE=$TARGET_PREFIX \
USER_EXTRA_CFLAGS="-fgnu89-inline"
}

makeinstall_target() {
mkdir -p $INSTALL/usr/lib/modules/$(get_module_dir)/$PKG_NAME
cp $PKG_BUILD/rtl8189FS/*.ko $INSTALL/usr/lib/modules/$(get_module_dir)/$PKG_NAME
}
57 changes: 57 additions & 0 deletions packages/linux-drivers/amlogic/RTL8723BS-aml/package.mk
@@ -0,0 +1,57 @@
################################################################################
# This file is part of LibreELEC - https://LibreELEC.tv
# Copyright (C) 2016 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_REV="1"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
# amlogic: PKG_SITE="http://openlinux.amlogic.com:8000/download/ARM/wifi/"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723bs"
PKG_URL="$PKG_SITE/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_PRIORITY="optional"
PKG_SECTION="driver"

PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

if [ "$TARGET_KERNEL_ARCH" = "arm64" -a "$TARGET_ARCH" = "arm" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET gcc-linaro-aarch64-linux-gnu:host"
export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-linux-gnu/bin/:$PATH
TARGET_PREFIX=aarch64-linux-gnu-
fi

post_unpack() {
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g' $PKG_BUILD/rtl8723BS/Makefile
}

make_target() {
LDFLAGS="" 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/usr/lib/modules/$(get_module_dir)/$PKG_NAME
cp $PKG_BUILD/rtl8723BS/*.ko $INSTALL/usr/lib/modules/$(get_module_dir)/$PKG_NAME
}
57 changes: 57 additions & 0 deletions packages/linux-drivers/amlogic/RTL8822BU-aml/package.mk
@@ -0,0 +1,57 @@
################################################################################
# This file is part of LibreELEC - https://LibreELEC.tv
# Copyright (C) 2016 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_REV="1"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPL"
# amlogic: PKG_SITE="http://openlinux.amlogic.com:8000/download/ARM/wifi/"
PKG_SITE="https://github.com/khadas/android_hardware_wifi_realtek_drivers_8822bu"
PKG_URL="$PKG_SITE/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_PRIORITY="optional"
PKG_SECTION="driver"

PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

if [ "$TARGET_KERNEL_ARCH" = "arm64" -a "$TARGET_ARCH" = "arm" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET gcc-linaro-aarch64-linux-gnu:host"
export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-linux-gnu/bin/:$PATH
TARGET_PREFIX=aarch64-linux-gnu-
fi

post_unpack() {
sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g' $PKG_BUILD/rtl8822BU/Makefile
}

make_target() {
LDFLAGS="" 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/usr/lib/modules/$(get_module_dir)/$PKG_NAME
cp $PKG_BUILD/rtl8822BU/*.ko $INSTALL/usr/lib/modules/$(get_module_dir)/$PKG_NAME
}

0 comments on commit 2d04956

Please sign in to comment.