LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 05: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, 08:19 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,087
Blog Entries: 10

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
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, 09:43 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,599

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
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 09:45 AM.
 
Old 02-18-2014, 11: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, 11:14 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,087
Blog Entries: 10

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
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


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


All times are GMT -5. The time now is 05:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration