diff options
Diffstat (limited to 'meta-amdfalconx86/recipes-kernel/r8168/files/0001-r8168-adjust-Makefiles-for-Yocto-environment.patch')
-rw-r--r-- | meta-amdfalconx86/recipes-kernel/r8168/files/0001-r8168-adjust-Makefiles-for-Yocto-environment.patch | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/meta-amdfalconx86/recipes-kernel/r8168/files/0001-r8168-adjust-Makefiles-for-Yocto-environment.patch b/meta-amdfalconx86/recipes-kernel/r8168/files/0001-r8168-adjust-Makefiles-for-Yocto-environment.patch new file mode 100644 index 00000000..395257e5 --- /dev/null +++ b/meta-amdfalconx86/recipes-kernel/r8168/files/0001-r8168-adjust-Makefiles-for-Yocto-environment.patch @@ -0,0 +1,145 @@ +From 156a79c8aa451e3cf121d81ed3edae8054bc38fd Mon Sep 17 00:00:00 2001 +From: Awais Belal <awais_belal@mentor.com> +Date: Mon, 8 Jun 2015 18:21:24 +0500 +Subject: [PATCH] r8168: adjust Makefiles for Yocto environment + +Signed-off-by: Awais Belal <awais_belal@mentor.com> +--- + Makefile | 26 ++++---------------- + src/Makefile | 77 +++++++++++++++++++++++++----------------------------------- + 2 files changed, 36 insertions(+), 67 deletions(-) + +diff --git a/Makefile b/Makefile +index a41f96e..e955097 100755 +--- a/Makefile ++++ b/Makefile +@@ -29,30 +29,12 @@ + # US6,570,884, US6,115,776, and US6,327,625. + ################################################################################ + +-KFLAG := 2$(shell uname -r | sed -ne 's/^2\.[4]\..*/4/p')x +- +-all: clean modules install +- +-modules: +-ifeq ($(KFLAG),24x) +- $(MAKE) -C src/ -f Makefile_linux24x modules +-else +- $(MAKE) -C src/ modules +-endif ++all: ++ $(MAKE) -C src/ + + clean: +-ifeq ($(KFLAG),24x) +- $(MAKE) -C src/ -f Makefile_linux24x clean +-else + $(MAKE) -C src/ clean +-endif +- +-install: +-ifeq ($(KFLAG),24x) +- $(MAKE) -C src/ -f Makefile_linux24x install +-else +- $(MAKE) -C src/ install +-endif +- + ++modules_install: ++ $(MAKE) -C src/ modules_install + +diff --git a/src/Makefile b/src/Makefile +index 641a369..fab0ca4 100755 +--- a/src/Makefile ++++ b/src/Makefile +@@ -36,55 +36,42 @@ CONFIG_ASPM = y + ENABLE_S5WOL = y + ENABLE_EEE = n + +-ifneq ($(KERNELRELEASE),) +- obj-m := r8168.o +- r8168-objs := r8168_n.o r8168_asf.o rtl_eeprom.o rtltool.o +- ifeq ($(ENABLE_REALWOW_SUPPORT), y) +- r8168-objs += r8168_realwow.o +- EXTRA_CFLAGS += -DENABLE_REALWOW_SUPPORT +- endif +- ifeq ($(ENABLE_DASH_SUPPORT), y) +- r8168-objs += r8168_dash.o +- EXTRA_CFLAGS += -DENABLE_DASH_SUPPORT +- endif +- EXTRA_CFLAGS += -DCONFIG_R8168_NAPI +- EXTRA_CFLAGS += -DCONFIG_R8168_VLAN +- ifeq ($(CONFIG_DOWN_SPEED_100), y) +- EXTRA_CFLAGS += -DCONFIG_DOWN_SPEED_100 +- endif +- ifeq ($(CONFIG_ASPM), y) +- EXTRA_CFLAGS += -DCONFIG_ASPM +- endif +- ifeq ($(ENABLE_S5WOL), y) +- EXTRA_CFLAGS += -DENABLE_S5WOL +- endif +- ifeq ($(ENABLE_EEE), y) +- EXTRA_CFLAGS += -DENABLE_EEE +- endif +-else +- BASEDIR := /lib/modules/$(shell uname -r) +- KERNELDIR ?= $(BASEDIR)/build +- PWD :=$(shell pwd) +- DRIVERDIR := $(shell find $(BASEDIR)/kernel/drivers/net -name realtek -type d) +- ifeq ($(DRIVERDIR),) +- DRIVERDIR := $(BASEDIR)/kernel/drivers/net +- endif +- RTKDIR := $(subst $(BASEDIR)/,,$(DRIVERDIR)) ++SRC := $(shell pwd) + +-.PHONY: all +-all: clean modules install ++obj-m := r8168.o ++r8168-objs := r8168_n.o r8168_asf.o rtl_eeprom.o rtltool.o ++ifeq ($(ENABLE_REALWOW_SUPPORT), y) ++ r8168-objs += r8168_realwow.o ++ EXTRA_CFLAGS += -DENABLE_REALWOW_SUPPORT ++endif ++ifeq ($(ENABLE_DASH_SUPPORT), y) ++ r8168-objs += r8168_dash.o ++ EXTRA_CFLAGS += -DENABLE_DASH_SUPPORT ++endif ++EXTRA_CFLAGS += -DCONFIG_R8168_NAPI ++EXTRA_CFLAGS += -DCONFIG_R8168_VLAN ++ifeq ($(CONFIG_DOWN_SPEED_100), y) ++ EXTRA_CFLAGS += -DCONFIG_DOWN_SPEED_100 ++endif ++ifeq ($(CONFIG_ASPM), y) ++ EXTRA_CFLAGS += -DCONFIG_ASPM ++endif ++ifeq ($(ENABLE_S5WOL), y) ++ EXTRA_CFLAGS += -DENABLE_S5WOL ++endif ++ifeq ($(ENABLE_EEE), y) ++ EXTRA_CFLAGS += -DENABLE_EEE ++endif + +-.PHONY:modules +-modules: +- $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) modules ++.PHONY:all ++all: ++ $(MAKE) -C $(KERNEL_SRC) M=$(SRC) + + .PHONY:clean + clean: +- $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) clean ++ $(MAKE) -C $(KERNEL_SRC) M=$(SRC) clean + +-.PHONY:install +-install: +- $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) INSTALL_MOD_DIR=$(RTKDIR) modules_install +- +-endif ++.PHONY:modules_install ++modules_install: ++ $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install + +-- +1.9.1 + |