LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Where do you compile kernels? (https://www.linuxquestions.org/questions/linux-software-2/where-do-you-compile-kernels-920636/)

asipper 12-26-2011 08:06 PM

Where do you compile kernels?
 
I compile them in my home directory because I don't know enough about it to argue with linus.

MS3FGX 12-26-2011 08:19 PM

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.

phenyloxime 12-26-2011 08:51 PM

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

H_TeXMeX_H 12-27-2011 08:30 AM

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.

TobiSGD 12-27-2011 03:44 PM

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.

Roken 12-27-2011 05:02 PM

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.

brianL 12-28-2011 03:15 AM

Quote:

Originally Posted by asipper (Post 4558929)
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. :redface:
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

MrCode 12-28-2011 12:39 PM

You could say I do it in /home, because I've only ever done it a few times (not counting retries :redface:), 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.

markush 12-28-2011 01:11 PM

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

H_TeXMeX_H 12-28-2011 02:11 PM

I wouldn't put or leave anything important in /tmp, it's meant to be expendable.

markush 12-28-2011 02:24 PM

Quote:

Originally Posted by H_TeXMeX_H (Post 4560302)
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

H_TeXMeX_H 12-29-2011 08:28 AM

If you move it out after compiling, then it's ok.

asipper 12-29-2011 08:51 PM

Quote:

Originally Posted by brianL (Post 4559853)
I've only done it once. :redface:
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.

elliott678 12-29-2011 08:55 PM

I do all compiling in /tmp/, which is a tmpfs mount on my systems.

H_TeXMeX_H 12-30-2011 07:59 AM

Quote:

Originally Posted by elliott678 (Post 4561429)
I do all compiling in /tmp/, which is a tmpfs mount on my systems.

Hopefully you have plenty of RAM.


All times are GMT -5. The time now is 06:02 PM.