Unix Technical Forum

uname reports wrong architecture

This is a discussion on uname reports wrong architecture within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi, I've installed Slackware 10.1 on an IBM/Cyrix 200. I believe this is an i586. uname -m shows i686 ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 08:08 AM
Julius Schwartzenberg
 
Posts: n/a
Default uname reports wrong architecture

Hi,
I've installed Slackware 10.1 on an IBM/Cyrix 200. I believe this is an
i586. uname -m shows i686 though. I often get segmentation faults when
trying to run selfcompiled applications, so I would like to fix this.
Is there some place where I can change this setting?
Thanks in advance,
Julius
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 08:08 AM
Grant Coady
 
Posts: n/a
Default Re: uname reports wrong architecture

On Sat, 30 Apr 2005 23:08:43 +0200, Julius Schwartzenberg <usenet@zgod.cjb.net> wrote:

>I've installed Slackware 10.1 on an IBM/Cyrix 200.


Recompile kernel to suit CPU, the IBM/Cyrix is not a 686, so
generic 586 CPU would seem safer.

--Grant.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 08:08 AM
Julius Schwartzenberg
 
Posts: n/a
Default Re: uname reports wrong architecture

Grant Coady wrote:
> Recompile kernel to suit CPU, the IBM/Cyrix is not a 686, so
> generic 586 CPU would seem safer.


I'm using the default Slackware 10.1 kernel (version 2.4.29). I thought
(and according to the config in /boot) this one is compiled for 486.
Isn't this the case?

Thanks,
Julius
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 08:08 AM
Grant Coady
 
Posts: n/a
Default Re: uname reports wrong architecture

On Sun, 01 May 2005 00:09:07 +0200, Julius Schwartzenberg <usenet@zgod.cjb.net> wrote:

>I'm using the default Slackware 10.1 kernel (version 2.4.29). I thought
>(and according to the config in /boot) this one is compiled for 486.
>Isn't this the case?


Read the SlackBuild script -- 486 with 686 optimisations, 'cos cyrix has
some '686 features, I'm thinking kernel might be tricked into assuming
it _is_ a full '686 when it isn't and using a 'missing' '686 instruction.
Once I could have told you which one, but been years since I run cyrix.

Perhaps system needs cleanup around CPU, new thermal grease to heatsink,
reseat CPU, memory, run memtest86?

--Grant.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 08:08 AM
Jonathan A.
 
Posts: n/a
Default Re: uname reports wrong architecture

On Sun, 01 May 2005 00:09:07 +0200, Julius Schwartzenberg
<usenet@zgod.cjb.net> appears to have said:

> Grant Coady wrote:
>> Recompile kernel to suit CPU, the IBM/Cyrix is not a 686, so
>> generic 586 CPU would seem safer.

>
> I'm using the default Slackware 10.1 kernel (version 2.4.29). I thought
> (and according to the config in /boot) this one is compiled for 486.
> Isn't this the case?


I believe so. I'm still running 10.0, but I sure haven't heard anything
about a move to i586 for the default kernels.

Hopefully, someone more knowledgeable than I will come along with a real
explanation, but I'll have a go at this. I found an interesting thread
about uname and machine information here:

http://lists.ssc.com/pipermail/linux-list/2000-June.txt

(The thread's a little way down, just search for "uname")

I have a similar situation. I run an Athlon-XP 2600+, and my kernel is
compiled for K7 architecture, yet "uname -m" reports "i686".

It's simple enough to get *most* software (especially the stuff that
uses autoconf) to build for the correct architecture by setting the
environment variables CFLAGS and CXXFLAGS.

For instance, among other variables for gcc and friends, I have:

export CFLAGS="-march=athlon-xp"
export CXXFLAGS="-march=athlon-xp"

in my ~/.bash_profile

That keeps it straight for most compilations. There are some packages
out there that actually use `uname -m` to get the machine type, though.
They require a little hand editing of makefiles, or some such, if you're
really determined to have the march set for your architecture. In my
case, it's only to get a little extra optimization... in your case it
looks to be critical.

The CFLAGS thing is a workaround, rather than a solution but, judging by
the thread at the link above, it might be the only way around it, short
of hacking the kernel code.

HTH,
Jonathan

--
Don't just hit reply. Email address is broken. Thank
your friendly neighborhood spammer. Email replies to:
user: jnthn1 domain: earthlink<dot>net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 08:08 AM
BenneJezzerette
 
Posts: n/a
Default Re: uname reports wrong architecture

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jonathan A. wrote:
> On Sun, 01 May 2005 00:09:07 +0200, Julius Schwartzenberg
> <usenet@zgod.cjb.net> appears to have said:
>
>
>>Grant Coady wrote:
>>
>>>Recompile kernel to suit CPU, the IBM/Cyrix is not a 686, so
>>>generic 586 CPU would seem safer.

>>
>>I'm using the default Slackware 10.1 kernel (version 2.4.29). I thought
>>(and according to the config in /boot) this one is compiled for 486.
>>Isn't this the case?

>
>
> I believe so. I'm still running 10.0, but I sure haven't heard anything
> about a move to i586 for the default kernels.
>
> Hopefully, someone more knowledgeable than I will come along with a real
> explanation, but I'll have a go at this. I found an interesting thread
> about uname and machine information here:
>
> http://lists.ssc.com/pipermail/linux-list/2000-June.txt
>
> (The thread's a little way down, just search for "uname")
>
> I have a similar situation. I run an Athlon-XP 2600+, and my kernel is
> compiled for K7 architecture, yet "uname -m" reports "i686".
>
> It's simple enough to get *most* software (especially the stuff that
> uses autoconf) to build for the correct architecture by setting the
> environment variables CFLAGS and CXXFLAGS.
>
> For instance, among other variables for gcc and friends, I have:
>
> export CFLAGS="-march=athlon-xp"
> export CXXFLAGS="-march=athlon-xp"
>
> in my ~/.bash_profile
>
> That keeps it straight for most compilations. There are some packages
> out there that actually use `uname -m` to get the machine type, though.
> They require a little hand editing of makefiles, or some such, if you're
> really determined to have the march set for your architecture. In my
> case, it's only to get a little extra optimization... in your case it
> looks to be critical.
>
> The CFLAGS thing is a workaround, rather than a solution but, judging by
> the thread at the link above, it might be the only way around it, short
> of hacking the kernel code.
>
> HTH,
> Jonathan
>

On that note,. I have a K6-2 and it shows a i586, go figure.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCc8QeSmxUFLwQOoMRAh1yAKCXWd9KjfC1u1nUlrFyld 2ggVJ/IwCgrP5/
PFtxUPijGEP+yBUMYqoO8SE=
=brcX
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 08:08 AM
Two Ravens
 
Posts: n/a
Default Re: uname reports wrong architecture

BenneJezzerette wrote one line and added it to 65, viz:

> On that note,. I have a K6-2 and it shows a i586, go figure.


I, and I seem to recall others, have repeatedly pointed out to you that
unless you trim the quoted material your posts get longer and longer,
and that eventually some will not bother to wade through the detritus
in order to read you comment.

Please trim the quoted material and interleave your reply.

http://home.online.no/~shughes/a57998/quote.html
--
Two Ravens
"...hit the squirrel..."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 08:12 AM
Julius Schwartzenberg
 
Posts: n/a
Default Re: uname reports wrong architecture

Grant Coady wrote:
> Read the SlackBuild script -- 486 with 686 optimisations, 'cos cyrix has
> some '686 features,

Hmm, I can't really imagine this. I believe the Pentium 2 wasn't even
out yet at the time. Also this thing is running at ~150 MHz. Having a
i686 at that clockspeed sounds very weird to me

> Perhaps system needs cleanup around CPU, new thermal grease to heatsink,
> reseat CPU, memory, run memtest86?

I'll check this, but could this really cause a CPU to be misdetected?

Thanks,
Julius

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-20-2008, 08:12 AM
Julius Schwartzenberg
 
Posts: n/a
Default Re: uname reports wrong architecture

Jonathan A. wrote:
> I have a similar situation. I run an Athlon-XP 2600+, and my kernel is
> compiled for K7 architecture, yet "uname -m" reports "i686".

I believe this is normal. I've never had uname -m report anything other
than ix86.

> The CFLAGS thing is a workaround, rather than a solution but, judging by
> the thread at the link above, it might be the only way around it, short
> of hacking the kernel code.

Yes, I'll think I'll go with that solution. The machine is old and has a
small hd, so I'd prefer avoiding recompiling my kernel.

Thanks a lot
Julius

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-20-2008, 08:12 AM
Eef Hartman
 
Posts: n/a
Default Re: uname reports wrong architecture

Julius Schwartzenberg <usenet@zgod.cjb.net> wrote:
> Grant Coady wrote:
>> Read the SlackBuild script -- 486 with 686 optimisations, 'cos cyrix has
>> some '686 features,

> Hmm, I can't really imagine this. I believe the Pentium 2 wasn't even
> out yet at the time. Also this thing is running at ~150 MHz. Having a


The first "686" was the Pentium-Pro, and it WAS out before the Pentium-MMX
(the Pentium II is actually the 686 equivalent of the Pentium-MMX and
was released AFTER that one).

So:
Pentium (the original one) and Pentium-MMX are 586,
Pentium-Pro, Pentium-II and Pentium-III are 686
and the Pentium IV is a wholly different can of worms, as Intel does
NOT consider it to be a 686, but not a 786 either (that should be the
Itanium family).
if you run "cat /proc/cpuinfo" you'll see it will report a P-4 as
cpu family : 15, but for a true x86 compatible the "family" will
be the x in that, i.e. my Athlon:
vendor_id : AuthenticAMD
cpu family : 6
so it is recognized as a 686 (-compatible).

As far as I know (never used them) the Cyrix and AMD K-6 are a bit
halfway, Pentium with some 686-extensions, so the kernel may wrongly
detect them as 686-compatibles.
--
************************************************** ******************
** Eef Hartman, Delft University of Technology, dept. EWI/TW **
** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 **
** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
************************************************** ******************
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:33 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com