Skip to contentSkip to conversation

Roman I Khimov : (e)glibc-package: fix kernel version passed to qemu

oe-commits New Florian Boor 8 participants 30 messages May 18, 2009 – May 19, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi,

Review

Quoted 5 lines · GIT User account
(quoted diff) +5 -0
+		kernel_ver = bb.data.getVar("OLDEST_KERNEL", d, 1)
+		if kernel_ver is None:
+			qemu = "qemu-%s  -s 1048576" % target_arch
+		else:
+			qemu = "qemu-%s  -s 1048576 -r %s" % (target_arch, kernel_ver)

are you sure this is a good idea?
OLDEST_KERNEL defaults to "2.4.0", so this change is likely to break locale generation for every machine that doesn't have OLDEST_KERNEL set.

Greetings

Florian

Signature · 5 lines
The dream of yesterday                  Florian Boor
is the hope of today                    Tel: +49 271-771091-15
and the reality of tomorrow.            Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904]        [email protected]
                                        http://www.kernelconcepts.de/en
#2 lore raw
Quoted 12 lines · On Monday 18 May 2009 16:15:33 Florian Boor wrote:

Hi,

Review

Quoted 5 lines · GIT User account
(quoted diff) +5 -0
+		kernel_ver = bb.data.getVar("OLDEST_KERNEL", d, 1)
+		if kernel_ver is None:
+			qemu = "qemu-%s  -s 1048576" % target_arch
+		else:
+			qemu = "qemu-%s  -s 1048576 -r %s" % (target_arch, kernel_ver)

are you sure this is a good idea?
OLDEST_KERNEL defaults to "2.4.0", so this change is likely to break locale generation for every machine that doesn't have OLDEST_KERNEL set.

I've not heard yet of this really breaking something. And frankly I don't see any reason for that. If it actually does - feel free to shout and scream of course, we'll think how to handle it better.

#3 lore raw
Quoted 14 lines · Roman I Khimov
Quoted 12 lines · On Monday 18 May 2009 16:15:33 Florian Boor wrote:

Hi,

Review

Quoted 5 lines · GIT User account
(quoted diff) +5 -0
+		kernel_ver = bb.data.getVar("OLDEST_KERNEL", d, 1)
+		if kernel_ver is None:
+			qemu = "qemu-%s  -s 1048576" % target_arch
+		else:
+			qemu = "qemu-%s  -s 1048576 -r %s" % (target_arch, kernel_ver)

are you sure this is a good idea?
OLDEST_KERNEL defaults to "2.4.0", so this change is likely to break locale generation for every machine that doesn't have OLDEST_KERNEL set.

Quoted 3 lines

I've not heard yet of this really breaking something. And frankly I don't see any reason for that. If it actually does - feel free to shout and scream of course, we'll think how to handle it better.

I guess it'd break on targets where OLDEST_KERNEL isn't set (and hence defaults to 2.4.0) but you need a kernel newer than 2.4.0 for correct operation. Presumably all ARM EABI targets fall into that latter category, since the TLS syscalls weren't in 2.4.x, and there might be some others where glibc's default setting for --enable-kernel is something newer than 2.4.0.

All in all I'd be happier with this change if it enforced a minimum kernel version of 2.6.16 (i.e. what it used to be) so that there is no possibility of versions going backwards for any target.

Incidentally, if there is a default value for OLDEST_KERNEL in bitbake.conf then checking the retrieved value against None seems fairly futile since that will never be true.

p.

#4 lore raw
Quoted 20 lines · On Monday 18 May 2009 17:41:29 Phil Blundell wrote:
Quoted 15 lines · Roman I Khimov
Quoted 13 lines · On Monday 18 May 2009 16:15:33 Florian Boor wrote:

Hi,

Review

Quoted 5 lines · GIT User account
(quoted diff) +5 -0
+		kernel_ver = bb.data.getVar("OLDEST_KERNEL", d, 1)
+		if kernel_ver is None:
+			qemu = "qemu-%s  -s 1048576" % target_arch
+		else:
+			qemu = "qemu-%s  -s 1048576 -r %s" % (target_arch, kernel_ver)

are you sure this is a good idea?
OLDEST_KERNEL defaults to "2.4.0", so this change is likely to break locale generation for every machine that doesn't have OLDEST_KERNEL set.

Quoted 3 lines

I've not heard yet of this really breaking something. And frankly I don't see any reason for that. If it actually does - feel free to shout and scream of course, we'll think how to handle it better.

Quoted 6 lines

I guess it'd break on targets where OLDEST_KERNEL isn't set (and hence defaults to 2.4.0) but you need a kernel newer than 2.4.0 for correct operation. Presumably all ARM EABI targets fall into that latter category, since the TLS syscalls weren't in 2.4.x, and there might be some others where glibc's default setting for --enable-kernel is something newer than 2.4.0.

If any target device requires kernel version not less then $SMTH, it must set it via OLDEST_KERNEL, isn't it? So if target device doesn't specify any OLDEST_KERNEL, it should be OK with 2.4.0. And then if glibc is configured for 2.4.0 it either runs on host's 2.6.smth or not (presumably runs fine), regardless of what it thinks about the kernel version. Or am I missing something?

Quoted 3 lines

Incidentally, if there is a default value for OLDEST_KERNEL in bitbake.conf then checking the retrieved value against None seems fairly futile since that will never be true.

Well, things happen. We can change it to

if kernel_ver is None:
bb.fatal("Your config is completely broken")
...

of course.

#5 lore raw
Quoted 2 lines · Roman I Khimov

If any target device requires kernel version not less then $SMTH, it must set it via OLDEST_KERNEL, isn't it?

No, this has never previously been a constraint. ${OLDEST_KERNEL} exists as a hint to say "there is no need to include support for kernels older than this one", but it doesn't necessarily work the other way
around: there is no guarantee that ${OLDEST_KERNEL} is actually a sufficient version for correct operation.

If OLDEST_KERNEL were to be interpreted more widely, as you propose, it would not make much sense to have a global default of 2.4.0 since there are all kinds of targets that won't run with such an old version.

p.

#6 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

Quoted 9 lines · On Monday 18 May 2009 18:40:03 Phil Blundell wrote:
Quoted 2 lines · Roman I Khimov

If any target device requires kernel version not less then $SMTH, it must set it via OLDEST_KERNEL, isn't it?

No, this has never previously been a constraint. ${OLDEST_KERNEL} exists as a hint to say "there is no need to include support for kernels older than this one", but it doesn't necessarily work the other way
around: there is no guarantee that ${OLDEST_KERNEL} is actually a sufficient version for correct operation.

That seems strange to me.

I've tried locale generation for qemuarm that doesn't set any OLDEST_KERNEL and it really is broken with

FATAL: kernel too old

The problem is, glibc configuration started with "--enable-kernel=2.4.0" gets reconfigured to 2.6.14:

checking installed Linux kernel header files... 2.0.10 or later
configure: WARNING: minimum kernel version reset to 2.6.14 checking for kernel header at least 2.6.14... ok

and the reason is in ports/sysdeps/unix/sysv/linux/arm/eabi/configure.in.

ARM EABI has highest requirements, m68k wants at least 2.6.10, then sparc/sparc64 wants 2.4.21 and then hppa and ppc/ppc64 wants 2.4.19. Anything else is OK with 2.4.0.

Now, I think that this should be fixed on target level. OLDEST_KERNEL should be something sane. Global 2.4.0 from bitbake.conf is good enough for most targets, but if we know that none of ARM EABI works with kernel versions prior to 2.6.14, we should set OLDEST_KERNEL to 2.6.14 for that targets. Or higher, of course, if target needs/wants that. If that's OK with all, I'm doing a patch.

#7 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

Quoted 6 lines · Roman I Khimov

Now, I think that this should be fixed on target level. OLDEST_KERNEL should be something sane. Global 2.4.0 from bitbake.conf is good enough for most targets, but if we know that none of ARM EABI works with kernel versions prior to 2.6.14, we should set OLDEST_KERNEL to 2.6.14 for that targets. Or higher, of course, if target needs/wants that. If that's OK with all, I'm doing a patch.

I'm still not convinced this is either practical or desirable. The kernel versions you mentioned are the minimum required for the particular version of glibc you were looking at, but different libcs or different versions of the same libc will have different minimum kernel requirements even for the same target. (As an obvious example, the m68k port has been supported in glibc since its inception and clearly didn't require a 2.6.18 kernel to start with.)

I think it would be better to leave the semantics of OLDEST_KERNEL alone and just teach qemu to use either the same __LINUX_KERNEL_VERSION as glibc's configure script has settled on, or (perhaps better) just the newest version that it supports for the given target.

p.

#8 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

Quoted 8 lines · Phil Blundell
Quoted 6 lines · Roman I Khimov

Now, I think that this should be fixed on target level. OLDEST_KERNEL should be something sane. Global 2.4.0 from bitbake.conf is good enough for most targets, but if we know that none of ARM EABI works with kernel versions prior to 2.6.14, we should set OLDEST_KERNEL to 2.6.14 for that targets. Or higher, of course, if target needs/wants that. If that's OK with all, I'm doing a patch.

Quoted 7 lines

I'm still not convinced this is either practical or desirable. The kernel versions you mentioned are the minimum required for the particular version of glibc you were looking at, but different libcs or different versions of the same libc will have different minimum kernel requirements even for the same target. (As an obvious example, the m68k port has been supported in glibc since its inception and clearly didn't require a 2.6.18 kernel to start with.)

The other thing to say about OLDEST_KERNEL is that it was intended to be controlled by the DISTRO, not by the MACHINE. In other words, it's a policy control ("kernel x.xx is the earliest one we care about; it's okay to omit the compatibility bits for older ones") and not a target attribute ("kernel x.xx is the minimum required for correct functionality"). We don't currently have a variable with the latter semantics and nor am I very convinced that it would be a good idea to introduce one.

p.

#9 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

Quoted 17 lines · On Monday 18 May 2009 23:37:09 Phil Blundell wrote:
Quoted 8 lines · Phil Blundell
Quoted 6 lines · Roman I Khimov

Now, I think that this should be fixed on target level. OLDEST_KERNEL should be something sane. Global 2.4.0 from bitbake.conf is good enough for most targets, but if we know that none of ARM EABI works with kernel versions prior to 2.6.14, we should set OLDEST_KERNEL to 2.6.14 for that targets. Or higher, of course, if target needs/wants that. If that's OK with all, I'm doing a patch.

Quoted 7 lines

I'm still not convinced this is either practical or desirable. The kernel versions you mentioned are the minimum required for the particular version of glibc you were looking at, but different libcs or different versions of the same libc will have different minimum kernel requirements even for the same target. (As an obvious example, the m68k port has been supported in glibc since its inception and clearly didn't require a 2.6.18 kernel to start with.)

Quoted 8 lines

The other thing to say about OLDEST_KERNEL is that it was intended to be controlled by the DISTRO, not by the MACHINE. In other words, it's a policy control ("kernel x.xx is the earliest one we care about; it's okay to omit the compatibility bits for older ones") and not a target attribute ("kernel x.xx is the minimum required for correct functionality"). We don't currently have a variable with the latter semantics and nor am I very convinced that it would be a good idea to introduce one.

We can add soft 'sane' assignments to machines and then distros can override that to whatever they want if they want to, or not?

#10 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

Quoted 10 lines · Roman I Khimov
Quoted 8 lines · On Monday 18 May 2009 23:37:09 Phil Blundell wrote:

The other thing to say about OLDEST_KERNEL is that it was intended to be controlled by the DISTRO, not by the MACHINE. In other words, it's a policy control ("kernel x.xx is the earliest one we care about; it's okay to omit the compatibility bits for older ones") and not a target attribute ("kernel x.xx is the minimum required for correct functionality"). We don't currently have a variable with the latter semantics and nor am I very convinced that it would be a good idea to introduce one.

Quoted 2 lines

We can add soft 'sane' assignments to machines and then distros can override that to whatever they want if they want to, or not?

No, the MACHINE doesn't know what version of libc is going to be selected and hence what kernel version will be needed. Even if it did, this plan would lose if the DISTRO selected an older kernel than the MACHINE requires, which in turn would make it difficult in practice for DISTROs to do anything useful with this variable.

What is your objection to just selecting the highest kernel version that qemu supports for the target architecture? That seems like an easy fix and one that makes this whole problem go away without requiring either any extra variables or any semantic changes to existing variables.

p.

#11 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Phil" == Phil Blundell <[email protected]> writes:

Phil> On Mon, 2009-05-18 at 23:54 +0400, Roman I Khimov wrote:

Phil> What is your objection to just selecting the highest kernel Phil> version that qemu supports for the target architecture? That Phil> seems like an easy fix and one that makes this whole problem go Phil> away without requiring either any extra variables or any Phil> semantic changes to existing variables.

That doesn't make sense for our case. We're using openembedded to generate a rootfs for an embedded virtual environment whose Linux kernel is currently at 2.6.10. Glibcs built for later kernels will not run on this (because of the changes for handling thread-local-storage introduced in the 2.6.11--2.6.12 timeframe)

--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia

#12 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

Quoted 11 lines · Peter Chubb
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Phil" == Phil Blundell <[email protected]> writes:

Phil> On Mon, 2009-05-18 at 23:54 +0400, Roman I Khimov wrote:

Phil> What is your objection to just selecting the highest kernel Phil> version that qemu supports for the target architecture? That Phil> seems like an easy fix and one that makes this whole problem go Phil> away without requiring either any extra variables or any Phil> semantic changes to existing variables.

Quoted 5 lines

That doesn't make sense for our case. We're using openembedded to generate a rootfs for an embedded virtual environment whose Linux kernel is currently at 2.6.10. Glibcs built for later kernels will not run on this (because of the changes for handling thread-local-storage introduced in the 2.6.11--2.6.12 timeframe)

I think you misunderstood what I was proposing. Glibc would continue to be configured just as it is now: the only difference would be that _qemu_ would be set to emulate the newest kernel version that it supports, rather than a fixed version as previously.

p.

#13 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

Quoted 4 lines · On Tuesday 19 May 2009 11:38:51 Phil Blundell wrote:

I think you misunderstood what I was proposing. Glibc would continue to be configured just as it is now: the only difference would be that _qemu_ would be set to emulate the newest kernel version that it supports, rather than a fixed version as previously.

As I can tell from a quick glance, there is no special handling for different kernel versions in QEMU. It translates syscalls from target application to host kernel and if we tell it to fake kernel version reported to application it does so and nothing more (linux-user/syscall.c in qemu). So I don't think there is any newest kernel version supported by QEMU for any target, it just doesn't care.

#14 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

Quoted 6 lines · Roman I Khimov

As I can tell from a quick glance, there is no special handling for different kernel versions in QEMU. It translates syscalls from target application to host kernel and if we tell it to fake kernel version reported to application it does so and nothing more (linux-user/syscall.c in qemu). So I don't think there is any newest kernel version supported by QEMU for any target, it just doesn't care.

Oh right. Well, in that case, it's very easy: we can just tell qemu to report itself as 9999.9999.9999 or something. Or have a NEWEST_KERNEL variable that's set (globally in bitbake.conf or somesuch) to the newest kernel that might conceivably be used.

p.

#15 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

In reply to Phil Blundell
Quoted 17 lines · Phil Blundell
Quoted 8 lines · Phil Blundell
Quoted 6 lines · Roman I Khimov

Now, I think that this should be fixed on target level. OLDEST_KERNEL should be something sane. Global 2.4.0 from bitbake.conf is good enough for most targets, but if we know that none of ARM EABI works with kernel versions prior to 2.6.14, we should set OLDEST_KERNEL to 2.6.14 for that targets. Or higher, of course, if target needs/wants that. If that's OK with all, I'm doing a patch.

Quoted 7 lines

I'm still not convinced this is either practical or desirable. The kernel versions you mentioned are the minimum required for the particular version of glibc you were looking at, but different libcs or different versions of the same libc will have different minimum kernel requirements even for the same target. (As an obvious example, the m68k port has been supported in glibc since its inception and clearly didn't require a 2.6.18 kernel to start with.)

Quoted 8 lines

The other thing to say about OLDEST_KERNEL is that it was intended to be controlled by the DISTRO, not by the MACHINE. In other words, it's a policy control ("kernel x.xx is the earliest one we care about; it's okay to omit the compatibility bits for older ones") and not a target attribute ("kernel x.xx is the minimum required for correct functionality"). We don't currently have a variable with the latter semantics and nor am I very convinced that it would be a good idea to introduce one.

I've re-read most of the thread, and I think what we need to do is:

- Acknowledge we've not set OLDEST_KERNEL in a sane way for a while. Except in some _machines_ we just use the 2.4.0 default, and glibc corrects it up.

- Acknowledge this is a GLIBC / EGLIBC only variable and move it over, with weak assignments to sane values in glibc.inc / eglibc.inc. We might have to have some other possibilities commented out explaining what they do. For example, arm-linux (oabi), non-nptl x86, etc.

Signature · 1 line
Tom Rini
#16 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

Quoted 29 lines · Tom Rini
Quoted 17 lines · Phil Blundell
Quoted 8 lines · Phil Blundell
Quoted 6 lines · Roman I Khimov

Now, I think that this should be fixed on target level. OLDEST_KERNEL should be something sane. Global 2.4.0 from bitbake.conf is good enough for most targets, but if we know that none of ARM EABI works with kernel versions prior to 2.6.14, we should set OLDEST_KERNEL to 2.6.14 for that targets. Or higher, of course, if target needs/wants that. If that's OK with all, I'm doing a patch.

Quoted 7 lines

I'm still not convinced this is either practical or desirable. The kernel versions you mentioned are the minimum required for the particular version of glibc you were looking at, but different libcs or different versions of the same libc will have different minimum kernel requirements even for the same target. (As an obvious example, the m68k port has been supported in glibc since its inception and clearly didn't require a 2.6.18 kernel to start with.)

Quoted 8 lines

The other thing to say about OLDEST_KERNEL is that it was intended to be controlled by the DISTRO, not by the MACHINE. In other words, it's a policy control ("kernel x.xx is the earliest one we care about; it's okay to omit the compatibility bits for older ones") and not a target attribute ("kernel x.xx is the minimum required for correct functionality"). We don't currently have a variable with the latter semantics and nor am I very convinced that it would be a good idea to introduce one.

I've re-read most of the thread, and I think what we need to do is:

Quoted 8 lines

- Acknowledge we've not set OLDEST_KERNEL in a sane way for a while. Except in some _machines_ we just use the 2.4.0 default, and glibc corrects it up.

- Acknowledge this is a GLIBC / EGLIBC only variable and move it over, with weak assignments to sane values in glibc.inc / eglibc.inc. We might have to have some other possibilities commented out explaining what they do. For example, arm-linux (oabi), non-nptl x86, etc.

Oh! And since this is glibc/eglibc only, we can pass qemu the min version the libc was compiled for.

Signature · 1 line
Tom Rini
#17 lore raw

PATCH 1/1 (e)glibc.inc: add minimal sane kernel versions

In reply to Tom Rini

(e)glibc is configured for OLDEST_KERNEL, certain target architectures have specific requirements for kernel versions, if that are not satisfied (e)glibc reconfigures itself with what it think more appropriate and warns user that there is misconfiguration on his side.

Add minimal sane kernel versions for architectures requiring that.

---
 conf/distro/include/eglibc.inc |    9 +++++++++
 conf/distro/include/glibc.inc  |    9 +++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
conf/distro/include/eglibc.inc +9 -0
index 0d2087e..7901949 100644
@@ -7,3 +7,12 @@ PREFERRED_PROVIDER_virtual/libintl ?= "eglibc"
 PREFERRED_PROVIDER_virtual/libc = "eglibc"
 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "eglibc-initial"
 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "eglibc"
+
+# These are minimal sane kernel versions for targets that woudln't work with
+# default 2.4.0
+
+# ARM OABI is fine with 2.4.0, EABI is not, so we override on "-gnueabi"
+# TARGET_OS here, not on architecture
+OLDEST_KERNEL_linux-gnueabi ?= "2.6.16"
+OLDEST_KERNEL_sparc64 ?= "2.4.21"
+OLDEST_KERNEL_ppc64 ?= "2.4.21"
conf/distro/include/glibc.inc +9 -0
index f9140ff..25f98ce 100644
@@ -7,3 +7,12 @@ PREFERRED_PROVIDER_virtual/libintl ?= "glibc"
 PREFERRED_PROVIDER_virtual/libc = "glibc"
 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "glibc-initial"
 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "glibc"
+
+# These are minimal sane kernel versions for targets that woudln't work with
+# default 2.4.0
+
+# ARM OABI is fine with 2.4.0, EABI is not, so we override on "-gnueabi"
+# TARGET_OS here, not on architecture
+OLDEST_KERNEL_linux-gnueabi ?= "2.6.14"
+OLDEST_KERNEL_sparc64 ?= "2.4.21"
+OLDEST_KERNEL_ppc64 ?= "2.4.21"
Signature · 7 lines
1.6.3.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
#18 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

In reply to Phil Blundell
Quoted 8 lines · On Monday 18 May 2009 22:54:53 Phil Blundell wrote:
Quoted 6 lines · Roman I Khimov

Now, I think that this should be fixed on target level. OLDEST_KERNEL should be something sane. Global 2.4.0 from bitbake.conf is good enough for most targets, but if we know that none of ARM EABI works with kernel versions prior to 2.6.14, we should set OLDEST_KERNEL to 2.6.14 for that targets. Or higher, of course, if target needs/wants that. If that's OK with all, I'm doing a patch.

Quoted 6 lines

...

I think it would be better to leave the semantics of OLDEST_KERNEL alone and just teach qemu to use either the same __LINUX_KERNEL_VERSION as glibc's configure script has settled on, or (perhaps better) just the newest version that it supports for the given target.

Well, from my point of view, any static version is bad, because it's magic thrown in. When I've stumbled upon this, I've scratched my head a bit on why the hell is it 2.6.16, not 2.6.10, not 2.6.20, not anything else but 2.6.16. Sure enough, it's just something that worked some time ago for someone and was hardcoded then.

Then, I think that OLDEST_KERNEL should be something sane, since this is what we try to configure glibc with. It properly warns that there is something wrong on our side if we try to configure glibc for 2.4.0 kernel with ARM EABI target, so why not fix it? And then, if there are updates to glibc or anything else, it's target-specific and the target should adjust its OLDEST_KERNEL appropriately.

Of course, we can take version from __LINUX_KERNEL_VERSION, but that's more work and it doesn't fix misconfiguration we have when glibc has to decide that it knows better its minimal requirements for target.

#19 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

Quoted 11 lines · Roman I Khimov
Quoted 4 lines · On Monday 18 May 2009 22:54:53 Phil Blundell wrote:

I think it would be better to leave the semantics of OLDEST_KERNEL alone and just teach qemu to use either the same __LINUX_KERNEL_VERSION as glibc's configure script has settled on, or (perhaps better) just the newest version that it supports for the given target.

Well, from my point of view, any static version is bad, because it's magic thrown in. When I've stumbled upon this, I've scratched my head a bit on why the hell is it 2.6.16, not 2.6.10, not 2.6.20, not anything else but 2.6.16. Sure enough, it's just something that worked some time ago for someone and was hardcoded then.

Agreed, a static version is clearly wrong.

Quoted 3 lines

Of course, we can take version from __LINUX_KERNEL_VERSION, but that's more work and it doesn't fix misconfiguration we have when glibc has to decide that it knows better its minimal requirements for target.

I'm not sure what you're saying here. __LINUX_KERNEL_VERSION (from config.h) is precisely the version that glibc is compiled to expect (and what dl-sysdep checks against). So, if you run qemu as that same kernel version, it is guaranteed to always be compatible with the glibc build in question.

p.

#20 lore raw

Re: [oe-commits] Roman I Khimov : (e) glibc-package: fix kernel version passed to qemu

Quoted 10 lines · On Tuesday 19 May 2009 00:00:35 Phil Blundell wrote:
Quoted 3 lines · Roman I Khimov

Of course, we can take version from __LINUX_KERNEL_VERSION, but that's more work and it doesn't fix misconfiguration we have when glibc has to decide that it knows better its minimal requirements for target.

I'm not sure what you're saying here. __LINUX_KERNEL_VERSION (from config.h) is precisely the version that glibc is compiled to expect (and what dl-sysdep checks against). So, if you run qemu as that same kernel version, it is guaranteed to always be compatible with the glibc build in question.

Yep, sure. What's bugging me is that we try to configure glibc for wrong kernel in first place. And if we switch to proper configuration, then there will be no need to dig into config.h to get __LINUX_KERNEL_VERSION (is its format reliable enough across all versions of glibc?).

#21 lore raw
In reply to Phil Blundell
Quoted 11 lines · Phil Blundell

n targets where OLDEST_KERNEL isn't set (and hence defaults to 2.4.0) but you need a kernel newer than 2.4.0 for correct operation. Presumably all ARM EABI targets fall into that latter category, since the TLS syscalls weren't in 2.4.x, and there might be some others where glibc's default setting for --enable-kernel is something newer than 2.4.0.

All in all I'd be happier with this change if it enforced a minimum kernel version of 2.6.16 (i.e. what it used to be) so that there is no possibility of versions going backwards for any target.

Quoted 7 lines

Incidentally, if there is a default value for OLDEST_KERNEL in bitbake.conf then checking the retrieved value against None seems fairly
futile since that will never be true.

p.

I don't mind if the default is 2.6.16 but is there a howto for someone that has a 2.4(.19-rmk7) kernel ?
Denis.

#22 lore raw
In reply to Roman I Khimov

Hi,

Quoted 3 lines · Roman I Khimov

I've not heard yet of this really breaking something. And frankly I don't see any reason for that. If it actually does - feel free to shout and scream of course, we'll think how to handle it better.

I assume it breaks for everyone using qemu 0.9.x. I see it failing with this message now:

NOTE: Running task 635 of 6760 (ID: 194, /disk/d2/dev/recipes/glibc/glibc_2.6.1.bb, do_package)
NOTE: preparing tree for binary locale generation
NOTE: generating locale de_DE (UTF-8)
qemu-arm version 0.9.1, Copyright (c) 2003-2008 Fabrice Bellard
usage: qemu-arm [options] program [arguments...] Linux CPU emulator (compiled for arm emulation)
[...]

This happens building Angstrom for both armv4 and armv5 targets and even with the latest OLDEST_KERNEL changes Koen made some hours ago.

Greetings

Florian

Signature · 5 lines
The dream of yesterday                  Florian Boor
is the hope of today                    Tel: +49 271-771091-15
and the reality of tomorrow.            Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904]        [email protected]
                                        http://www.kernelconcepts.de/en
#23 lore raw
Quoted 19 lines · On Monday 18 May 2009 23:23:32 Florian Boor wrote:

Hi,

Quoted 3 lines · Roman I Khimov

I've not heard yet of this really breaking something. And frankly I don't see any reason for that. If it actually does - feel free to shout and scream of course, we'll think how to handle it better.

I assume it breaks for everyone using qemu 0.9.x. I see it failing with this message now:

NOTE: Running task 635 of 6760 (ID: 194, /disk/d2/dev/recipes/glibc/glibc_2.6.1.bb, do_package)
NOTE: preparing tree for binary locale generation
NOTE: generating locale de_DE (UTF-8)
qemu-arm version 0.9.1, Copyright (c) 2003-2008 Fabrice Bellard
usage: qemu-arm [options] program [arguments...] Linux CPU emulator (compiled for arm emulation)
[...]

Quoted 2 lines

This happens building Angstrom for both armv4 and armv5 targets and even with the latest OLDEST_KERNEL changes Koen made some hours ago.

Hmm. Did it say anything else? In my case it's been failing with "FATAL:
kernel too old". But that was host qemu (0.10.3).

#24 lore raw
In reply to Florian Boor
Quoted 19 lines · On Monday 18 May 2009 23:23:32 Florian Boor wrote:

Hi,

Quoted 3 lines · Roman I Khimov

I've not heard yet of this really breaking something. And frankly I don't see any reason for that. If it actually does - feel free to shout and scream of course, we'll think how to handle it better.

I assume it breaks for everyone using qemu 0.9.x. I see it failing with this message now:

NOTE: Running task 635 of 6760 (ID: 194, /disk/d2/dev/recipes/glibc/glibc_2.6.1.bb, do_package)
NOTE: preparing tree for binary locale generation
NOTE: generating locale de_DE (UTF-8)
qemu-arm version 0.9.1, Copyright (c) 2003-2008 Fabrice Bellard
usage: qemu-arm [options] program [arguments...] Linux CPU emulator (compiled for arm emulation)
[...]

Quoted 2 lines

This happens building Angstrom for both armv4 and armv5 targets and even with the latest OLDEST_KERNEL changes Koen made some hours ago.

Does 0.9.1 support "-E ..." parameter? That's the only reason for such behavior I could think of currently.

#25 lore raw

Hi,

Quoted 2 lines · Roman I Khimov

Does 0.9.1 support "-E ..." parameter? That's the only reason for such behavior I could think of currently.

Obviously not... looks like commit 6065fa491c009118ae282ae933215649cccfcd24 introduced this. It works if I revert the qemu command line changes.

Greetings

Florian

Signature · 5 lines
The dream of yesterday                  Florian Boor
is the hope of today                    Tel: +49 271-771091-15
and the reality of tomorrow.            Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904]        [email protected]
                                        http://www.kernelconcepts.de/en
#26 lore raw
In reply to Florian Boor
Quoted 9 lines · On Monday 18 May 2009 23:23:32 Florian Boor wrote:

Hi,

Quoted 3 lines · Roman I Khimov

I've not heard yet of this really breaking something. And frankly I don't see any reason for that. If it actually does - feel free to shout and scream of course, we'll think how to handle it better.

I assume it breaks for everyone using qemu 0.9.x. I see it failing with this message now:

OK, this is a problem in second patch from series, "-E" parameter was added recently, dated Jan 30 2009 in qemu git. Bad, bad, bad.

How to fix that? Check QEMU version?

#27 lore raw
Quoted 8 lines · Roman I Khimov
Quoted 7 lines · On Monday 18 May 2009 23:23:32 Florian Boor wrote:

Hi,

Quoted 3 lines · Roman I Khimov

I've not heard yet of this really breaking something. And frankly I don't see any reason for that. If it actually does - feel free to shout and scream of course, we'll think how to handle it better.

Quoted 7 lines
Quoted 2 lines

I assume it breaks for everyone using qemu 0.9.x. I see it failing with this message now:

OK, this is a problem in second patch from series, "-E" parameter was added recently, dated Jan 30 2009 in qemu git. Bad, bad, bad.

How to fix that? Check QEMU version?

Use the 0.10.3 recipe and build libc for ppc, arm OABI, arm EABI and lets drop 0.9.x crap already, in dev

Signature · 1 line
Tom Rini
#28 lore raw
Quoted 12 lines · On Tuesday 19 May 2009 00:17:07 Tom Rini wrote:
Quoted 11 lines · Roman I Khimov
Quoted 9 lines · On Monday 18 May 2009 23:23:32 Florian Boor wrote:

Hi,

Quoted 3 lines · Roman I Khimov

I've not heard yet of this really breaking something. And frankly I don't see any reason for that. If it actually does - feel free to shout and scream of course, we'll think how to handle it better.

I assume it breaks for everyone using qemu 0.9.x. I see it failing with this message now:

Quoted 7 lines
Quoted 4 lines

OK, this is a problem in second patch from series, "-E" parameter was added recently, dated Jan 30 2009 in qemu git. Bad, bad, bad.

How to fix that? Check QEMU version?

Use the 0.10.3 recipe and build libc for ppc, arm OABI, arm EABI and lets drop 0.9.x crap already, in dev

Ported OE QEMU patches to 0.10.3, apart from two:

revert_arm_tcg.patch.gz
qemu-n800-support.patch

Just don't know why the first was needed and the second requires some real effort to update to 0.10.3. Could be interesting to hear something about those.

#29 lore raw

Dnia wtorek, 19 maja 2009 o 17:24:16 Roman I Khimov napisał(a):

Quoted 8 lines

Ported OE QEMU patches to 0.10.3, apart from two:

revert_arm_tcg.patch.gz
qemu-n800-support.patch

Just don't know why the first was needed and the second requires some real effort to update to 0.10.3. Could be interesting to hear something about those.

I would drop both and test do binary locales works for ARM targets (as this is main use of qemu-native). n800 support is merged into qemu, revert_arm_tcg.patch removed qemu new code generator for ARM.

Regards,

Signature · 3 lines
JID:      [email protected]
Website:  http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
#30 lore raw

PATCH 1/1 qemu 0.10.3: port OE's patches, make preferable version

Fixes binary locale generation broken by
6065fa491c009118ae282ae933215649cccfcd24.

---
 recipes/qemu/qemu-0.10.3/06_exit_segfault.patch    |   45 ++++++++++++++++
 recipes/qemu/qemu-0.10.3/11_signal_sigaction.patch |   21 ++++++++
 recipes/qemu/qemu-0.10.3/22_net_tuntap_stall.patch |   13 +++++
 recipes/qemu/qemu-0.10.3/31_syscalls.patch         |   22 ++++++++
 recipes/qemu/qemu-0.10.3/32_syscall_sysctl.patch   |   55 ++++++++++++++++++++
 recipes/qemu/qemu-0.10.3/52_ne2000_return.patch    |   17 ++++++
 recipes/qemu/qemu-0.10.3/61_safe_64bit_int.patch   |   27 ++++++++++
 recipes/qemu/qemu-0.10.3/63_sparc_build.patch      |   18 ++++++
 .../qemu/qemu-0.10.3/64_ppc_asm_constraints.patch  |   18 ++++++
 recipes/qemu/qemu-0.10.3/66_tls_ld.patch           |   55 ++++++++++++++++++++
 recipes/qemu/qemu-0.10.3/91-oh-sdl-cursor.patch    |   18 ++++++
 .../qemu/qemu-0.10.3/fix_baum_c_compilation.patch  |   30 +++++++++++
 recipes/qemu/qemu-0.10.3/fix_segfault.patch        |   37 +++++++++++++
 recipes/qemu/qemu-0.10.3/no-strip.patch            |   26 +++++++++
 recipes/qemu/qemu_0.10.3.bb                        |   17 +++++-
 15 files changed, 416 insertions(+), 3 deletions(-)
 create mode 100644 recipes/qemu/qemu-0.10.3/06_exit_segfault.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/11_signal_sigaction.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/22_net_tuntap_stall.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/31_syscalls.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/32_syscall_sysctl.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/52_ne2000_return.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/61_safe_64bit_int.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/63_sparc_build.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/64_ppc_asm_constraints.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/66_tls_ld.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/91-oh-sdl-cursor.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/fix_baum_c_compilation.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/fix_segfault.patch
 create mode 100644 recipes/qemu/qemu-0.10.3/no-strip.patch
recipes/qemu/qemu-0.10.3/06_exit_segfault.patch new file +45 -0
new file mode 100644
index 0000000..bc02d31
@@ -0,0 +1,45 @@
+#DPATCHLEVEL=0
+---
+# linux-user/main.c |    8 ++++----
+# 1 file changed, 4 insertions(+), 4 deletions(-)
+#
+Index: linux-user/main.c
+===================================================================
+--- linux-user/main.c.orig	2008-04-24 20:15:46.000000000 +0100
++++ linux-user/main.c	2008-04-24 20:15:53.000000000 +0100
+@@ -765,7 +765,7 @@
+         default:
+             printf ("Unhandled trap: 0x%x\n", trapnr);
+             cpu_dump_state(env, stderr, fprintf, 0);
+-            exit (1);
++            _exit (1);
+         }
+         process_pending_signals (env);
+     }
+@@ -1697,7 +1697,7 @@
+         default:
+             printf ("Unhandled trap: 0x%x\n", trapnr);
+             cpu_dump_state(env, stderr, fprintf, 0);
+-            exit (1);
++            _exit (1);
+         }
+         process_pending_signals (env);
+     }
+@@ -2026,7 +2026,7 @@
+                 for(item = cpu_log_items; item->mask != 0; item++) {
+                     printf("%-10s %s\n", item->name, item->help);
+                 }
+-                exit(1);
++                _exit(1);
+             }
+             cpu_set_log(mask);
+         } else if (!strcmp(r, "s")) {
+@@ -2045,7 +2045,7 @@
+             if (qemu_host_page_size == 0 ||
+                 (qemu_host_page_size & (qemu_host_page_size - 1)) != 0) {
+                 fprintf(stderr, "page size must be a power of two\n");
+-                exit(1);
++                _exit(1);
+             }
+         } else if (!strcmp(r, "g")) {
+             gdbstub_port = atoi(argv[optind++]);
recipes/qemu/qemu-0.10.3/11_signal_sigaction.patch new file +21 -0
new file mode 100644
index 0000000..cd56541
@@ -0,0 +1,21 @@
+#DPATCHLEVEL=0
+---
+# linux-user/signal.c |    5 +++++
+# 1 file changed, 5 insertions(+)
+#
+Index: linux-user/signal.c
+===================================================================
+--- linux-user/signal.c.orig	2008-04-24 20:15:55.000000000 +0100
++++ linux-user/signal.c	2008-04-24 20:15:57.000000000 +0100
+@@ -512,6 +512,11 @@
+ 
+     if (sig < 1 || sig > TARGET_NSIG || sig == SIGKILL || sig == SIGSTOP)
+         return -EINVAL;
++
++    /* no point doing the stuff as those are not allowed for sigaction */
++    if ((sig == TARGET_SIGKILL) || (sig == TARGET_SIGSTOP))
++        return -EINVAL;
++
+     k = &sigact_table[sig - 1];
+ #if defined(DEBUG_SIGNAL)
+     fprintf(stderr, "sigaction sig=%d act=0x%08x, oact=0x%08x\n",
recipes/qemu/qemu-0.10.3/22_net_tuntap_stall.patch new file +13 -0
new file mode 100644
index 0000000..993960b
@@ -0,0 +1,13 @@
+Index: qemu-0.10.3/net.c
+===================================================================
+--- qemu-0.10.3.orig/net.c	2009-05-19 17:46:54.650870195 +0400
++++ qemu-0.10.3/net.c	2009-05-19 17:47:05.612854521 +0400
+@@ -955,7 +955,7 @@
+         return -1;
+     }
+     memset(&ifr, 0, sizeof(ifr));
+-    ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
++    ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE;
+     if (ifname[0] != '\0')
+         pstrcpy(ifr.ifr_name, IFNAMSIZ, ifname);
+     else
recipes/qemu/qemu-0.10.3/31_syscalls.patch new file +22 -0
new file mode 100644
index 0000000..20a1499
@@ -0,0 +1,22 @@
+Index: linux-user/syscall.c
+===================================================================
+--- linux-user/syscall.c.orig	2008-04-24 20:15:46.000000000 +0100
++++ linux-user/syscall.c	2008-04-24 20:15:59.000000000 +0100
+@@ -250,6 +250,7 @@
+ extern int setresgid(gid_t, gid_t, gid_t);
+ extern int getresgid(gid_t *, gid_t *, gid_t *);
+ extern int setgroups(int, gid_t *);
++extern int uselib(const char*);
+ 
+ #define ERRNO_TABLE_SIZE 1200
+ 
+@@ -4041,7 +4042,8 @@
+ #endif
+ #ifdef TARGET_NR_uselib
+     case TARGET_NR_uselib:
+-        goto unimplemented;
++        ret = get_errno(uselib(path((const char*)arg1)));
++        break;
+ #endif
+ #ifdef TARGET_NR_swapon
+     case TARGET_NR_swapon:
recipes/qemu/qemu-0.10.3/32_syscall_sysctl.patch new file +55 -0

55 lines not on this page · raw message

recipes/qemu/qemu-0.10.3/52_ne2000_return.patch new file +17 -0
new file mode 100644
index 0000000..e364bff
@@ -0,0 +1,17 @@
+---
+ hw/ne2000.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: trunk/hw/ne2000.c
+===================================================================
+--- trunk.orig/hw/ne2000.c	2008-04-24 20:15:46.000000000 +0100
++++ trunk/hw/ne2000.c	2008-04-24 20:16:05.000000000 +0100
+@@ -217,7 +217,7 @@
+     NE2000State *s = opaque;
+ 
+     if (s->cmd & E8390_STOP)
+-        return 1;
++        return 0;
+     return !ne2000_buffer_full(s);
+ }
+ 
recipes/qemu/qemu-0.10.3/61_safe_64bit_int.patch new file +27 -0
new file mode 100644
index 0000000..80e7b22
@@ -0,0 +1,27 @@
+#DPATCHLEVEL=0
+---
+# dyngen-exec.h |    4 ++--
+# 1 file changed, 2 insertions(+), 2 deletions(-)
+#
+Index: dyngen-exec.h
+===================================================================
+--- dyngen-exec.h.orig	2009-05-01 21:02:44.000000000 +0400
++++ dyngen-exec.h	2009-05-19 17:56:28.164854448 +0400
+@@ -41,7 +41,7 @@
+ // Linux/Sparc64 defines uint64_t
+ #if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__))
+ /* XXX may be done for all 64 bits targets ? */
+-#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64)
++#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64) || defined(__sparc__)
+ typedef unsigned long uint64_t;
+ #else
+ typedef unsigned long long uint64_t;
+@@ -58,7 +58,7 @@
+ typedef signed int int32_t;
+ // Linux/Sparc64 defines int64_t
+ #if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__))
+-#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64)
++#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64) || defined(__sparc__)
+ typedef signed long int64_t;
+ #else
+ typedef signed long long int64_t;
recipes/qemu/qemu-0.10.3/63_sparc_build.patch new file +18 -0
new file mode 100644
index 0000000..097f55a
@@ -0,0 +1,18 @@
+#DPATCHLEVEL=0
+---
+# sparc.ld |    2 +-
+# 1 file changed, 1 insertion(+), 1 deletion(-)
+#
+Index: sparc.ld
+===================================================================
+--- sparc.ld.orig	2008-04-24 20:15:46.000000000 +0100
++++ sparc.ld	2008-04-24 20:16:07.000000000 +0100
+@@ -6,7 +6,7 @@
+ SECTIONS
+ {
+   /* Read-only sections, merged into text segment: */
+-  . = 0x60000000 + SIZEOF_HEADERS;
++  . = 0x60000000 + 0x400;
+   .interp     : { *(.interp)    }
+   .hash          : { *(.hash)           }
+   .dynsym        : { *(.dynsym)         }
recipes/qemu/qemu-0.10.3/64_ppc_asm_constraints.patch new file +18 -0
new file mode 100644
index 0000000..7562daf
@@ -0,0 +1,18 @@
+#DPATCHLEVEL=1
+---
+# cpu-all.h |    2 +-
+# 1 file changed, 1 insertion(+), 1 deletion(-)
+#
+Index: qemu-0.10.3/cpu-all.h
+===================================================================
+--- qemu-0.10.3.orig/cpu-all.h	2009-05-01 21:02:44.000000000 +0400
++++ qemu-0.10.3/cpu-all.h	2009-05-19 17:59:28.357103179 +0400
+@@ -288,7 +288,7 @@
+ static inline void stl_le_p(void *ptr, int v)
+ {
+ #ifdef _ARCH_PPC
+-    __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*(uint32_t *)ptr) : "r" (v), "r" (ptr));
++     __asm__ __volatile__ ("stwbrx %0,0,%1" : : "r" (v), "r" (ptr) : "memory");
+ #else
+     uint8_t *p = ptr;
+     p[0] = v;
recipes/qemu/qemu-0.10.3/66_tls_ld.patch new file +55 -0

55 lines not on this page · raw message

recipes/qemu/qemu-0.10.3/91-oh-sdl-cursor.patch new file +18 -0
new file mode 100644
index 0000000..b3d95a4
@@ -0,0 +1,18 @@
+=== modified file 'sdl.c'
+---
+ sdl.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: sdl.c
+===================================================================
+--- sdl.c.orig	2008-04-24 20:15:45.000000000 +0100
++++ sdl.c	2008-04-24 20:16:12.000000000 +0100
+@@ -247,7 +247,7 @@
+ 
+     if (kbd_mouse_is_absolute()) {
+         SDL_ShowCursor(1);
+-        SDL_SetCursor(sdl_cursor_hidden);
++        /* SDL_SetCursor(sdl_cursor_hidden); */
+     } else {
+         SDL_ShowCursor(0);
+     }
recipes/qemu/qemu-0.10.3/fix_baum_c_compilation.patch new file +30 -0
new file mode 100644
index 0000000..a2eb438
@@ -0,0 +1,30 @@
+Index: trunk/hw/baum.c
+===================================================================
+--- trunk.orig/hw/baum.c	2008-11-29 05:12:40.418390606 +0300
++++ trunk/hw/baum.c	2008-11-29 05:13:11.498378426 +0300
+@@ -569,8 +569,10 @@ CharDriverState *chr_baum_init(void)
+     CharDriverState *chr;
+     brlapi_handle_t *handle;
+ #ifdef CONFIG_SDL
++#ifdef SDL_VIDEO_DRIVER_X11
+     SDL_SysWMinfo info;
+ #endif
++#endif
+     int tty;
+
+     baum = qemu_mallocz(sizeof(BaumDriverState));
+@@ -605,12 +607,14 @@ CharDriverState *chr_baum_init(void)
+     }
+
+ #ifdef CONFIG_SDL
++#ifdef SDL_VIDEO_DRIVER_X11
+     memset(&info, 0, sizeof(info));
+     SDL_VERSION(&info.version);
+     if (SDL_GetWMInfo(&info))
+         tty = info.info.x11.wmwindow;
+     else
+ #endif
++#endif
+         tty = BRLAPI_TTY_DEFAULT;
+
+     if (brlapi__enterTtyMode(handle, tty, NULL) == -1) {
recipes/qemu/qemu-0.10.3/fix_segfault.patch new file +37 -0
new file mode 100644
index 0000000..32ca3c0
@@ -0,0 +1,37 @@
+---
+ linux-user/syscall.c |   22 ----------------------
+ 1 file changed, 22 deletions(-)
+
+Index: qemu-0.10.3/linux-user/syscall.c
+===================================================================
+--- qemu-0.10.3.orig/linux-user/syscall.c	2009-05-19 18:18:04.000000000 +0400
++++ qemu-0.10.3/linux-user/syscall.c	2009-05-19 18:18:40.397103379 +0400
+@@ -6024,28 +6024,6 @@
+         goto unimplemented_nowarn;
+ #endif
+ 
+-#ifdef TARGET_NR_clock_gettime
+-    case TARGET_NR_clock_gettime:
+-    {
+-        struct timespec ts;
+-        ret = get_errno(clock_gettime(arg1, &ts));
+-        if (!is_error(ret)) {
+-            host_to_target_timespec(arg2, &ts);
+-        }
+-        break;
+-    }
+-#endif
+-#ifdef TARGET_NR_clock_getres
+-    case TARGET_NR_clock_getres:
+-    {
+-        struct timespec ts;
+-        ret = get_errno(clock_getres(arg1, &ts));
+-        if (!is_error(ret)) {
+-            host_to_target_timespec(arg2, &ts);
+-        }
+-        break;
+-    }
+-#endif
+ #ifdef TARGET_NR_clock_nanosleep
+     case TARGET_NR_clock_nanosleep:
+     {
recipes/qemu/qemu-0.10.3/no-strip.patch new file +26 -0
new file mode 100644
index 0000000..4813dd4
@@ -0,0 +1,26 @@
+Index: trunk/Makefile
+===================================================================
+--- trunk.orig/Makefile	2008-04-24 20:15:37.000000000 +0100
++++ trunk/Makefile	2008-04-24 20:16:30.000000000 +0100
+@@ -196,7 +196,7 @@
+ install: all $(if $(BUILD_DOCS),install-doc)
+ 	mkdir -p "$(DESTDIR)$(bindir)"
+ ifneq ($(TOOLS),)
+-	$(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
++	$(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)"
+ endif
+ 	mkdir -p "$(DESTDIR)$(datadir)"
+ 	set -e; for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
+Index: trunk/Makefile.target
+===================================================================
+--- trunk.orig/Makefile.target	2008-04-24 20:15:37.000000000 +0100
++++ trunk/Makefile.target	2008-04-24 20:16:30.000000000 +0100
+@@ -685,7 +685,7 @@
+ 
+ install: all
+ ifneq ($(PROGS),)
+-	$(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
++	$(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
+ endif
+ 
+ # Include automatically generated dependency files
recipes/qemu/qemu_0.10.3.bb +14 -3
index d6ad1d7..890e878 100644
@@ -1,14 +1,25 @@
 LICENSE = "GPL"
 DEPENDS = "zlib"
 
-# Need to port OE patches there
-DEFAULT_PREFERENCE = "-1"
-
 FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
 FILESDIR = "${WORKDIR}"
 
 SRC_URI = "\
     http://download.savannah.gnu.org/releases/qemu/qemu-${PV}.tar.gz \
+    file://06_exit_segfault.patch;patch=1;pnum=0 \
+    file://11_signal_sigaction.patch;patch=1;pnum=0 \
+    file://22_net_tuntap_stall.patch;patch=1 \
+    file://31_syscalls.patch;patch=1;pnum=0 \
+    file://32_syscall_sysctl.patch;patch=1;pnum=0 \
+    file://52_ne2000_return.patch;patch=1 \
+    file://61_safe_64bit_int.patch;patch=1;pnum=0 \
+    file://63_sparc_build.patch;patch=1;pnum=0 \
+    file://64_ppc_asm_constraints.patch;patch=1 \
+    file://66_tls_ld.patch;patch=1;pnum=0 \
+    file://91-oh-sdl-cursor.patch;patch=1;pnum=0 \
+    file://fix_segfault.patch;patch=1 \
+    file://no-strip.patch;patch=1 \
+    file://fix_baum_c_compilation.patch;patch=1 \
     "
 
 S = "${WORKDIR}/qemu-${PV}"
Signature · 1 line
1.6.3.1