kqemu-kmod port

Ruslan Ermilov ru at FreeBSD.org
Wed Oct 26 13:21:42 PDT 2005


Hi,

On Wed, Oct 26, 2005 at 10:48:39PM +0900, Norikatsu Shigemura wrote:
> Hi ru!
> 
> On Tue, 25 Oct 2005 21:57:59 +0900
> Norikatsu Shigemura <nork at FreeBSD.org> wrote:
> > Hi qemu maintainer and users!
> > 	I want kqemu only port to make buildkernel with PORTS_MODULES.
> > 	I tested that make buildworld PORTS_MODULES=emulators/qemu,
> > 	but no good.  So I decided to make kqemu-kmod port.> 
> > 	If I commit following port, I'll remove kqemu related code
> > 	from emulators/qemu/Makefile and add dependency on kqemu-kmod.
> 
> > 	http://people.freebsd.org/~nork/kqemu-kmod.shar
> 
> 	I'll try to make buildworld with abobe expremental ports:
> 	# make -j1 buildkernel PORTS_MODULES=local/kqemu-kmod
> 
> 	But I contacted a problem like following lines:
> 
> cd ${PORTSDIR:-/usr/ports}/local/kqemu-kmod; SYSDIR= /usr/obj/usr/src/make.i386/make -B all
> ===>  Building for kqemu-kmod-0.7.2
> "/usr/src/share/mk/bsd.kmod.mk", line 12: "can't find kernel source tree"
> *** Error code 1
> 
> Stop in /usr/ports/local/kqemu-kmod.
> *** Error code 1
> 1 error
> *** Error code 2
> 1 error
> *** Error code 2
> 1 error
> 
> 	Do you have any idea for fix?
> 
Warner created this feature only to fit one case: where you build kernel
from its canonical place, /usr/src/sys/<arch>/compile/<KERNEL>, then
${.CURDIR}/../../../ will match the the correct SYSDIR.  The below
patch makes it work in all cases.  If $S is absolute, it's used,
otherwise ${.CURDIR}/$S is used:

# pwd
/usr/obj/usr/src/sys/HAMMER
# make -V S -V PORTSMODULESENV -DPORTS_MODULES
/usr/src/sys
SYSDIR=/usr/src/sys

# pwd
/sys/amd64/compile/GENERIC
# make -V S -V PORTSMODULESENV -DPORTS_MODULES
../../..
SYSDIR=/usr/src/sys/amd64/compile/GENERIC/../../..

%%%
Index: kern.post.mk
===================================================================
RCS file: /home/ncvs/src/sys/conf/kern.post.mk,v
retrieving revision 1.86
diff -u -r1.86 kern.post.mk
--- kern.post.mk	25 Oct 2005 09:05:07 -0000	1.86
+++ kern.post.mk	26 Oct 2005 20:10:52 -0000
@@ -29,11 +29,7 @@
 
 # Handle out of tree ports 
 .if !defined(NO_MODULES) && defined(PORTS_MODULES)
-.for _dir in ${.CURDIR}/../../..
-.if !defined(SYSDIR) && exists(${_dir}/kern/)
-SYSDIR=	${_dir}
-.endif
-.endfor
+SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;}
 PORTSMODULESENV=SYSDIR=${SYSDIR}
 .for __target in all install reinstall clean
 ${__target}: ports-${__target}
%%%


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-emulation/attachments/20051026/4da93cea/attachment.bin


More information about the freebsd-emulation mailing list