Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Compiling Kernel Module with Current Kernel Options

12 views
Skip to first unread message

cd_fr...@gatorzone.com

unread,
Aug 4, 2004, 3:38:56 PM8/4/04
to
I have an SMP machine, so after installing the GENERIC version of FreeBSD 4.7, I created my own version of the kernel that included SMP support and DDB.

Being a device driver writer, I created my Makefile just as perscribed, but when I compiled my code, the SMP define was not set. It appears that the build process did not include the options found in opt_global.h.

How do you build a driver that includes the proper options? Is there something special I have to do to make these options available to my driver?
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hacke...@freebsd.org"

chuck_...@agilent.com

unread,
Aug 5, 2004, 10:18:15 AM8/5/04
to
On Wed, Aug 04, 2004 at 04:09:22PM -0400, cd_freebsd wrote:
> I have an SMP machine, so after installing the GENERIC version of
> FreeBSD 4.7, I created my own version of the kernel that included
> SMP support and DDB.
>
> Being a device driver writer, I created my Makefile just as
> perscribed, but when I compiled my code, the SMP define was not set.
> It appears that the build process did not include the options found
> in opt_global.h.
>
> How do you build a driver that includes the proper options? Is there
> something special I have to do to make these options available to my
> driver?

I'm not sure what the problem is here, but could it be that the build
is picking up the wrong set of includes? After you built the SMP
kernel, did you copy kernel to / or did you do a make install? I've
built at least a SCSI driver for 4.7 for a SMP machine and don't
remember having to do anything special.

--
Chuck Tuffli <chuck_tuffli AT NO_SPAM agilent DOT com>
Agilent Technologies, Storage Area Networking

cd_fr...@gatorzone.com

unread,
Aug 5, 2004, 10:34:00 AM8/5/04
to
>>
I'm not sure what the problem is here, but could it be that the build is picking up the wrong set of includes? After you built the SMP kernel, did you copy kernel to / or did you do a make install? I've built at least a SCSI driver for 4.7 for a SMP machine and don't remember having to do anything special.
>>

Yes, I did a make install. The system has booted and uname -a shows the kernel was the one I built.

The problem I see is that there is no "-include opt_global.h" in the compile command generated by the bsd.kmod.mk. Even if there was the include, the directory opt_global.h is located is not in the INCLUDE path.

How did your code include and locate opt_global.h?

0 new messages