LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 07-11-2008, 07:59 AM   #1
caglarozdag
LQ Newbie
 
Registered: May 2008
Posts: 3

Rep: Reputation: 0
kernel EXTRAVERSION


I got some instructions to build this performance tool (VTune) by Intel. It goes:

For 2.6-based kernels, the kernel sources can be configured as follows:
# boot into the kernel you wish to build driver for
# and make sure the kernel source tree is placed in
# /usr/src/linux-`uname -r`
#
cd /usr/src/linux-`uname -r`
vi Makefile # set EXTRAVERSION to a value corresponding to `uname -r`
make mrproper
cp /boot/config-`uname -r` .config
make oldconfig
make prepare

-----

I dont know what EXTRAVERSION is and not sure what "set EXTRAVERSION to a value corresponding to `uname -r`" is either.

dwarf1:/home/caglar # cat /proc/version
Linux version 2.6.18.8-0.1-default (geeko@buildhost) (gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)) #1 SMP Fri Mar 2 13:51:59 UTC 2007

At the very top of the Makefile I have the line

EXTRAVERSION = .8

Another strange thing i noticed is there isnt a 'uname -r' in /usr/src

dwarf1:~> uname -r
2.6.18.8-0.1-default


dwarf1:/usr/src # pwd
/usr/src
dwarf1:/usr/src # ls -la
total 47544
drwxr-xr-x 10 root root 4096 2009-05-22 10:41 .
drwxr-xr-x 13 root root 4096 2007-04-16 19:05 ..
drwxr-xr-x 2 root root 4096 2009-04-09 08:15 build-dir
drwxr-xr-x 3 root root 4096 2009-04-09 11:34 Documentation
lrwxrwxrwx 1 root root 19 2009-05-22 10:40 linux -> linux-2.6.18.8-0.10
drwxr-xr-x 20 root root 4096 2009-05-22 10:40 linux-2.6.18.8-0.10
drwxr-xr-x 3 root root 4096 2009-05-22 10:40 linux-2.6.18.8-0.10-obj
drwxr-xr-x 3 root root 4096 2009-05-22 10:40 linux-2.6.18.8-0.9
drwxrwxr-x 23 root root 4096 2009-04-09 11:35 linux-2.6.25.4
-rw-r--r-- 1 root root 48589922 2008-05-15 18:03 linux-2.6.25.4.tar.bz2
lrwxrwxrwx 1 root root 23 2009-05-22 10:40 linux-obj -> linux-2.6.18.8-0.10-obj
drwxr-xr-x 7 root root 4096 2007-04-16 19:27 packages
drwxr-xr-x 24 root root 4096 2009-04-09 12:28 perfmon_patch

So to summarize, my question is, what exactly am i supposed to write accross from EXTRAVERSION in the Makefile before make mrproper.

I am very confused, I would appreciate any input as I am quite the newbie.
Thanks,

Caglar

Last edited by caglarozdag; 07-11-2008 at 08:13 AM.
 
Old 07-11-2008, 08:26 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Code:
vi Makefile # set EXTRAVERSION to a value corresponding to `uname -r`
What the line says is that you have to open up the file named 'Makefile' in a text editor and replace the value of EXTRAVERSION in it with the value you get from the 'uname -r' command.

'#' is a comment indicator, so everything before it is a command and everything after it is extra information. 'vi Makefile' is the command to open the file named 'Makefile' in the program 'vi'. vi is a command-line text editor, one that's available on just about every system. It's a bit advanced and confusing for newbies to use so you may want to substitute a different editor instead, such as nano.

Edit after re-reading: Just to be clear, everywhere you see the `uname -r` command in the instructions is a place where your current version number needs to go (the `backticks` tell the shell to run the command enclosed in them, i.e. they're commands within commands). So what it wants you to do is cd into the source directory of the kernel version you're running, modify the makefile to include the version number, copy the boot-config that also has the same version number, then run the rest of the make commands.

Last edited by David the H.; 07-11-2008 at 08:39 AM.
 
Old 07-11-2008, 08:38 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by caglarozdag View Post
dwarf1:~> uname -r
2.6.18.8-0.1-default
VERSION = 2
MAJOR REVISION = 6
MINOR REVISION = 18
BUG FIX = 8
EXTRAVERSION = -0.1-default

this is the new versioning system officially adopted since kernel 2.6.11. Looking at the value automatically set in the Makefile, it seems the extraversion must include the bug fix, that is .8-0.1-default.
 
  


Reply



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
extraversion localversion or both raypen Slackware 6 05-06-2008 06:08 PM
LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree LXer Syndicated Linux News 0 09-03-2006 08:21 PM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 03:59 AM
kernel panic: try passing init= option to kernel...installation with Red Hat 9 kergen Linux - Hardware 1 09-30-2004 03:28 AM
Assigning "unique name" to "Extraversion" when upgrading Kernal MatthewASmith79 Linux - Newbie 5 08-26-2004 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration