kern/74549: Allow third party KLDs (eg ports) to be rebuilt with the kernel

Daniel J. O'Connor darius at midget.dons.net.au
Tue Nov 30 01:20:31 PST 2004


>Number:         74549
>Category:       kern
>Synopsis:       Allow third party KLDs (eg ports) to be rebuilt with the kernel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 30 09:20:30 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Daniel J. O'Connor
>Release:        FreeBSD 6.0-CURRENT
>Organization:
>Environment:
System: FreeBSD inchoate.localdomain 6.0-CURRENT FreeBSD 6.0-CURRENT #1: Mon Nov 29 21:27:13 CST 2004 darius at inchoate.localdomain:/usr/src/sys/i386/compile/INCHOATE  i386

>Description:
This patch and makefile allow third party KLDs to get rebuilt with the kernel (new and old way).

>How-To-Repeat:
>Fix:

mkdir /usr/local/kld
cd /usr/src
patch </tmp/port-kld.diff
cp /tmp/port-makefile.txt /usr/local/kld/Makefile

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       port-kld.diff
#       port-makefile.txt
#
echo x - port-kld.diff
sed 's/^X//' >port-kld.diff << 'END-of-port-kld.diff'
XIndex: sys/modules/Makefile
X===================================================================
XRCS file: /usr/CVS-Repository/src/sys/modules/Makefile,v
Xretrieving revision 1.410
Xdiff -u -p -r1.410 Makefile
X--- sys/modules/Makefile       16 Nov 2004 17:19:04 -0000      1.410
X+++ sys/modules/Makefile       29 Nov 2004 12:21:58 -0000
X@@ -166,6 +166,7 @@ SUBDIR=    ${_3dfx} \
X       plip \
X       ${_pmc} \
X       portalfs \
X+      ${_ports} \
X       ppbus \
X       ppi \
X       pps \
X@@ -260,6 +261,11 @@ _syscons= syscons
X _ufs=         ufs
X .endif
X
X+PORTSKLD?=    /usr/local/kld
X+.if exists(${PORTSKLD}) && !defined(NO_PORTS_KLDS)
X+_ports=               ../../../../${PORTSKLD}
X+.endif
X+
X .if !defined(NOCRYPT) || defined(ALL_MODULES)
X .if exists(${.CURDIR}/../opencrypto)
X _crypto=      crypto
END-of-port-kld.diff
echo x - port-makefile.txt
sed 's/^X//' >port-makefile.txt << 'END-of-port-makefile.txt'
X# I live in /usr/local/kld/Makefile
X
XSUBDIR!=       /usr/bin/find . -maxdepth 1 -type d \! -name . \! -name CVS | /usr/bin/xargs /bin/echo
X
X.include <bsd.subdir.mk>
X
END-of-port-makefile.txt
exit


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list