2020-11-14 14:09:10 +08:00
#Download realtek r8152 linux driver from official site [https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software]
#Unpack source file
#Replace orginal Makefile with this file
#Put this source to 'package' folder of OpenWRT/LEDE SDK
#Build(make menuconfig, make defconfig, make)
i n c l u d e $( TOPDIR ) / r u l e s . m k
i n c l u d e $( INCLUDE_DIR ) / k e r n e l . m k
PKG_NAME := r8152
PKG_VERSION := 2.14
2021-05-23 01:48:17 +08:00
PKG_RELEASE := 2
2020-11-14 14:09:10 +08:00
2021-03-23 09:26:58 +08:00
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
2021-03-23 16:59:39 +08:00
PKG_SOURCE_URL := https://codeload.github.com/wget/realtek-r8152-linux/tar.gz/v$( PKG_VERSION) ?
2020-11-14 14:09:10 +08:00
PKG_HASH := 617c159eb72355c240be3f78971e5a01c9dffe5545a7ae76bb2bd87bb7a346ed
PKG_BUILD_DIR := $( KERNEL_BUILD_DIR) /realtek-$( PKG_NAME) -linux-$( PKG_VERSION)
2021-05-23 01:48:17 +08:00
PKG_MAINTAINTER := Tianling Shen <cnsztl@immortalwrt.org>
PKG_BUILD_PARALLEL := 1
2021-03-23 09:26:58 +08:00
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
2020-11-14 14:09:10 +08:00
d e f i n e K e r n e l P a c k a g e / u s b - n e t - r t l 8 1 5 2 - v e n d o r
TITLE:= Kernel module for USB-to-Ethernet Realtek convertors
SUBMENU:= USB Support
VERSION:= $( LINUX_VERSION) +$( PKG_VERSION) -$( BOARD) -$( PKG_RELEASE)
DEPENDS:= +kmod-usb-net
CONFLICTS:= kmod-usb-net-rtl8152
FILES:= $( PKG_BUILD_DIR) /r8152.ko
AUTOLOAD:= $( call AutoProbe,r8152)
e n d e f
d e f i n e K e r n e l P a c k a g e / u s b - n e t - r t l 8 1 5 2 - v e n d o r / d e s c r i p t i o n
2021-01-29 21:07:22 +08:00
Kernel module for Realtek RTL8152/RTL8153 Based USB Ethernet Adapters
2020-11-14 14:09:10 +08:00
e n d e f
R8152_MAKEOPTS = -C $( PKG_BUILD_DIR) \
PATH = " $( TARGET_PATH) " \
ARCH = " $( LINUX_KARCH) " \
CROSS_COMPILE = " $( TARGET_CROSS) " \
TARGET = " $( HAL_TARGET) " \
TOOLPREFIX = " $( KERNEL_CROSS) " \
TOOLPATH = " $( KERNEL_CROSS) " \
KERNELPATH = " $( LINUX_DIR) " \
KERNELDIR = " $( LINUX_DIR) " \
LDOPTS = " " \
DOMULTI = 1
d e f i n e B u i l d / C o m p i l e
+$( MAKE) $( PKG_JOBS) $( R8152_MAKEOPTS) modules
e n d e f
$( eval $ ( call KernelPackage ,usb -net -rtl 8152-vendor ) )