LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 04-23-2006, 12:29 PM   #1
seelk
Member
 
Registered: Apr 2004
Location: NJ
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 15
Question Compile i686 Kernel


Is there an option I need to pass/set in order to compile a i686 kernel??
 
Old 04-23-2006, 02:30 PM   #2
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,268

Rep: Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086
There is an entire section of processor-type selections in the configuration menu.

Select the type that is closest to the processor-type that you run.
 
Old 04-23-2006, 06:38 PM   #3
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 56
What are you trying to gain from compiling your own kernel though? I don't think you'll beat the -beyond kernel in [extra], iphitus has made something really nice there
 
Old 04-23-2006, 08:11 PM   #4
seelk
Member
 
Registered: Apr 2004
Location: NJ
Distribution: Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 15
I build my own kernels mainly for learning purposes. What's the difference between the -beyond kernel and regular kernels?
 
Old 04-23-2006, 08:59 PM   #5
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 56
http://iphitus.loudas.com/beyond.php

It's in the Arch repos if you decide to try it.
 
Old 04-24-2006, 03:56 AM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
I know nothing of AMD but still.. you seem to have a "Athlon XP 2800+" ?
Don't you need a k7 kernel then? Otherwise you might face slowness or crash maybe?
As said, you choose it during the kernel config: K7 and then it adds -march=athlon to compilation. See arch/i386/Makefile.cpu
 
Old 04-24-2006, 09:29 AM   #7
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,268

Rep: Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086
I generally disagree with the notion that there is no benefit to compiling your own kernels. If you know how to do it, do so. If you don't, learn sometime.

Why? Because frankly there is a _lot_ of junk in any "canned" kernel. There has to be: the distributor has no way to know what hardware it might be running on. So there might be many dozens of modules that are trolled-through but never used; in-memory tables built in anticipation of capacity that your machine doesn't have. It's much more than just a consideration of processor-type.

One good reason to do it might simply be to dispel the mystery of it; or, the fear of it. You need to see the kernel for what it is... a memory-resident device-control program.
 
Old 04-24-2006, 05:03 PM   #8
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 56
Quote:
Because frankly there is a _lot_ of junk in any "canned" kernel.
True, there certainly is however when I've built my own for a fair while and then gone back to the package to find no loss in performance then I'll stick with the easier route Makes sense to it's a hell of a lot quicker.
Quote:
If you know how to do it, do so. If you don't, learn sometime
...
One good reason to do it might simply be to dispel the mystery of it; or, the fear of it.
I'll agree with both of those though, it's always nice to know how to do something
 
Old 04-25-2006, 03:45 AM   #9
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
That's the difference with windows:
if you don't need ppp,isdn,drivers for all eth cards, for video card,..
just remove them and recompile!
The kernel provided by distro is meant to run on every machine for every configuration so it includes all.
 
Old 05-05-2006, 09:34 AM   #10
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
would i be asking for trouble by compiling my kernel with -march=athlon (i have an athlon cpu) - considering that most of the slackware packages are compiled using -march=i486 and -mcpu=i686??

Last edited by win32sux; 05-06-2006 at 05:28 AM.
 
Old 05-06-2006, 07:04 AM   #11
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Mageia Studio-13.37 Kubuntu.
Posts: 3,325
Blog Entries: 33

Rep: Reputation: 199Reputation: 199
Smile

win32sux, To get a faster responce, You should post a new thread with your question.

btw, That is called hijacking a thread, and when ppl log on to this forum, they won't see your question, (edit) no offence,

Kind regards, Glenn

(edit) But yes I do and it won't hurt if you do, until you change your cpu to something other that an Athlon.

You should leave i386 compatability enabled just in case

Last edited by GlennsPref; 05-06-2006 at 07:08 AM.
 
Old 05-06-2006, 07:13 AM   #12
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally Posted by GlennsPref
win32sux, To get a faster responce, You should post a new thread with your question.

btw, That is called hijacking a thread, and when ppl log on to this forum, they won't see your question

Kind regards, Glenn
i know what thread hijacking is, thank you, and this is NOT thread hijacking... -march=athlon kernel optimization indeed became a part of this discussion ever since this post was made by nx5000:
Quote:
Originally Posted by nx5000
I know nothing of AMD but still.. you seem to have a "Athlon XP 2800+" ?
Don't you need a k7 kernel then? Otherwise you might face slowness or crash maybe?
As said, you choose it during the kernel config: K7 and then it adds -march=athlon to compilation. See arch/i386/Makefile.cpu

Last edited by win32sux; 05-06-2006 at 07:17 AM.
 
Old 05-09-2006, 02:44 AM   #13
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
Quote:
Originally Posted by win32sux
would i be asking for trouble by compiling my kernel with -march=athlon (i have an athlon cpu) - considering that most of the slackware packages are compiled using -march=i486 and -mcpu=i686??
Well from the kernel configuration:


Select this for an AMD Athlon K7-family processor. Enables use of some extended instructions, and passes appropriate optimization flags to GCC.

-march=athlon will be activated if you select processor familly ATHLON-K7.

As I said I don't know much about amd and how 686-optimized code could run faster than athlon-optimized code on an athlon.
Seems logical to me that you choose athlon-xp (and then have -march=athlon). Maybe there is something on google about 686 optimization on athlon?

I would say=> try it
But I'm not sure you will really see a difference...
 
Old 05-11-2006, 03:59 PM   #14
milanc
LQ Newbie
 
Registered: Apr 2006
Posts: 27

Rep: Reputation: 15
I think it's easier to do "make config" in your kernel source directory, or, even better, install libncurses-dev (I don't know the exact name of the package) and do "make menuconfig". You'll have plenty of configuration options, and once everything is ready do "make && make install"
In fact, I've never tried mixing a few gcc options into the recent makefiles or into the command line...
PS: I've posted a few other things in the "how many times have you compiled your kernel" poll...

Last edited by milanc; 05-11-2006 at 04:02 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
glibc-2.3.5 for i686: compile error ludovanput Linux - Software 0 10-04-2005 06:57 AM
2.6.12-1.1398_FC4-i686 compile error at2marty Fedora 1 08-29-2005 07:21 AM
cross compile for i686 Law1213 Linux - Software 2 06-20-2005 08:36 PM
automatically compile with i686 optimation melinda_sayang Slackware 7 05-06-2004 02:19 PM
compile kernel for athlon, but boots as i686 ? bdp Linux - General 1 12-10-2003 04:18 AM


All times are GMT -5. The time now is 02:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration