Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 435210 - sys-apps/genkernel - enable saving output from kernel compilation outside of the source tree
Summary: sys-apps/genkernel - enable saving output from kernel compilation outside of ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-16 14:22 UTC by Łukasz Stelmach
Modified: 2012-10-13 21:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Add --kernel-outputdir to save files outside the source tree. (0001-Add-kernel-outputdir-to-save-files-outside-the-sourc.patch.xz,2.56 KB, patch)
2012-09-16 14:28 UTC, Łukasz Stelmach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Łukasz Stelmach 2012-09-16 14:22:38 UTC
Current version of genkernel (commit: 82754773), and previous as well, run kernel compilation in the source tree, saving any output there. There is no way to pass an option to the kernel build system so all output is saved outside of the /usr/src/linux (technically the way to pass the option exists but it is not enough).

The kernel build system provides "O" option which enables saving compilation output outside of the source tree.

The attached patch introduces --kernel-outputdir option with which one can choose the directory to save the compilation output. My rationale for it is twofold:

1. Expose the "O" option of the kernel build system as genkernel option and enable genkernel for those who use the option.
2. Kernel building process is quite I/O intensive process. As SSD, which are not as durable as traditional HDDs, become more popular an option to avoid excesive number of writing operation during kernel compilation might be of some value. Especially when the kernel is the only part of Gentoo which compilation happens below /usr (which in case han has got got both SSD and HDD is most probably on the former while /var{,/tmp} on the latter).


Reproducible: Always

Steps to Reproduce:
1. Run genkernel to build Linux kernel.
Actual Results:  
Object files are saved below /usr/src/linux/

Expected Results:  
Object files beeing saved in an arbitrary directory.
Comment 1 Łukasz Stelmach 2012-09-16 14:28:16 UTC
Created attachment 324010 [details, diff]
Add --kernel-outputdir to save files outside the source tree.

The patch introduces --kernel-outputdir option which can be used to point the directory where kernel compilation output should be saved. E.g.

genkernel --kernel-outputdir=/var/tmp/genkernel-kernel

will make kernel build system save all its output in/and below /var/tmp/genkernel-kernel instead of /usr/src/linux.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-10-13 21:48:56 UTC
merged in commit 79d7fa1