LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


View Poll Results: Where do you compile your kernel?
Home 6 23.08%
/usr/src 18 69.23%
other 2 7.69%
Voters: 26. You may not vote on this poll

Reply
  Search this Thread
Old 12-26-2011, 08:06 PM   #1
asipper
Member
 
Registered: Oct 2011
Distribution: Fedora 17
Posts: 138

Rep: Reputation: 0
Where do you compile kernels?


I compile them in my home directory because I don't know enough about it to argue with linus.
 
Old 12-26-2011, 08:19 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
I always do /usr/src, but it really doesn't matter; you could compile it out of /home and have the same results.

I suppose the argument could be made that, if you are working on a multi-user system, it would be better to have the source located in /usr/src as any user on the machine would be able to compile software against it (but with normal default permissions, would not be able to modify the kernel source). But on a single user machine, which the vast majority of Linux users are running now, having the kernel source in your /home won't change anything so long as the symlinks point to the right location.
 
Old 12-26-2011, 08:51 PM   #3
phenyloxime
LQ Newbie
 
Registered: Sep 2009
Posts: 28

Rep: Reputation: 2
I when I compile a kernel it is in order to apply the RT-Patch, i've only done this a few times but usually I create a working directory named with the Kernel's version string. Yeah I guess I do this in my home directory; /home/user-name/RTWORKING/linux-2.XX.XX.X-686-rtX. I've had my share of issues while cooking kernels, but so far none have been related to where I do the patching/build process
 
Old 12-27-2011, 08:30 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I compile it in my home directory, and the source is also stored there. This is just easier if you're going to use git. I don't want to use git as root in some root directory. I've never had any issues with doing this.
 
Old 12-27-2011, 03:44 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I always do that on my /home-partition, just because it is a fast RAID 0-array. May be I should do it on a RAM-disk next time.
 
Old 12-27-2011, 05:02 PM   #6
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300
Blog Entries: 1

Rep: Reputation: 55
I have a kernels directory in home where I keep the last proven kernel source (from experience) and the latest git checkout. I always build in the /home directory. It just makes life easier.
 
Old 12-28-2011, 03:15 AM   #7
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
Quote:
Originally Posted by asipper View Post
I compile them in my home directory because I don't know enough about it to argue with linus.
I've only done it once.
And I compiled it in /usr/src because I don't know enough about it to argue with Alien Bob.
http://alien.slackbook.org/dokuwiki/...kernelbuilding
 
Old 12-28-2011, 12:39 PM   #8
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
You could say I do it in /home, because I've only ever done it a few times (not counting retries ), and each time I've used the ABS to automate it (save for kernel config options; edited the PKGBUILD to run make nconfig so I could customize it). I keep anything I build from the AUR or ABS tree in directories in /home/mrcode/AUR and /home/mrcode/ABS, respectively.
 
Old 12-28-2011, 01:11 PM   #9
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hi,

I always use /tmp as a normal user (not root).
The reason is that I've to install the kernel as root and I don't want to use rootpermissions within my homedirectory and I don't want to overwrite the kernelsources in /usr/src before the new kernel is ready to use.

Also it seems to be recommended for Slackware to use /tmp, but I'm not sure.

Markus
 
Old 12-28-2011, 02:11 PM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I wouldn't put or leave anything important in /tmp, it's meant to be expendable.
 
Old 12-28-2011, 02:24 PM   #11
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Quote:
Originally Posted by H_TeXMeX_H View Post
I wouldn't put or leave anything important in /tmp, it's meant to be expendable.
Well, when the kernel is built, I copy it (as root) to /usr/src and install it afterwards. Slackware doesn't automatically whipe the /tmp directory (other distributions do).

Markus
 
Old 12-29-2011, 08:28 AM   #12
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
If you move it out after compiling, then it's ok.
 
Old 12-29-2011, 08:51 PM   #13
asipper
Member
 
Registered: Oct 2011
Distribution: Fedora 17
Posts: 138

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by brianL View Post
I've only done it once.
And I compiled it in /usr/src because I don't know enough about it to argue with Alien Bob.
http://alien.slackbook.org/dokuwiki/...kernelbuilding
I originally used that guide. But running as root was annoying.
 
Old 12-29-2011, 08:55 PM   #14
elliott678
Member
 
Registered: Mar 2005
Location: North Carolina
Distribution: Arch
Posts: 977

Rep: Reputation: 74
I do all compiling in /tmp/, which is a tmpfs mount on my systems.
 
Old 12-30-2011, 07:59 AM   #15
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by elliott678 View Post
I do all compiling in /tmp/, which is a tmpfs mount on my systems.
Hopefully you have plenty of RAM.
 
  


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
backward compatibility in kernels + custom kernels + more queries mmp_3341 Linux - Kernel 1 04-12-2007 07:28 AM
Debian Etch with 2 Kernels Compile Prob beowulf71 Debian 2 12-21-2006 06:11 AM
Which kernels best to compile binaries against? WoofDeF Debian 3 06-24-2005 01:47 AM
Can't compile some kernels! Maranza Linux - General 3 12-19-2003 02:58 PM
RH 8 kernels and their relation to 'stock' kernels psweetma Linux - Distributions 1 03-29-2003 10:46 PM

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

All times are GMT -5. The time now is 02:22 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