2020-04-23 03:12:12 +08:00
#Download realtek r8168 linux driver from official site [https://www.realtek.com/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-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 := r8168
2020-06-20 18:14:35 +08:00
PKG_VERSION := 8.048.03
2020-04-23 03:12:12 +08:00
PKG_BUILD_DIR := $( KERNEL_BUILD_DIR) /$( PKG_NAME) -$( PKG_VERSION)
2021-03-15 15:52:47 +08:00
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e - i m m o r t a l w r t . m k
2020-04-23 03:12:12 +08:00
d e f i n e K e r n e l P a c k a g e / r 8 1 6 8
TITLE:= Driver for Realtek r8168 chipsets
SUBMENU:= Network Devices
VERSION:= $( LINUX_VERSION) +$( PKG_VERSION) -$( BOARD) -$( PKG_RELEASE)
FILES:= $( PKG_BUILD_DIR) /r8168.ko
AUTOLOAD:= $( call AutoProbe,r8168)
e n d e f
d e f i n e P a c k a g e / r 8 1 6 8 / d e s c r i p t i o n
2021-01-29 21:07:22 +08:00
This package contains a driver for Realtek r8168 chipsets.
2020-04-23 03:12:12 +08:00
e n d e f
R8168_MAKEOPTS = -C $( PKG_BUILD_DIR) \
2021-01-29 21:07:22 +08:00
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
2020-04-23 03:12:12 +08:00
d e f i n e B u i l d / C o m p i l e
$( MAKE) $( R8168_MAKEOPTS) modules
e n d e f
$( eval $ ( call KernelPackage ,r 8168) )