All of lore.kernel.org
 help / color / mirror / Atom feed
* Smart - "Illegal instruction"
@ 2014-01-24 10:21 yoctolist
  2014-01-24 10:26 ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: yoctolist @ 2014-01-24 10:21 UTC (permalink / raw)
  To: yocto

Hello,

I have a problem with "smart".

Output:
----- snip ---------
root@vld:~# smart
Illegal instruction
root@vld:~#
----- snap ---------

The coredump of that call brings the following result:
----- snip ---------
Core was generated by `python /usr/bin/smart'.
Program terminated with signal 4, Illegal instruction.
#0  strop_maketrans (self=0x0, args=0xb770d18c) at 
/usr/src/debug/python/2.7.3-r0.3/Python-2.7.3/Modules/stropmodule.c:928
928             c[i]=(unsigned char)i;
(gdb)
----- snap ---------

The problem arises on a system with the following processor:
----- snip ---------
Jan 22 09:50:16 vld kernel: smpboot: CPU0: Mobile AMD Sempron(tm) 
Processor 2100+ (fam: 0f, model: 6c, stepping: 02)
Jan 22 09:50:16 vld kernel: Performance Events: AMD PMU driver.
Jan 22 09:50:16 vld kernel: ... version:                0
Jan 22 09:50:16 vld kernel: ... bit width:              48
Jan 22 09:50:16 vld kernel: ... generic registers:      4
Jan 22 09:50:16 vld kernel: ... value mask:             
0000ffffffffffff
Jan 22 09:50:16 vld kernel: ... max period:             
00007fffffffffff
Jan 22 09:50:16 vld kernel: ... fixed-purpose events:   0
Jan 22 09:50:16 vld kernel: ... event mask:             
000000000000000f
Jan 22 09:50:16 vld kernel: Brought up 1 CPUs
----- snap ---------

On a system with an atom processor the problem does not arise.

I am building a "core-image-basic" with MACHINE "genericx86".

It seems to be a build problem of python, because also other python 
elements lead to “illegal instruction” (e.g. “import web”).
As far as testable, all other binaries run perfectly.

Questions:
where is the right place to make changes?
- python recipe?
- compiler recipe?

Do I have to define a new BSP?

Did anyone have a similar problem and could give me some advice?

Thanks in advance,

Siegfried



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Smart - "Illegal instruction"
  2014-01-24 10:21 Smart - "Illegal instruction" yoctolist
@ 2014-01-24 10:26 ` Burton, Ross
  2014-01-24 16:28   ` Mark Hatle
  0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2014-01-24 10:26 UTC (permalink / raw)
  To: yoctolist; +Cc: yocto@yoctoproject.org

On 24 January 2014 10:21,  <yoctolist@progserv.de> wrote:
> Do I have to define a new BSP?
>
> Did anyone have a similar problem and could give me some advice?

IIRC, genericx86 targets Atom and higher (the README lists the target
hardware) so it's quite possible that the compiler is emitting
instructions that your CPU doesn't actually have.  You could create a
new BSP, or edit the tune flags from your distro or local
configuration to target your CPU.

Ross


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Smart - "Illegal instruction"
  2014-01-24 10:26 ` Burton, Ross
@ 2014-01-24 16:28   ` Mark Hatle
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Hatle @ 2014-01-24 16:28 UTC (permalink / raw)
  To: yocto

On 1/24/14, 4:26 AM, Burton, Ross wrote:
> On 24 January 2014 10:21,  <yoctolist@progserv.de> wrote:
>> Do I have to define a new BSP?
>>
>> Did anyone have a similar problem and could give me some advice?
>
> IIRC, genericx86 targets Atom and higher (the README lists the target
> hardware) so it's quite possible that the compiler is emitting
> instructions that your CPU doesn't actually have.  You could create a
> new BSP, or edit the tune flags from your distro or local
> configuration to target your CPU.

I believe that this AMD Sempron processor is using an older instruction set.  So 
as Ross indicated, the best approach is to define a correct tune and BSP for 
your part.

Looking at what I found online, it appears the Sempron 2100 supports:

MMX, 3DNow!, SSE, SSE2, SSE3, AMD64 and EVP

The atom tune is compatible with the core2 tune.  The core2 supports

MMX, SSE, SSE2, SSE3, SSE4.1, and Supplemental SSE3

So my guess is that last two items is the issue.  If you copy the genericx86 BSP 
and modify the configuration to use the tune-x86_64.inc instead, that may fix 
your issue.

--Mark

> Ross
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Smart - "Illegal instruction"
@ 2014-01-25 15:17 yoctolist
  0 siblings, 0 replies; 4+ messages in thread
From: yoctolist @ 2014-01-25 15:17 UTC (permalink / raw)
  To: yocto

Hello,

thanks a lot. It is working now. It took a little longer, because I 
also wanted to understand what I'm doing.

Nice weekend,

Siegfried


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-25 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24 10:21 Smart - "Illegal instruction" yoctolist
2014-01-24 10:26 ` Burton, Ross
2014-01-24 16:28   ` Mark Hatle
  -- strict thread matches above, loose matches on Subject: below --
2014-01-25 15:17 yoctolist

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.