Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2003 13:02:48 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Scott Long <scottl@freebsd.org>, Luoqi Chen <lchen@briontech.com>
Cc:        current@freebsd.org
Subject:   Change to kernel+modules build approach
Message-ID:  <20030814100248.GB88037@sunbay.com>
In-Reply-To: <3F3B43EB.8040900@freebsd.org>
References:  <AHEKICEOIHLOGINAFIINIEDLCBAA.lchen@briontech.com> <3F3B43EB.8040900@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--yEPQxsgoJgBvi8ip
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Aug 14, 2003 at 02:10:19AM -0600, Scott Long wrote:
> Luoqi Chen wrote:
[...]
> >On the other hand, all modules should create all the opt_*.h files
> >it needs when built individually. Add opt_ddb.h to nullfs's Makefile
> >should fix the breakage.
> >
> Our kernel build system isn't set up to handle passing config options
> to modules.  Various solutions to this have been proposed, but nothing
> has appeared yet.  In 5.x, we document that modules will not work with
> PAE.
>=20
How does the below look?  This is basically a more generic implementation
of Luoqi's idea, but for -CURRENT:

%%%
Index: kern.pre.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/src/sys/conf/kern.pre.mk,v
retrieving revision 1.33
diff -u -r1.33 kern.pre.mk
--- kern.pre.mk	30 Jul 2003 22:11:36 -0000	1.33
+++ kern.pre.mk	14 Aug 2003 09:39:30 -0000
@@ -91,6 +91,7 @@
 # them.
=20
 MKMODULESENV=3D	MAKEOBJDIRPREFIX=3D${.OBJDIR}/modules KMODDIR=3D${KODIR}
+MKMODULESENV+=3D	KERNOBJDIR=3D${.OBJDIR}
 .if (${KERN_IDENT} =3D=3D LINT)
 MKMODULESENV+=3D	ALL_MODULES=3DLINT
 .endif
Index: kmod.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/src/sys/conf/kmod.mk,v
retrieving revision 1.139
diff -u -r1.139 kmod.mk
--- kmod.mk	26 Jul 2003 02:27:50 -0000	1.139
+++ kmod.mk	14 Aug 2003 09:42:52 -0000
@@ -241,6 +241,10 @@
 	${KMODUNLOAD} -v ${KMOD}
 .endif
=20
+.if defined(KERNOBJDIR) && !empty(KERNOBJDIR) && exists(${KERNOBJDIR})
+.PATH: ${KERNOBJDIR}
+CFLAGS+=3D	-I${KERNOBJDIR}
+.else
 .for _src in ${SRCS:Mopt_*.h}
 CLEANFILES+=3D	${_src}
 .if !target(${_src})
@@ -248,6 +252,7 @@
 	touch ${.TARGET}
 .endif
 .endfor
+.endif
=20
 MFILES?=3D kern/bus_if.m kern/device_if.m dev/iicbus/iicbb_if.m \
     dev/iicbus/iicbus_if.m isa/isa_if.m \
%%%


Cheers,
--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software Ltd,
ru@FreeBSD.org		FreeBSD committer

--yEPQxsgoJgBvi8ip
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE/O15IUkv4P6juNwoRAs8/AJ9u5HQTBuC/dap/p//YnhXaoMhB7ACgg6p7
4uimBzsGKmU9kkhFd0WKyOM=
=IX+B
-----END PGP SIGNATURE-----

--yEPQxsgoJgBvi8ip--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030814100248.GB88037>