Jan Kiszka wrote:
Avi Kivity wrote:
Maik Hentsche wrote:
Avi Kivity <[EMAIL PROTECTED]> 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).
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"
Or alternatively
awk '/Linux kernel version/ { print $NF }' "$kerneldir/.config"
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html