OSDN Git Service

15316c0b219da8ee9d8dcd86eafbd7b042da506f
[immortalwrt/immortalwrt.git] / package / kernel / r8168 / Makefile
1 #
2 # Download realtek r8168 linux driver from official site:
3 # [https://www.realtek.com/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software]
4 #
5
6 include $(TOPDIR)/rules.mk
7 include $(INCLUDE_DIR)/kernel.mk
8
9 PKG_NAME:=r8168
10 PKG_VERSION:=8.049.02
11 PKG_RELEASE:=$(AUTORELEAE)
12
13 PKG_SOURCE_PROTO:=git
14 PKG_SOURCE_URL:=https://github.com/BROBIRD/openwrt-r8168.git
15 PKG_SOURCE_DATE:=2021-10-08
16 PKG_SOURCE_VERSION:=2b969c15afe403a685fc7ee069620782241e3ad6
17 PKG_MIRROR_HASH:=e4632c10d460f005eff76da8a183d7ff0c8819b0d099872589b7b06a9b8d9952
18
19 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20
21 MAKE_PATH:=src
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define KernelPackage/r8168
26   TITLE:=Driver for Realtek r8168 chipsets
27   SUBMENU:=Network Devices
28   VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
29   DEPENDS:=@PCI_SUPPORT
30   FILES:= $(PKG_BUILD_DIR)/src/r8168.ko
31   AUTOLOAD:=$(call AutoProbe,r8168)
32   CONFLICTS:=kmod-r8169
33 endef
34
35 define Package/r8168/description
36   This package contains a driver for Realtek r8168 chipsets.
37 endef
38
39 R8168_MAKEOPTS= -C $(PKG_BUILD_DIR)/src \
40         PATH="$(TARGET_PATH)" \
41         ARCH="$(LINUX_KARCH)" \
42         CROSS_COMPILE="$(TARGET_CROSS)" \
43         TARGET="$(HAL_TARGET)" \
44         TOOLPREFIX="$(KERNEL_CROSS)" \
45         TOOLPATH="$(KERNEL_CROSS)" \
46         KERNELPATH="$(LINUX_DIR)" \
47         KERNELDIR="$(LINUX_DIR)" \
48         LDOPTS=" " \
49         DOMULTI=1
50
51 define Build/Compile
52         $(MAKE) $(R8168_MAKEOPTS) modules
53 endef
54
55 $(eval $(call KernelPackage,r8168))