My problem lies in the compilation of the driver for the TP Link TF 3200 ethernet card to use on a machine with Ubuntu 12.04 , where I have the files compat .h , crc32.h , ethtool.h , mii.c , mii.h and sundance_main.c .
... and the Makefile file, which is the following:
OBJS = sundance_main.o mii.o
TARGET = sundance.o
MAPPING_MODE= -DUSE_IO_OPS
KernelVersion := 4.4.0-67-generic
KernelBuildDir := /lib/modules/4.4.0-67-generic/build
kernelMisc := /lib/modules/4.4.0-67-generic/kernel/drivers/net/
kernelExtension := $(echo 4.4.0-67-generic) | sed -ne 's/^2\.[567]\..*/k/p')o
kernelFlag26 := kernel2$(echo 4.4.0-67-generic | sed -ne 's/^2\.[6]\..*/6/p')x
EXTRA_CFLAGS+=$(MAPPING_MODE)
all:
$(MAKE) -C $(KernelBuildDir) SUBDIRS=$(PWD) modules
#install:
# install -m 644 -c sundance.$(kernelExtension) $(kernelMisc)
sundance-objs:=$(OBJS)
obj-m+=$(TARGET)
#clean:
# rm -f *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags
After doing sudo make
, I have the following error:
make -C /lib/modules/4.4.0-67-generic/build SUBDIRS= modules
make[1]: se entra en el directorio '/usr/src/linux-headers-4.4.0-67-generic'
make[2]: *** No hay ninguna regla para construir el objetivo
'arch/x86/entry/syscalls/syscall_32.tbl',
necesario para 'arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h'. Alto.
arch/x86/Makefile:199: fallo en las instrucciones para el objetivo 'archheaders'
make[1]: *** [archheaders] Error 2
make[1]: se sale del directorio '/usr/src/linux-headers-4.4.0-67-generic'
Makefile:14: fallo en las instrucciones para el objetivo 'all'
make: *** [all] Error 2