|
我用的是atmelwlandriver-3[1].4.1.0.tar.bz2,在rh9下面可以用了,现想移植到at91rm9200上,修改了.config和/src/usb中的makefile,显示出错信息,请大虾指教阿,晕
cc1的第二条错误将arch=arm改为armv4好像就可以了,第1条搞不定:(
出错信息
Building src/usb
make[1]: Entering directory `/HHARM9200/module/atmelwlandriver/src/usb'
for i in rfmdD r505D r505AD r505AMXD r505_2958D; do make $i || exit 1; done
make[2]: Entering directory `/HHARM9200/module/atmelwlandriver/src/usb'
make final CFLAGS:='-D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=arm -I/HHARM9200/linux-2.4.19-rmk7/include -I/HHARM9200/module/atmelwlandriver/src/includes -I/HHARM9200/module/atmelwlandriver/src/includes/usb -DRFMD -DATMEL_WLAN -DUSBDBG' MODULE:='usbvnetr'
make[3]: Entering directory `/HHARM9200/module/atmelwlandriver/src/usb'
/usr/local/arm/2.95.3/bin/arm-linux-gcc -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=arm -I/HHARM9200/linux-2.4.19-rmk7/include -I/HHARM9200/module/atmelwlandriver/src/includes -I/HHARM9200/module/atmelwlandriver/src/includes/usb -DRFMD -DATMEL_WLAN -DUSBDBG -c -o callbacks.o callbacks.c
cc1: Invalid option `preferred-stack-boundary=2'
cc1: bad value (arm) for -march= switch
Assembler messages:
Error: Invalid processor variant -marm
In file included from callbacks.c:29:
/HHARM9200/module/atmelwlandriver/src/includes/usb/FWR.H:72: output pipe has been closed
cpp0: output pipe has been closed
make[3]: *** [callbacks.o] Error 1
make[3]: Leaving directory `/HHARM9200/module/atmelwlandriver/src/usb'
make[2]: *** [rfmdD] Error 2
make[2]: Leaving directory `/HHARM9200/module/atmelwlandriver/src/usb'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/HHARM9200/module/atmelwlandriver/src/usb'
make: *** [all] Error 1
.config内容中修改的地方
# runtime variables. Generated by setup.sh
KERNEL_SRC = /HHARM9200/linux-2.4.19-rmk7
HAS_formS = n
PCMCIA_CONFIG = /etc/pcmcia
PCMCIA_SRC = PCMCIA was not configured
PCI_DES = /HHARM9200/linux-2.4.19-rmk7/drivers/net
PCMCIA_DES = /HHARM9200/linux-2.4.19-rmk7/drivers/pcmcia
USB_DES = /HHARM9200/linux-2.4.19-rmk7/drivers/usb
USB_CONFIG = /etc/hotplug
MAN_PATH = /usr/share/man/man1
NEW_KERN = n
makefile修改
include .lastbuild
include $(TOPDIR)/.config
#ARCH=$(shell uname -m)
ARCH=arm
MODULE := usbvnet.o
CDEBUG := -DUSBDBG
DEFS := -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=$(ARCH)
#conflicted with gcc's < 2.96:-fno-optimize-sibling-calls
USB_DES := $(MODULES_DES)/kernel/drivers/net
CC=/usr/local/arm/2.95.3/bin/arm-linux-gcc
CFLAGS_$(CONFIG_MODVERSIONS):= -DMODULE -DMODVERSIONS -include $(KERNEL_SRC)/include/linux/modversions.h
CFLAGS :=-D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -O2 $(DEFS) -I$(KERNEL_SRC)/include -I$(INC) -I$(INC)/usb
$(CFLAGS_y)
# Add extra compilation flags if under version 2.5 or higher
fws:=$(wildcard external*.h) $(wildcard internal*.h)
srcs := callbacks.c command.c common.o rx.c tx.c vnet.c vnet_kernel.c linux_usb.c
objs := $(srcs:.c=.o)
#objs := $(patsubst %.c,%.o,$(wildcard *.c))
objs := $(patsubst vnetusba.o, ,$(objs))
USB-y:=
USB-$(CONFIG_USB_503A_RFMD) += rfmd$(DEBUG)
USB-$(CONFIG_USB_505) += r505$(DEBUG)
USB-$(CONFIG_USB_505A) += r505A$(DEBUG)
USB-$(CONFIG_USB_505AMX) += r505AMX$(DEBUG)
USB-$(CONFIG_USB_505_295 += r505_2958$(DEBUG)
USB-$(CONFIG_USB_CUSTOMPIDVID) += PidVidC$(DEBUG)
usage:
@echo "Usage is :"
@echo "rfmd for RFMD, rfmdD for rfmd debug version"
@echo "r505 for 505, r505 for 505 debug version"
@echo "r505_2958 for 2958 + 505, r505_2958 for 2958 + 505 debug version"
all:
for i in $(USB-y); do make $$i || exit 1; done
final:$(objs) vnetusba.o
/usr/local/arm/2.95.3/bin/arm-linux-ld -r -o $(OBJDIR)/$(MODULE).o vnetusba.o $(objs)
@nm $(OBJDIR)/$(MODULE).o |sort >../$(patsubst %.o,%.map, $(MODULE).o);
rfmd:
ifneq ($(LB),rfmd)
@make clean
@echo "LB := rfmd" >.lastbuild
endif
make final CFLAGS:='$(CFLAGS) -DRFMD -DATMEL_WLAN' MODULE:='usbvnetr'
rfmdD:
ifneq ($(LB),rfmdD)
@make clean
@echo "LB := rfmdD" >.lastbuild
endif
make final CFLAGS:='$(CFLAGS) -DRFMD -DATMEL_WLAN $(CDEBUG)' MODULE:='usbvnetr'
r505:
ifneq ($(LB),r505)
@make clean
@echo "LB := r505" >.lastbuild
endif
make final CFLAGS:='$(CFLAGS) -DR505 -DATMEL_WLAN' MODULE:='usbvnet5'
r505D:
ifneq ($(LB),r505D)
@make clean
@echo "LB := r505D" >.lastbuild
endif
make final CFLAGS:='$(CFLAGS) -DR505 -DATMEL_WLAN $(CDEBUG)' MODULE:='usbvnet5'
r505AMX:
ifneq ($(LB),r505AMX)
@make clean
@echo "LB := r505AMX" >.lastbuild
endif
make final CFLAGS:='$(CFLAGS) -DR505AMX -DATMEL_WLAN' MODULE:='usbvnet5AMX'
r505AMXD:
ifneq ($(LB),r505AMXD)
@make clean
@echo "LB := r505AMXD" >.lastbuild
endif
make final CFLAGS:='$(CFLAGS) -DR505AMX -DATMEL_WLAN $(CDEBUG)' MODULE:='usbvnet5AMX'
r505A:
ifneq ($(LB),r505A)
@make clean
@echo "LB := r505A" >.lastbuild
endif
make final CFLAGS:='$(CFLAGS) -DR505A -DATMEL_WLAN' MODULE:='usbvnet5A'
r505AD:
ifneq ($(LB),r505AD)
@make clean
@echo "LB := r505AD" >.lastbuild
endif
make final CFLAGS:='$(CFLAGS) -DR505A -DATMEL_WLAN $(CDEBUG)' MODULE:='usbvnet5A'
r505_2958:
ifneq ($(LB),r505_295
@make clean
@echo "LB := r505_2958" >.lastbuild
endif
make final CFLAGS:='$(CFLAGS) -DR505_2958 -DATMEL_WLAN' MODULE:='usbvnet5_2958'
r505_2958D:
ifneq ($(LB),r505_2958D)
@make clean
@echo "LB := r505_2958D" >.lastbuild
endif
make final CFLAGS:='$(CFLAGS) -DR505_2958 -DATMEL_WLAN $(CDEBUG)' MODULE:='usbvnet5_2958'
PidVidC:
ifneq ($(LB),PVC)
@make clean
@echo "LB := PVC" >.lastbuild
endif
make final CFLAGS:='$(CFLAGS) -D$(BoardDefine) -DCUSTOM_PIDVID -DATMEL_WLAN' MODULE:='usbvnetp'
PidVidCD:
ifneq ($(LB),PVCD)
@make clean
@echo "LB := PVCD" >.lastbuild
endif
make final CFLAGS:='$(CFLAGS) -D$(BoardDefine) -DCUSTOM_PIDVID -DATMEL_WLAN $(CDEBUG)' MODULE:='usbvnetp'
clean:
@find . -name '*.o' -o -name '*.map' |xargs rm -f
.lastbuild:
@touch .lastbuild
@echo "LB:=aa" >.lastbuild
#dependencies
$(objs): $(INC)/usb/vnetusba.h
rx.o : $(INC)/usb/rx.h
tx.o : $(INC)/usb/rx.h
callbacks.o : $(INC)/usb/$(fws)
vnetusba.o : vnetusba.c $(INC)/usb/vnetusba.h
ifeq'$(NEW_KERN)' 'y'
$(CC) $(CFLAGS) $(NEWKERNFLAGS) $(KMODNAMEFLAG)$(MODULE) -DMODULE -c vnetusba.c -o vnetusba.o
else
$(CC) $(CFLAGS) -DMODULE -c vnetusba.c
endif |
|