From owner-freebsd-ports@FreeBSD.ORG Fri Jul 13 08:27:52 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE82416A406 for ; Fri, 13 Jul 2007 08:27:52 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.244]) by mx1.freebsd.org (Postfix) with ESMTP id 98C7F13C4B3 for ; Fri, 13 Jul 2007 08:27:52 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so104969anc for ; Fri, 13 Jul 2007 01:27:51 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=F16zucTWNyC4ojU4Q2mn2RFHISYmayFx90MJxzcocAQ2T1cnTETrrb5wAMda+rL5DJrrvig1ktk27Hk2bWmdkuRrL3TEQ+8LFPylXAV5Abr4qhl1oS6WObKUs8z92mzQdJvS4uFzqtfoowwrivGMXbjpqZvZTmIhOSzsdF+3GZE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ar44bfHu+ntEqueYhIFCa5wMEAllgb/zHItOdXoD4bPI5TqKLEMHGGrg8w7nyDxH9OVV29V0Fnj9kOy1LDRDDn+NfPObZQmZKT4KWXJAo7Ek6QCLGskNOZ5UevQAgEZPD58jB94p97gt+hkqRB+DwhnhzC3LXxJgFNl7Lyo5W6I= Received: by 10.100.127.1 with SMTP id z1mr825387anc.1184315271645; Fri, 13 Jul 2007 01:27:51 -0700 (PDT) Received: by 10.100.141.14 with HTTP; Fri, 13 Jul 2007 01:27:51 -0700 (PDT) Message-ID: <790a9fff0707130127v22c7d567rcd52488a8ecb34a1@mail.gmail.com> Date: Fri, 13 Jul 2007 03:27:51 -0500 From: "Scot Hetzel" To: "Craig Boston" , "Juergen Lock" , freebsd-emulation@freebsd.org, freebsd-ports@freebsd.org In-Reply-To: <20070712180750.GB77654@nowhere> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070702203027.GA45302@saturn.kn-bremen.de> <46925324.9010908@freebsd.org> <3bbf2fe10707091140h6cdc7469nac5be03a8c8a60cb@mail.gmail.com> <200707092000.29768.dfr@rabson.org> <200707092149.l69LnXe9023835@saturn.kn-bremen.de> <20070712175252.GA77654@nowhere> <20070712180750.GB77654@nowhere> Cc: Subject: Re: experimental qemu-devel port update, please test! X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2007 08:27:53 -0000 On 7/12/07, Craig Boston wrote: > Aha! The problem isn't that curproc is garbage, but rather that it's > being interpreted wrong. > > struct proc has some extra fields when KSE is #defined. KSE recently > became a kernel option and was put in the DEFAULTS file, so everyone's > kernel has it defined. But kqemu is being compiled without it. > > I compiled with -DKSE and now kqemu works! > > This seems like it would be a common problem for modules compiled > outside the kernel tree. Is there an established way to get the > standard configuration options? > > I'm thinking also about other options like SMP, that for instance > changes the way mutexes work. > Add the following option to the kernel configuration file: # This allows you to actually store this configuration file into # the kernel binary itself, where it may be later read by saying: # strings -n 3 /boot/kernel/kernel | sed -n 's/^___//p' > MYKERNEL # options INCLUDE_CONFIG_FILE # Include this file in kernel Then add the following to the kernel module port: BOOTFILE!= sysctl -n kern.bootfile .if !defined(KOPTION_KSE) . if ${OSVERSION} > 700040 #KOPTION_KSE!= if ${SYSCTL} -b kern.conftxt | grep KSE ; then echo "yes" ; fi KOPTION_KSE!= if config -x ${BOOTFILE} | grep KSE ; then echo "yes" ; fi . else KOPTION_KSE!= if strings -n 3 ${BOOTFILE} | grep KSE ; then echo "yes" ; fi . endif .endif .if ${KOPTION_KSE} == yes CFLAGS+= -DKSE .endif Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slightly bruised.