LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-18-2014, 04:38 AM   #1
vinayak099
Member
 
Registered: Jan 2014
Posts: 31

Rep: Reputation: Disabled
How to build linux kernel ?


Hi ,

I have downloaded linux-3.13 source code, applied "aufs" patch on it, built it and installed.

Now I want to add some debug statements to "aufs" and want to compile only "aufs" code as compiling whole kernel will take much time and I have to be always in wait mode.

Is there any way ?

Please let me know ..
 
Old 02-18-2014, 07:19 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Sorry. You have to rebuild the kernel, aufs is a file system and is included in the kernel build; it is not a module which could be rebuilt separately.
 
Old 02-18-2014, 08:43 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Once you have the kernel built you can make changes to any of the source files you want.

Then just use "make" and the install directives (for aufs, I think you an go to "make modules_install"), but that depends on whether you configured aufs to be a module.

the advantage of the "module" approach is that you don't have to reboot to use it. dismount the aufs mounted filesystem, unload the aufs module and reload it after the "make modules_install" ... This will update the module allowing the new one to be used without a reboot.

Last edited by jpollard; 02-18-2014 at 08:45 AM.
 
Old 02-18-2014, 10:08 AM   #4
vinayak099
Member
 
Registered: Jan 2014
Posts: 31

Original Poster
Rep: Reputation: Disabled
Thankfs for your replies.

Can we do any changes to any make file and build only necessary soources ?
 
Old 02-18-2014, 10:14 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
The make should only build necessary sources. But better, as jpollard pointed out there, you can configure aufs to be a module. You will have to rebuild the kernel and modules; however once you've done that the first time, you can then just rebuild the aufs module.
 
  


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
Problem to build new Linux Kernel in Ubuntu11.04 with Kernel Ver 3.2 BalluSingh Linux - Newbie 5 04-15-2013 11:41 AM
About Linux Kernel build Anders Lind Linux - Kernel 1 02-25-2012 11:30 AM
Which is the kernel build directory? I Can't find kernel build files crabsody Debian 7 01-09-2007 04:48 AM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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