I have customized a device driver with a new name foo, I also added this directory /usr/src/sys/modules/foo with a proper Makefile:
When I add that device to kernel
I get this error while building:
Am I missing something?
Code:
#$FreeBSD: src/sys/modules/foo/Makefile,v 1
.PATH: ${.CURDIR}/../../dev/e1000
KMOD = if_foo
SRCS = device_if.h bus_if.h pci_if.h opt_inet.h
SRCS += if_foo.c $(SHARED_SRCS)
SHARED_SRCS = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c e1000_manage.c
SHARED_SRCS += e1000_80003es2lan.c e1000_82542.c e1000_82541.c e1000_82543.c
SHARED_SRCS += e1000_82540.c e1000_ich8lan.c e1000_82571.c e1000_osdep.c
SHARED_SRCS += e1000_82575.c e1000_vf.c e1000_mbx.c
CFLAGS += -I${.CURDIR}/../../dev/e1000 -DSMP
# DEVICE_POLLING gives you non-interrupt handling
# not advisable since MSIX gives better results
#CFLAGS += -DDEVICE_POLLING
.include <bsd.kmod.mk>
Code:
device foo
Code:
config: Error: device "foo" is unknown
config: 1 errors
*** Error code 1
1 error
*** Error code 2
1 error