提交 5d1fe0c9 编写于 作者: F Forest Bond 提交者: Greg Kroah-Hartman

Staging: vt6656: Integrate vt6656 into build system.

Integrate drivers/staging/vt6656 into build system.
Signed-off-by: NForest Bond <forest@alittletooquiet.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f4a8df99
master alk-4.19.24 alk-4.19.30 alk-4.19.34 alk-4.19.36 alk-4.19.43 alk-4.19.48 alk-4.19.57 ck-4.19.67 ck-4.19.81 ck-4.19.91 github/fork/deepanshu1422/fix-typo-in-comment github/fork/haosdent/fix-typo linux-next v4.19.91 v4.19.90 v4.19.89 v4.19.88 v4.19.87 v4.19.86 v4.19.85 v4.19.84 v4.19.83 v4.19.82 v4.19.81 v4.19.80 v4.19.79 v4.19.78 v4.19.77 v4.19.76 v4.19.75 v4.19.74 v4.19.73 v4.19.72 v4.19.71 v4.19.70 v4.19.69 v4.19.68 v4.19.67 v4.19.66 v4.19.65 v4.19.64 v4.19.63 v4.19.62 v4.19.61 v4.19.60 v4.19.59 v4.19.58 v4.19.57 v4.19.56 v4.19.55 v4.19.54 v4.19.53 v4.19.52 v4.19.51 v4.19.50 v4.19.49 v4.19.48 v4.19.47 v4.19.46 v4.19.45 v4.19.44 v4.19.43 v4.19.42 v4.19.41 v4.19.40 v4.19.39 v4.19.38 v4.19.37 v4.19.36 v4.19.35 v4.19.34 v4.19.33 v4.19.32 v4.19.31 v4.19.30 v4.19.29 v4.19.28 v4.19.27 v4.19.26 v4.19.25 v4.19.24 v4.19.23 v4.19.22 v4.19.21 v4.19.20 v4.19.19 v4.19.18 v4.19.17 v4.19.16 v4.19.15 v4.19.14 v4.19.13 v4.19.12 v4.19.11 v4.19.10 v4.19.9 v4.19.8 v4.19.7 v4.19.6 v4.19.5 v4.19.4 v4.19.3 v4.19.2 v4.19.1 v4.19 v4.19-rc8 v4.19-rc7 v4.19-rc6 v4.19-rc5 v4.19-rc4 v4.19-rc3 v4.19-rc2 v4.19-rc1 ck-release-21 ck-release-20 ck-release-19.2 ck-release-19.1 ck-release-19 ck-release-18 ck-release-17.2 ck-release-17.1 ck-release-17 ck-release-16 ck-release-15.1 ck-release-15 ck-release-14 ck-release-13.2 ck-release-13 ck-release-12 ck-release-11 ck-release-10 ck-release-9 ck-release-7 alk-release-15 alk-release-14 alk-release-13.2 alk-release-13 alk-release-12 alk-release-11 alk-release-10 alk-release-9 alk-release-7
无相关合并请求
......@@ -123,6 +123,8 @@ source "drivers/staging/serqt_usb2/Kconfig"
source "drivers/staging/vt6655/Kconfig"
source "drivers/staging/vt6656/Kconfig"
source "drivers/staging/cpc-usb/Kconfig"
source "drivers/staging/pata_rdc/Kconfig"
......
......@@ -43,6 +43,7 @@ obj-$(CONFIG_LINE6_USB) += line6/
obj-$(CONFIG_USB_SERIAL_QUATECH2) += serqt_usb2/
obj-$(CONFIG_OCTEON_ETHERNET) += octeon/
obj-$(CONFIG_VT6655) += vt6655/
obj-$(CONFIG_VT6656) += vt6656/
obj-$(CONFIG_USB_CPC) += cpc-usb/
obj-$(CONFIG_RDC_17F3101X) += pata_rdc/
obj-$(CONFIG_FB_UDL) += udlfb/
config VT6656
tristate "VIA Technologies VT6656 support"
---help---
This is a vendor-written driver for VIA VT6656.
#
# Build options:
#
#
HOSTAP := 1
KSP := /lib/modules/$(shell uname -r)/build \
/usr/src/linux-$(shell uname -r) \
/usr/src/linux-$(shell uname -r | sed 's/-.*//') \
/usr/src/kernel-headers-$(shell uname -r) \
/usr/src/kernel-source-$(shell uname -r) \
/usr/src/linux-$(shell uname -r | sed 's/\([0-9]*\.[0-9]*\)\..*/\1/') \
/usr/src/linux
test_dir = $(shell [ -e $(dir)/include/linux ] && echo $(dir))
KSP := $(foreach dir, $(KSP), $(test_dir))
KSRC := $(firstword $(KSP))
ifeq (,$(KSRC))
$(error Linux kernel source not found)
endif
# check kernel version
KVER := $(shell uname -r | cut -c1-3 | sed 's/2\.[56]/2\.6/')
KERVER2=$(shell uname -r | cut -d. -f2)
ifeq ($(KVER), 2.6)
# 2.6 kernel
TARGET = vntwusb.ko
else
TARGET = vntwusb.o
endif
INSTDIR := $(shell find /lib/modules/$(shell uname -r) -name $(TARGET) -printf "%h\n" | sort | head -1)
ifeq (,$(INSTDIR))
ifeq (,$(KERVER2))
ifneq (,$(wildcard /lib/modules/$(shell uname -r)/kernel))
INSTDIR := /lib/modules/$(shell uname -r)/kernel/drivers/net
else
INSTDIR := /lib/modules/$(shell uname -r)/net
endif
else
ifneq ($(KERVER2),2)
INSTDIR := /lib/modules/$(shell uname -r)/kernel/drivers/net
else
INSTDIR := /lib/modules/$(shell uname -r)/net
endif
endif
endif
SRC = main_usb.c card.c mac.c baseband.c wctl.c 80211mgr.c \
wcmd.c wmgr.c bssdb.c wpa2.c rxtx.c dpc.c power.c datarate.c \
mib.c rc4.c tether.c tcrc.c ioctl.c hostap.c wpa.c key.c \
tkip.c michael.c rf.c iwctl.c wpactl.c aes_ccmp.c \
usbpipe.c channel.c control.c firmware.c int.c
ifeq ($(HOSTAP), 1)
# CFLAGS += -DHOSTAP
EXTRA_CFLAGS += -DHOSTAP
endif
#CFLAGS += -I$(PWD) -I$(PWD)/../include -I$(PWD)/include
EXTRA_CFLAGS += -I$(PWD) -I$(PWD)/../include -I$(PWD)/include
# build rule
ifeq ($(KVER), 2.6)
# 2.6 kernel
ifndef KERNEL_CONF
KERNEL_CONF= $(KSRC)/.config
endif
include ${KERNEL_CONF}
obj-m += vntwusb.o
vntwusb-objs := main_usb.o card.o mac.o baseband.o wctl.o 80211mgr.o \
wcmd.o wmgr.o bssdb.o rxtx.o dpc.o power.o datarate.o \
mib.o rc4.o tether.o tcrc.o ioctl.o hostap.o wpa.o key.o tkip.o \
michael.o rf.o iwctl.o wpactl.o wpa2.o aes_ccmp.o \
usbpipe.o channel.o control.o firmware.o int.o
.c.o:
# $(CC) $(CFLAGS) -o $@ $<
$(CC) $(EXTRA_CFLAGS) -o $@ $<
default:
make -C $(KSRC) SUBDIRS=$(shell pwd) modules
else
# 2.2/2.4 kernel
OBJS := main_usb.o card.o mac.o baseband.o wctl.o 80211mgr.o \
wcmd.o wmgr.o bssdb.o rxtx.o dpc.o power.o datarate.o \
mib.o rc4.o tether.o tcrc.o ioctl.o hostap.o wpa.o key.o tkip.o \
michael.o rf.o iwctl.o wpactl.o wpa2.o aes_ccmp.o \
usbpipe.o channel.o control.o
VERSION_FILE := $(KSRC)/include/linux/version.h
CONFIG_FILE := $(KSRC)/include/linux/config.h
ifeq (,$(wildcard $(VERSION_FILE)))
$(error Linux kernel source not configured - missing version.h)
endif
ifeq (,$(wildcard $(CONFIG_FILE)))
$(error Linux kernel source not configured - missing config.h)
endif
ifneq (,$(findstring egcs-2.91.66, $(shell cat /proc/version)))
CC := kgcc gcc cc
else
CC := gcc cc
endif
test_cc = $(shell which $(cc) > /dev/null 2>&1 && echo $(cc))
CC := $(foreach cc, $(CC), $(test_cc))
CC := $(firstword $(CC))
#CFLAGS += -Wall -DLINUX -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -D__NO_VERSION__ -O2 -pipe
#CFLAGS += -I$(KSRC)/include -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing
#CFLAGS += $(shell [ -f $(KSRC)/include/linux/modversions.h ] && \
# echo "-DMODVERSIONS -include $(KSRC)/include/linux/modversions.h")
EXTRA_CFLAGS += -Wall -DLINUX -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -D__NO_VERSION__ -O2 -pipe
EXTRA_CFLAGS += -I$(KSRC)/include -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing
EXTRA_CFLAGS += $(shell [ -f $(KSRC)/include/linux/modversions.h ] && \
echo "-DMODVERSIONS -include $(KSRC)/include/linux/modversions.h")
.SILENT: $(TARGET) clean
# look for SMP in config.h
#SMP := $(shell $(CC) $(CFLAGS) -E -dM $(CONFIG_FILE) | \
# grep CONFIG_SMP | awk '{ print $$3 }')
SMP := $(shell $(CC) $(EXTRA_CFLAGS) -E -dM $(CONFIG_FILE) | \
grep CONFIG_SMP | awk '{ print $$3 }')
ifneq ($(SMP),1)
SMP := 0
endif
ifeq ($(SMP), 1)
# CFLAGS += -D__SMP__
EXTRA_CFLAGS += -D__SMP__
endif
# check x86_64
SUBARCH := $(shell uname -m)
ifeq ($(SUBARCH),x86_64)
# CFLAGS += -mcmodel=kernel -mno-red-zone
EXTRA_CFLAGS += -mcmodel=kernel -mno-red-zone
endif
$(TARGET): $(filter-out $(TARGET), $(SRC:.c=.o))
$(LD) -r $^ -o $@
echo; echo
echo "**************************************************"
echo "Build options:"
echo " VERSION $(KVER)"
echo -n " SMP "
if [ "$(SMP)" = "1" ]; \
then echo "Enabled"; else echo "Disabled"; fi
endif # ifeq ($(KVER),2.6)
ifeq ($(KVER), 2.6)
install: default
else
install: clean $(TARGET)
endif
mkdir -p $(MOD_ROOT)$(INSTDIR)
install -m 644 -o root $(TARGET) $(MOD_ROOT)$(INSTDIR)
ifeq (,$(MOD_ROOT))
/sbin/depmod -a || true
else
/sbin/depmod -b $(MOD_ROOT) -a || true
endif
uninstall:
rm -f $(INSTDIR)/$(TARGET)
/sbin/depmod -a
clean:
rm -f $(TARGET) $(SRC:.c=.o) *~ *.o
rm -f .*.o.d .*.o.cmd .*.ko.cmd *.mod.c *.mod.o
-include .depend.mak
# TODO: all of these should be removed
EXTRA_CFLAGS += -DLINUX -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -D__NO_VERSION__
EXTRA_CFLAGS += -DHOSTAP
vt6656-y += main_usb.o \
card.o \
mac.o \
baseband.o \
wctl.o \
80211mgr.o \
wcmd.o\
wmgr.o \
bssdb.o \
wpa2.o \
rxtx.o \
dpc.o \
power.o \
datarate.o \
mib.o \
rc4.o \
tether.o \
tcrc.o \
ioctl.o \
hostap.o \
wpa.o \
key.o \
tkip.o \
michael.o \
rf.o \
iwctl.o \
wpactl.o \
aes_ccmp.o \
usbpipe.o \
channel.o \
control.o \
firmware.o \
int.o
obj-$(CONFIG_VT6656) += vt6656.o
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部