[oe] [PATCH 1/2] glibc-package: fix kernel version passed to qemu

Roman I Khimov khimov at altell.ru
Fri May 15 19:12:04 UTC 2009


On Friday 15 May 2009 21:58:09 Phil Blundell wrote:
> On Fri, 2009-05-15 at 21:46 +0400, Roman I Khimov wrote:
> > On Friday 15 May 2009 19:26:26 Tom Rini wrote:
> > > On Fri, May 15, 2009 at 04:34:08PM +0400, Roman I Khimov wrote:
> > > > Binary locale generation fails with
> > > >
> > > > FATAL: kernel too old
> > > >
> > > > if glibc is configured for kernels newer then 2.6.16.
> > > >
> > > > Fix qemu "-r" parameter to match OLDEST_KERNEL.
> > >
> > > Just to be sure, this is happy with 2.4.0 too, right?
> >
> > Hmmm. It's untested on 2.4, obviously. But OLDEST_KERNEL is the kernel
> > glibc built against, so whatever it is, it should be a perfect match.
>
> Do you know what the reason is for passing this -r parameter in the
> first place?  It seems like we should just be letting qemu use the most
> recent kernel emulation that it knows about, since a glibc compiled
> against any given kernel version should always run with newer versions.

It was brought by commit f4f7920d6131d1245436783139e3a77581d6264f, with the 
message of

=============================================================================
glibc-package.bbclass: Add supersecret -r switch to qemu userspace emulator,
which allows to override kernel version report to guest apps (otherwise,
host kernel version is used, which causes "Kernel too old" errors in glibc
startup code in guess, if host kernel is older than 2.6.14-something).
Tested with qemu 0.8.2 (and yes, I couldn't find -r switch in qemu doc,
taken from a mail by Paul Brook, qemu co-maintainer).
=============================================================================

If I understand this correctly the problem is that glibc checks kernel version 
and if that's older than the version glibc compiled against (--enable-
kernel=...), it fails with "kernel too old" (see sysdeps/unix/sysv/linux/dl-
osinfo.h).

But there is no magic 2.6.14 or 2.6.16 or whatever, and the goal is really not 
to set the latest version (which you'll need to bump every time new release 
goes out), but anything that glibc would agree to work with. Sure enough it 
will agree to work with the version it's been built against.




More information about the Openembedded-devel mailing list