kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
	Maik Hentsche <maik.hentsche@amd.com>,
	kvm@vger.kernel.org, "joerg.roedel" <joerg.roedel@amd.com>
Subject: Re: [PATCH] kvm-userspace: fix module build with --kerneldir
Date: Thu, 27 Nov 2008 12:15:04 -0200	[thread overview]
Message-ID: <1227794857-sup-8264@blackpad> (raw)
In-Reply-To: <492D72AA.8050202@redhat.com>

Excerpts from Avi Kivity's message of Qua Nov 26 14:00:42 -0200 2008:
> Jan Kiszka wrote:
> > Avi Kivity wrote:
<snip>
> >> 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).
> >
> >   
> 
> Fair enough.  This seems to work:
> 
>     awk ' / = / { a[$1] = $3 } END { printf("%s.%s.%s%s\n", 
> a["VERSION"], a["PATCHLEVEL"], a["SUBLEVEL"], a["EXTRAVERSION"]) }' 
> "$kerneldir/Makefile"

What if CONFIG_LOCALVERSION is set?

> 
> Or alternatively
> 
>  awk '/Linux kernel version/ { print $NF }' "$kerneldir/.config"

What about `cat "$kerneldir/include/config/kernel.release"`?
-- 
Eduardo

  reply	other threads:[~2008-11-27 14:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25 13:57 [PATCH] kvm-userspace: fix module build with --kerneldir Joerg Roedel
2008-11-26 10:42 ` Avi Kivity
2008-11-26 10:59   ` Maik Hentsche
2008-11-26 11:14     ` Avi Kivity
2008-11-26 12:14       ` Maik Hentsche
2008-11-26 16:03         ` Avi Kivity
2008-11-26 12:16       ` Jan Kiszka
2008-11-26 16:00         ` Avi Kivity
2008-11-27 14:15           ` Eduardo Habkost [this message]
2008-11-27 14:26             ` Avi Kivity
2008-12-01 14:28 ` Maik Hentsche
2008-12-09 15:02   ` Joerg Roedel
2008-12-10 10:06     ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1227794857-sup-8264@blackpad \
    --to=ehabkost@redhat.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=joerg.roedel@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=maik.hentsche@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).