ndiscvt.8 (130420) | ndiscvt.8 (132973) |
---|---|
1.\" Copyright (c) 2003 2.\" Bill Paul <wpaul@windriver.com> All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 14 unchanged lines hidden (view full) --- 23.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 29.\" THE POSSIBILITY OF SUCH DAMAGE. 30.\" | 1.\" Copyright (c) 2003 2.\" Bill Paul <wpaul@windriver.com> All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 14 unchanged lines hidden (view full) --- 23.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 29.\" THE POSSIBILITY OF SUCH DAMAGE. 30.\" |
31.\" $FreeBSD: head/usr.sbin/ndiscvt/ndiscvt.8 130420 2004-06-13 18:03:44Z ru $ | 31.\" $FreeBSD: head/usr.sbin/ndiscvt/ndiscvt.8 132973 2004-08-01 20:04:31Z wpaul $ |
32.\" 33.Dd December 10, 2003 34.Dt NDISCVT 8 35.Os 36.Sh NAME 37.Nm ndiscvt 38.Nd convert 39.Tn Windows\[rg] 40NDIS drivers for use with 41.Fx 42.Sh SYNOPSIS 43.Nm | 32.\" 33.Dd December 10, 2003 34.Dt NDISCVT 8 35.Os 36.Sh NAME 37.Nm ndiscvt 38.Nd convert 39.Tn Windows\[rg] 40NDIS drivers for use with 41.Fx 42.Sh SYNOPSIS 43.Nm |
44.Op Fl O |
|
44.Op Fl i Ar inffile 45.Fl s Ar sysfile 46.Op Fl n Ar devname 47.Op Fl o Ar outfile | 45.Op Fl i Ar inffile 46.Fl s Ar sysfile 47.Op Fl n Ar devname 48.Op Fl o Ar outfile |
49.Nm 50.Op Fl f Ar firmfile |
|
48.Sh DESCRIPTION 49The 50.Nm 51utility transforms a 52.Tn Windows\[rg] 53NDIS driver into a data file which 54is used to build an 55.Xr ndis 4 --- 83 unchanged lines hidden (view full) --- 139is a single dash 140.Pq Sq Fl , 141the data will be written to the standard output. 142The 143.Pa if_ndis.c 144module expects to find the driver data in a file called 145.Pa ndis_driver_data.h , 146so it is recommended that this name be used. | 51.Sh DESCRIPTION 52The 53.Nm 54utility transforms a 55.Tn Windows\[rg] 56NDIS driver into a data file which 57is used to build an 58.Xr ndis 4 --- 83 unchanged lines hidden (view full) --- 142is a single dash 143.Pq Sq Fl , 144the data will be written to the standard output. 145The 146.Pa if_ndis.c 147module expects to find the driver data in a file called 148.Pa ndis_driver_data.h , 149so it is recommended that this name be used. |
150.It Fl O 151Generate both an 152.Pa ndis_driver_data.h 153file and 154an 155.Pa ndis_driver.data.o 156file. The latter file will contain a copy of the 157.Tn Windows\[rg] 158.Pa .SYS 159driver image encoded as a 160.Fx 161ELF object file 162.Po 163created with 164.Xr objcopy 1 165.Pc . 166Turning the 167.Tn Windows\[rg] 168driver image directly into an object code file saves disk space 169and compilation time. 170.It Fl f Ar firmfile 171A few NDIS drivers come with additional files that the core 172driver module will load during initialization time. Typically, 173these files contain firmware which the driver will transfer to 174the device in order to make it fully operational. In 175.Tn Windows\[rg] , 176these files are usually just copied into one of the system 177directories along with the driver itself. 178.Pp 179In 180.Fx 181there are two mechanism for loading these files. If the driver 182is built as a loadable kernel module which is loaded after the 183kernel has finished booting 184.Po 185and after the root filesystem has 186been mounted 187.Pc , 188the extra files can simply be copied to the 189.Pa /compat/ndis 190directory, and they will be loaded into the kernel on demand when the 191the driver needs them. 192.Pp 193If however the driver is required to bootstrap the system 194.Po 195i.e. if 196the NDIS-based network interface is to be used for diskless/PXE 197booting 198.Pc , 199the files need to be pre-loaded by the bootstrap 200loader in order to be accessible, since the driver will need them 201before the root filesystem has been mounted. However, the bootstrap 202loader is only able to load files that are shared 203.Fx 204binary objects. 205.Pp 206The 207.Fl f 208flag can be used to convert an arbitrary file 209.Ar firmfile 210into shared object format 211.Po 212the actual conversion is done using 213the 214.Xr objcopy 1 215and 216.Xr ld 1 217commands 218.Pc . 219The resulting files can then be copied to the 220.Pa /boot/kernel 221directory, and can be pre-loaded directly from the boot loader 222prompt, or automatically by editing the 223.Xr loader.conf 5 224file. If desired, the files can also be loaded into memory 225at runtime using the 226.Xr kldload 8 227command. 228.Pp 229When an NDIS driver tries to open an external file, the 230.Xr ndisapi 9 231code will first search for a loaded kernel module that matches the 232name specified in the open request, and if that fails, it will then 233try to open the file from the 234.Pa /compat/ndis 235directory as well. Note that during kernel bootstrap, the ability 236to open files from 237.Pa /compat/ndis 238is disabled: only the module search will be performed. 239.Pp 240When using the 241.Fl f 242flag, 243.Nm 244will generate both a relocatable object file 245.Po 246with a 247.Pa .o 248extension 249.Pc 250and a shared object file 251.Po 252with a 253.Pa .ko 254extension 255.Pc 256. The shared object is the one that should be placed in 257the 258.Pa /boot/kernel 259directory. The relocatable object file is useful if the user wishes 260to create a completely static kernel image: the object file can be 261linked into the kernel directly along with the driver itself. Some 262editing of the kernel configuration files will be necessary in order 263to have the extra object included in the build. |
|
147.El 148.Sh SEE ALSO | 264.El 265.Sh SEE ALSO |
266.Xr kldload 8 , 267.Xr ld 1 , |
|
149.Xr ndis 4 , | 268.Xr ndis 4 , |
150.Xr ndisapi 9 | 269.Xr ndisapi 9 , 270.Xr objcopy 1 |
151.Sh HISTORY 152The 153.Nm 154utility first appeared in 155.Fx 5.3 . 156.Sh AUTHORS 157.An -nosplit 158The 159.Nm 160utility was written by 161.An Bill Paul Aq wpaul@windriver.com . 162The 163.Xr lex 1 164and 165.Xr yacc 1 166.Pa INF 167file parser was written by 168.An Matthew Dodd Aq mdodd@FreeBSD.org . | 271.Sh HISTORY 272The 273.Nm 274utility first appeared in 275.Fx 5.3 . 276.Sh AUTHORS 277.An -nosplit 278The 279.Nm 280utility was written by 281.An Bill Paul Aq wpaul@windriver.com . 282The 283.Xr lex 1 284and 285.Xr yacc 1 286.Pa INF 287file parser was written by 288.An Matthew Dodd Aq mdodd@FreeBSD.org . |