about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/manual-config.nix
AgeCommit message (Collapse)AuthorFilesLines
2013-03-07Enable __ignoreNulls globallyEelco Dolstra1-2/+0
2013-03-07Merge remote-tracking branch 'origin/master' into stdenv-updatesEelco Dolstra1-15/+27
2013-03-02linux/manual-config: put build and source trees into a separate 'dev' output.Shea Levy1-12/+22
This makes it possible to still build out-of-tree modules without making a system using this kernel depend on the full source and build tree at runtime. Note that references to the source tree are removed from kernel modules after build. Ideally, this would be accomplished by modifying the Makefile that puts the reference there in the first place, but I haven't tracked that down yet.
2013-03-02linux/manual-config: Move configfile symlinking to configurePhase.Shea Levy1-1/+1
It makes more semantic sense there than in unpackPhase, as that symlink is _how_ we configure the kernel
2013-03-02linux/manual-config: ignore nulls.Shea Levy1-2/+4
There's no need to set the postFixup env var at all if we're not modular.
2013-03-02Merge branch 'master' into stdenv-updatesVladimír Čunát1-2/+2
Conflicts (simple): pkgs/applications/networking/browsers/chromium/default.nix pkgs/development/libraries/libsoup/default.nix pkgs/os-specific/linux/kernel/manual-config.nix pkgs/os-specific/linux/qemu-kvm/default.nix
2013-02-28manual-kernel: Add bc to buildNativeInputs.aszlig1-2/+2
As timeconst.pl was replaced by a bc script in the merge window for kernel 3.9, we also need bc during build time, for more information about the reasons, please have a look at the following commit: torvalds/linux@70730bca1331fc50c3caacaea00439de1325bd6e Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-12-28Merge remote-tracking branch 'eelco/master' into stdenv-updatesLluís Batlle i Rossell1-10/+7
Conflicts: pkgs/development/compilers/gcc/4.7/default.nix Trivial solution.
2012-12-28Rename buildNativeInputs -> nativeBuildInputsEelco Dolstra1-1/+1
Likewise for propagatedBuildNativeInputs, etc. "buildNativeInputs" sounds like an imperative rather than a noun phrase.
2012-12-13manual-kernel: Fix handling spaces in readConfig.aszlig1-10/+7
The previos version did a for loop over the output of set, which spits out _all_ defined variables and their contents. This not only is dangerous if there is a variable starting with CONFIG_ but also can't handle whitespace, as the IFS is set to any (horizontal _and_ vertical) whitespace by default. So, imagine (actually don't imagine, something like this is the case in a lot of kernel configuration files) you have the following variable: CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi ..." A loop with for and the default IFS would result in the following variable pieces: 0: CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi 1: -fcall-saved-rsi 2: ..." This obviously leads to the problem that this config variable is being cut off at the first whitespace. Another downside of this approach is that set not only returns variables but functions as well. This could lead to quite a lot of unexpected behaviour and confusion. So the new approach doesn't source the kernel configuration anymore but uses `read` to parse the file line-by line, setting IFS to '=', thus splitting all configuration lines into key/value pairs. Using parameter expansion, we ensure that we only read lines starting with "CONFIG_". This particularily has the advantage of not being bash-specific, should we choose to change to a different default shell someday. Now, after we got a correct "CONFIG_" line, we're using a temporary variable to split off the first quote from the result. Particularily the reason behind this is shell compatibility again, as ${${foo#"}%"} only works in Bash, Zsh and whatnot but not in plain SH. And within the next line we obviously insert the no_firstquote variable without it's last quote removed. But, what about escaping? First of all, if we'd just eval the $val variable, we would correctly unescape the value, but this has the downside that variables within the content would be expanded, for example look at this: CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" Well, obviously this is a bad example at the Nix sense, but just to show that variables within kernel configuration entries aren't impossible. And second, which would have been a show stopper if \" would be within $val: It simply would end up being an invalid Nix expression, because \" would end up as a ploin " within a double quoted string. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-08-11linux/manual-config: CleanupShea Levy1-25/+21
2012-08-11linux/manual-config.nix: Set sourceRoot directly to the pre-unpacked source ↵Shea Levy1-7/+3
rather than using a symlink
2012-08-11linux/manual-config: Do source unpacking/patching in a separate derivation.Shea Levy1-18/+36
Since we keep the source in the kernel build anyway, no space is wasted by having a separate store path for the unpacked source. The upside is that the same source can be used to build the kernel multiple times, or generate configurations for later kernel builds, without going through the (fairly long) unpack and patch process multiple times.
2012-08-07linux/manual-config: Fix depmod step, remove false commentShea Levy1-9/+6
2012-08-03linux/manual-config: Add informative commentShea Levy1-0/+4
2012-08-01linux/manual-config.nix: When stripping, use xargs -r in case ↵Shea Levy1-1/+1
CONFIG_MODULES=y but no modules are actually installed
2012-08-01linux/manual-config: Use kernelPatches like generic.nix, not a plain patches ↵Shea Levy1-3/+5
list
2012-08-01linux/manual-config: Install the kernel with the name given in ↵Shea Levy1-9/+18
stdenv.platform.kernelTarget
2012-08-01linux/manual-config: When installing firmware, create the firmware directory ↵Shea Levy1-2/+4
prior to make *_install. It is probably a kernel build system bug that this is necessary, but it's not really a big deal either.
2012-08-01linux/manual-config: Remove unnecessary quotationShea Levy1-2/+2
2012-08-01linux/kernel/manual-config: use isDisabled instead of isNo in case ↵Shea Levy1-1/+1
FIRMWARE_IN_KERNEL is left unspecified
2012-08-01linux/manual-config: Change from 'features' to 'config' and fix build when ↵Shea Levy1-47/+65
firmware is installed. Instead of manually adding which 'features' a kernel has based on its config here, just generate a nixexpr representation of the whole config and let places that need it (e.g. NixOS modules) decide how to map config options to features. Note that if your kernel requires firmware whose hex file sits directly in ${src}/firmware rather than in a subdirectory thereof, you may need this patch for now: https://lkml.org/lkml/2012/7/31/724
2012-07-29linux/kernel/manual-config: Greatly simplify config parserShea Levy1-61/+9
2012-07-29linux/kernel/manual-config: Only import from derivation when explicitly asked toShea Levy1-1/+3
2012-07-29linux/kernel/manual-config: Do all of the config file parsing in the ↵Shea Levy1-20/+60
imported-from derivation
2012-07-29linux/kernel/manual-config: Add metaShea Levy1-0/+10
2012-07-29linux/kernel/manual-config: Relink the symlink from the build directory to ↵Shea Levy1-0/+2
the source directory after the source directory is moved
2012-07-29linux/kernel/manual-config: CleanupShea Levy1-1/+2
2012-07-29linux/kernel/manual-config: Use the kernel's make installShea Levy1-17/+17
2012-07-29linux/kernel/manual-config: Allow manually specifying features, cleanupShea Levy1-7/+17
2012-07-29linux/kernel/manual-config: Strip modules after installShea Levy1-0/+6
2012-07-29linux/kernel/manual-config: Remove useless INSTALL_MOD_STRIP variableShea Levy1-2/+0
2012-07-29linux/kernel/manual-config: Run depmod after buildShea Levy1-1/+2
2012-07-29linux/kernel/manual-config: Build in a separate directory and move the build ↵Shea Levy1-11/+20
and source trees into $out
2012-07-29linux/kernel/manual-config: Move the build directory to $out instead of ↵Shea Levy1-0/+5
symlinking it
2012-07-29linux/kernel-manual-config: Simplify the lines.nix runCommand now that I ↵Shea Levy1-3/+3
know how to escape properly
2012-07-29linux/kernel/manual-config: Properly escape makeFlagsArray and installFlagsArrayShea Levy1-2/+2
2012-07-29MODLIB needs to be passed directly to makeShea Levy1-1/+1
2012-07-29linux/kernel/manual-config: The default 'make install' tries to do something ↵Shea Levy1-0/+10
with LILO, so install the kernel manually
2012-07-29linux/kernel/manual-config: Properly set env vars referencing $outShea Levy1-2/+2
2012-07-29The kernel build needs hostname and perlShea Levy1-1/+3
2012-07-29Add first attempt at linux/kernel/manual-config.Shea Levy1-0/+81
The goal of this function is to make it possible to build a kernel with a user provided .config. As a secondary goal, it will extract NixOS-relevant features from the config automatically. As a tertiary goal, the build will aim to be simpler than the current generic kernel builder.sh. Unfortunately, that simplicity is offset by the complexity of the feature extraction, especially since nix segfaults when trying to split the file into lines (so an import from a derivation is used)