Unable to locate the kernel source tree. Set SYSDIR...

mxc

Member

Reaction score: 1
Messages: 28

Hi there,

I am trying to create a module via ndisgen(8) for the RTL8192CE PCI Express wireless card. I have extracted the .inf and .sys files from the Windows driver. When I run ndisgen, I get to the kernel module generation stage and it fails with:
Code:
Building kernel module... make: "/usr/share/mk/bsd.kmod.mk" line 12: Unable to locate the kernel source tree. Set SYSDIR to override.
build failed. Exiting.
I created a directory /usr/src and did: svn checkout [NOPARSE]http://svn.freebsd.org/base/release/10.1.0/[/NOPARSE].

I still get the error. I tried set SYSDIR=/usr/src/10.1.0 and setenv SYSDIR /usr/src/10.1.0 with no luck. Not sure what else to try.

Thanks
 

kpa

Beastie's Twin

Reaction score: 1,806
Messages: 6,318

Hi there,

I am trying to create an module via ndisgen(8) for the RTL8192CE PCI Express wireless card. I have extracted the .inf and .sys files from the Windows driver. When I run ndisgen I get to the kernel module generation stage and it fails with:
Code:
Building kernel module... make: "/usr/share/mk/bsd.kmod.mk" line 12: Unable to locate the kernel source tree. Set SYSDIR to override.
build failed. Exiting.
I created a directory /usr/src and did: svn checkout [url]http://svn.freebsd.org/base/release/10.1.0/[/url]. I still get the error. I tried set SYSDIR=/usr/src/10.1.0 and setenv SYSDIR /usr/src/10.1.0 with no luck. Not sure what else to try.

Thanks
Delete what you have now under /usr/src with rm -rf /usr/src and do this instead:

svnlite checkout https://svn0.us-west.freebsd.org/base/releng/10.1 /usr/src

Use svn0.eu.freebsd.org mirror if you're in Europe or the svn0.us-east.freebsd.org mirror if in east coast USA.

You really don't want to use the release/10.1.0 branch because it will never get any security or errata updates, the releng/10.1 is the correct one for 10.1-RELEASE.
 
  • Thanks
Reactions: mxc
OP
OP
mxc

mxc

Member

Reaction score: 1
Messages: 28

Thanks kpa. I removed the old src directory and checked out the copy from the URL provided. I still get:
Code:
Building kernel module... make: "/usr/share/mk/bsd.kmod.mk" line 12: Unable to locate the kernel source tree. Set SYSDIR to override.
build failed. Exiting."
…when running ndisgen(8). I have defined SYSDIR with set SYSDIR=/path/to/10.1 and setenv SYSDIR /path/to/10.1.

Any help appreciated.

Thanks.
 
Top