From owner-freebsd-emulation@FreeBSD.ORG Thu Oct 27 13:21:59 2005 Return-Path: X-Original-To: freebsd-emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FBB016A41F; Thu, 27 Oct 2005 13:21:59 +0000 (GMT) (envelope-from nork@FreeBSD.org) Received: from sakura.ninth-nine.com (sakura.ninth-nine.com [219.127.74.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1FF543D46; Thu, 27 Oct 2005 13:21:58 +0000 (GMT) (envelope-from nork@FreeBSD.org) Received: from nadesico.ninth-nine.com (nadesico.ninth-nine.com [219.127.74.122]) by sakura.ninth-nine.com (8.13.3/8.13.3/NinthNine) with ESMTP id j9RDLvjn039995; Thu, 27 Oct 2005 22:21:57 +0900 (JST) (envelope-from nork@FreeBSD.org) Date: Thu, 27 Oct 2005 22:21:57 +0900 From: Norikatsu Shigemura To: Ruslan Ermilov Message-Id: <20051027222157.91ce56cf.nork@FreeBSD.org> In-Reply-To: <20051026201745.GB68470@ip.net.ua> References: <20051025215759.25681b85.nork@FreeBSD.org> <20051026224839.bfa3920b.nork@FreeBSD.org> <20051026201745.GB68470@ip.net.ua> X-Mailer: Sylpheed version 2.1.4 (GTK+ 2.6.10; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (sakura.ninth-nine.com [219.127.74.121]); Thu, 27 Oct 2005 22:21:57 +0900 (JST) Cc: freebsd-emulation@FreeBSD.org, imp@FreeBSD.org, nork@FreeBSD.org Subject: Re: kqemu-kmod port X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2005 13:21:59 -0000 On Wed, 26 Oct 2005 23:17:45 +0300 Ruslan Ermilov wrote: > > > 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 > > 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//compile/, 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/../../.. Wow! I confirmed that your patch is good works. # make -j1 buildkernel PORTS_MODULES=local/kqemu-kmod : cd ${PORTSDIR:-/usr/ports}/local/kqemu-kmod; SYSDIR=/usr/src/sys /usr/obj/usr/src/make.i386/make -B all : # make installkernel PORTS_MODULES=local/kqemu-kmod : cd ${PORTSDIR:-/usr/ports}/local/kqemu-kmod; SYSDIR=/usr/src/sys /usr/obj/usr/src/make.i386/make -B deinstall deinstall reinstall ===> Deinstalling for emulators/kqemu-kmod ===> kqemu-kmod not installed, skipping ===> Installing for kqemu-kmod-0.7.2 ===> Generating temporary packing list ===> Checking if emulators/kqemu-kmod already installed install -o root -g wheel -m 555 kqemu.ko /boot/kernel kldxref /boot/kernel if mount |/usr/bin/grep ^devfs >/dev/null ; then : ; else if [ ! -e /dev/kqemu ]; then mknod /dev/kqemu c 250 0 ; fi ; /bin/chmod 666 /dev/kqemu ; fi ===> Registering installation for kqemu-kmod-0.7.2 # > %%% > 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} > %%% Thank you. Please commit this patch:-).