2003-12-11 22:38:14 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2003-12-11 23:22:44 +00:00
|
|
|
.PATH: ${.CURDIR}/../../sys/compat/ndis
|
2003-12-11 22:38:14 +00:00
|
|
|
|
|
|
|
PROG= ndiscvt
|
|
|
|
SRCS= ndiscvt.c
|
|
|
|
SRCS+= subr_pe.c
|
|
|
|
SRCS+= inf.c inf-token.l inf-parse.y y.tab.h
|
|
|
|
|
2004-09-26 09:25:03 +00:00
|
|
|
MAN= ndiscvt.8
|
Throw the switch on the new driver generation/loading mechanism. From
here on in, if_ndis.ko will be pre-built as a module, and can be built
into a static kernel (though it's not part of GENERIC). Drivers are
created using the new ndisgen(8) script, which uses ndiscvt(8) under
the covers, along with a few other tools. The result is a driver module
that can be kldloaded into the kernel.
A driver with foo.inf and foo.sys files will be converted into
foo_sys.ko (and foo_sys.o, for those who want/need to make static
kernels). This module contains all of the necessary info from the
.INF file and the driver binary image, converted into an ELF module.
You can kldload this module (or add it to /boot/loader.conf) to have
it loaded automatically. Any required firmware files can be bundled
into the module as well (or converted/loaded separately).
Also, add a workaround for a problem in NdisMSleep(). During system
bootstrap (cold == 1), msleep() always returns 0 without actually
sleeping. The Intel 2200BG driver uses NdisMSleep() to wait for
the NIC's firmware to come to life, and fails to load if NdisMSleep()
doesn't actually delay. As a workaround, if msleep() (and hence
ndis_thsuspend()) returns 0, use a hard DELAY() to sleep instead).
This is not really the right thing to do, but we can't really do much
else. At the very least, this makes the Intel driver happy.
There are probably other drivers that fail in this way during bootstrap.
Unfortunately, the only workaround for those is to avoid pre-loading
them and kldload them once the system is running instead.
2005-04-24 20:21:22 +00:00
|
|
|
MAN+= ndisgen.8
|
2003-12-11 22:38:14 +00:00
|
|
|
|
2004-02-23 20:25:27 +00:00
|
|
|
WARNS?= 4
|
2011-12-17 22:16:27 +00:00
|
|
|
NO_WCAST_ALIGN=
|
2003-12-11 22:38:14 +00:00
|
|
|
|
2014-11-25 16:57:27 +00:00
|
|
|
LIBADD= l
|
2003-12-11 22:38:14 +00:00
|
|
|
|
|
|
|
YFLAGS+=-v
|
|
|
|
|
2003-12-18 03:52:40 +00:00
|
|
|
CFLAGS+=-I. -I${.CURDIR} -I${.CURDIR}/../../sys
|
2003-12-11 22:38:14 +00:00
|
|
|
|
|
|
|
CLEANFILES= y.output
|
|
|
|
|
Throw the switch on the new driver generation/loading mechanism. From
here on in, if_ndis.ko will be pre-built as a module, and can be built
into a static kernel (though it's not part of GENERIC). Drivers are
created using the new ndisgen(8) script, which uses ndiscvt(8) under
the covers, along with a few other tools. The result is a driver module
that can be kldloaded into the kernel.
A driver with foo.inf and foo.sys files will be converted into
foo_sys.ko (and foo_sys.o, for those who want/need to make static
kernels). This module contains all of the necessary info from the
.INF file and the driver binary image, converted into an ELF module.
You can kldload this module (or add it to /boot/loader.conf) to have
it loaded automatically. Any required firmware files can be bundled
into the module as well (or converted/loaded separately).
Also, add a workaround for a problem in NdisMSleep(). During system
bootstrap (cold == 1), msleep() always returns 0 without actually
sleeping. The Intel 2200BG driver uses NdisMSleep() to wait for
the NIC's firmware to come to life, and fails to load if NdisMSleep()
doesn't actually delay. As a workaround, if msleep() (and hence
ndis_thsuspend()) returns 0, use a hard DELAY() to sleep instead).
This is not really the right thing to do, but we can't really do much
else. At the very least, this makes the Intel driver happy.
There are probably other drivers that fail in this way during bootstrap.
Unfortunately, the only workaround for those is to avoid pre-loading
them and kldload them once the system is running instead.
2005-04-24 20:21:22 +00:00
|
|
|
FILES= windrv_stub.c
|
2015-10-27 23:35:02 +00:00
|
|
|
FILESDIR= ${SHAREDIR}/misc
|
Throw the switch on the new driver generation/loading mechanism. From
here on in, if_ndis.ko will be pre-built as a module, and can be built
into a static kernel (though it's not part of GENERIC). Drivers are
created using the new ndisgen(8) script, which uses ndiscvt(8) under
the covers, along with a few other tools. The result is a driver module
that can be kldloaded into the kernel.
A driver with foo.inf and foo.sys files will be converted into
foo_sys.ko (and foo_sys.o, for those who want/need to make static
kernels). This module contains all of the necessary info from the
.INF file and the driver binary image, converted into an ELF module.
You can kldload this module (or add it to /boot/loader.conf) to have
it loaded automatically. Any required firmware files can be bundled
into the module as well (or converted/loaded separately).
Also, add a workaround for a problem in NdisMSleep(). During system
bootstrap (cold == 1), msleep() always returns 0 without actually
sleeping. The Intel 2200BG driver uses NdisMSleep() to wait for
the NIC's firmware to come to life, and fails to load if NdisMSleep()
doesn't actually delay. As a workaround, if msleep() (and hence
ndis_thsuspend()) returns 0, use a hard DELAY() to sleep instead).
This is not really the right thing to do, but we can't really do much
else. At the very least, this makes the Intel driver happy.
There are probably other drivers that fail in this way during bootstrap.
Unfortunately, the only workaround for those is to avoid pre-loading
them and kldload them once the system is running instead.
2005-04-24 20:21:22 +00:00
|
|
|
|
|
|
|
SCRIPTS= ndisgen.sh
|
|
|
|
|
2003-12-11 22:38:14 +00:00
|
|
|
.include <bsd.prog.mk>
|