From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] kvm-userspace: fix module build with --kerneldir Date: Wed, 26 Nov 2008 13:16:35 +0100 Message-ID: <492D3E23.4050106@siemens.com> References: <1227621454-24385-1-git-send-email-joerg.roedel@amd.com> <492D27FA.5090707@redhat.com> <20081126115915.4cf3308d@siegfried> <492D2F85.5050004@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Maik Hentsche , kvm@vger.kernel.org, Joerg Roedel To: Avi Kivity Return-path: Received: from gecko.sbs.de ([194.138.37.40]:19385 "EHLO gecko.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751827AbYKZMSV (ORCPT ); Wed, 26 Nov 2008 07:18:21 -0500 In-Reply-To: <492D2F85.5050004@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > Maik Hentsche wrote: >> Avi Kivity wrote: >> >> >>> Can't the version be determined directly from kernedir itself? e.g. >>> kerneldir is /lib/modules/$version/build? >>> >> >> How do you get $version if you are crosscompiling? In this case the >> usual way of asking uname doesn't work. Instead you somehow need to get >> the version of the kernel you're building for from the kernel source >> provided in --kerneldir. I don't know any better way than evaluating >> UTSRELEASE. >> > > If the user specified $kerneldir, it should be in the form > /lib/modules/$version/build, no? This is not sufficiently generic. KVM should to accept arbitrary paths to kernel directories, not just those special links (which could cause problems anyway if the link is set up for the target and makes no sense on the build host). Jan -- Siemens AG, Corporate Technology, CT SE 2 ES-OS Corporate Competence Center Embedded Linux