# compile ndis driver into PAE kernel (NO_MODULES=YES)



## fbsduser (Jan 13, 2013)

Hi. I finally got the HP Pavilion G4-1065la wifi working with ndis. But now I would like to know if it is possible to compile the ndis driver and wrapped windows wifi driver directly into the kernel. I ask because I'm trying to compile a PAE-enabled kernel and I need to compile it with the "NO_MODULES=yes" option because without it the "make buildkernel" fails in aha.c line 849 and using "nodevice aha" in the config file doesn't help since it tries building the aha module and fails.
My kernel config file is this http://pastebin.com/YVBL0Cs5


----------



## fbsduser (Jan 14, 2013)

is it impossible?


----------



## kpa (Jan 14, 2013)

You can exclude single modules using WITHOUT_MODULES in /etc/make.conf.


```
WITHOUT_MODULES=aha
```


----------



## SirDice (Jan 14, 2013)

Any reason you're using PAE and not amd64?


----------



## wblock@ (Jan 14, 2013)

I thought ndis(4)-based modules could not be built into the kernel.


----------



## fbsduser (Jan 16, 2013)

SirDice said:
			
		

> Any reason you're using PAE and not amd64?


The acpi implementation in my laptop's BIOS is very unstable in the amd64 version of freebsd and the only reliable wifi driver is a win98 one I found (the winxp one's cause random kernel panics). The whole ndis thing is preciselly because the laptop won't accept any wifi card that is not in the BIOS whitelist (the only one in that whitelist is the broadcom 4313abgn card the PC came with), and PAE because I got 8GB of RAM.



			
				kpa said:
			
		

> You can exclude single modules using WITHOUT_MODULES in /etc/make.conf.
> 
> ```
> WITHOUT_MODULES=aha
> ```


Can I put a list of modules in that line, or you need to have a separate 
	
	



```
WITHOUT_MODULES=
```
 line for each module you need to exclude. Also does it work without having to use the 
	
	



```
MODULE_OVERRIDE=
```
 parameter before the 
	
	



```
WITHOUT_MODULES=
```
 one?


----------



## kpa (Jan 16, 2013)

The MODULE_OVERRIDE overrides the whole list of modules to build, only the listed modules are built. You don't need it for your purposes if you want to exclude just a few modules.

You can add more modules to WITHOUT_MODULES. This would exclude the aha(4) and the  ahc(4) modules from being built:


```
WITHOUT_MODULES=aha ahc
```

This is documented in make.conf(5).


----------



## Terry_Kennedy (Jan 19, 2013)

fbsduser said:
			
		

> The whole ndis thing is preciselly because the laptop won't accept any wifi card that is not in the BIOS whitelist (the only one in that whitelist is the broadcom 4313abgn card the PC came with


Let me guess, HP?

I don't know if you want to bother with it, but there are various tutorials for modifying the BIOS to add other cards to the whitelist. I did that on the last HP I bought, back in 2006 or so. That's one of the reasons I don't buy HP any more.


----------

