I compiled my first kernel today... but...

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

I compiled my first kernel today... but...

Postby pins » Tue May 23, 2006 7:04 pm

will gcc have automatically made use of the extended instruction sets available, or do I have to specify this somehow?
I tried to run 'nake menuconfig' and it wouldn't, it printed errors from checklist.c and dialog.h about expected '=' or ';' or ':' or 'asm' before 'functionname'and expected ')' before '*'
I am looking into xmenuconfig (googling and seeing if there is a package for it) as I remember this from mandrake, anyone know where to find this in suse 10.1?
The kernel forms the base of any dependancy tree, right? so if I start by building an optimised kernel, I should be able to work my way up from there?
pins
LXF regular
 
Posts: 154
Joined: Mon Jun 27, 2005 7:24 pm
Location: Haggerston

RE: I compiled my first kernel today... but...

Postby pins » Tue May 23, 2006 7:06 pm

ahhh... ok, it has changed to 'make xconfig'.....
now I just need to read and google all the options. ;p
pins
LXF regular
 
Posts: 154
Joined: Mon Jun 27, 2005 7:24 pm
Location: Haggerston

RE: I compiled my first kernel today... but...

Postby jjmac » Sat Jun 03, 2006 11:40 am

Howdy,

I know it's a late post but thought it might still be useful ...

Make a bakup of the '.config' file that is generated and remove the 'dot' from the beginning of the name. When/if you do a 'make mrproper' all the files with 'dot' prefixes will be removed. That will allow you to reinvoke the configuration using an existing config file as a base. It will need to be copied to its' original 'dot' format first of course :). Handy, as it is a long configuration at the best of times, but from scratch it's even longer. It's a good idea to go over it a few times too, as there is a lot to consider and by saving that file you can go over the configuration again later or carry it over to further compiles.

>>
will gcc have automatically made use of the extended instruction sets available
>>

I think you must mean cpu features. The default config will be for a Pentium 3 i think, so, depending on what you set the processor type to, flags will be generated by configure for your cpu. You can also manually add things to 'CFLAGS' in the Makefile' . Best not to go to much the rats there, just an '-O2 -march=xxxx -tune=xxx' would do it. But that will basically be automated by the cpu selection anyway.

One thing i think people miss though, if you look at the top of the Makefile, you will see a number of parameters that denote the kernel version. The 4th one ...

EXTRAVERSION =

is usually left blank, unless the distro has decided to use it, or a maintainer patch has been applied where it will be set with a string to denote the patch. Such as something like ...

EXTRAVERSION = -ck11

You can add to that manually ie;

-ck11-0
-ck11-1
-ck11-something

You end up with a total version string like 2.6.16-ck11-something.

If you append that to the kernel name and the System.map files before copying them over to /boot, you can have multiple compiles of the same kernel available. In case you want to test some option variations,

such as ...

System.map-2.6.16-ck11-3
bzImage-2.6.16-ck11-3

System.map-2.6.16-ck11-4
bzImage-2.6.16-ck11-4

You will need to select 'Y' for 'Local version - append to kernel release' in the 'General setup' config branch at the top of the config tree to get the mapping..

I don't think the auto install covers that though, ( 'make install' )


jm
jjmac
LXF regular
 
Posts: 1996
Joined: Fri Apr 08, 2005 1:32 am
Location: Sydney, Australia


Return to Programming

Who is online

Users browsing this forum: Bing [Bot] and 0 guests