Commit Graph

636 Commits

Author SHA1 Message Date
Shea Levy
55196223c7 Linux 3.4.24 2012-12-17 17:42:38 -05:00
Shea Levy
cc12516cf0 Linux 3.6.11 2012-12-17 17:33:44 -05:00
Lluís Batlle i Rossell
faf821e501 Adding USB cameras to linux 3.7
Details changed since the 3.6 config to get this enabled.
2012-12-17 11:52:47 +01:00
aszlig
639edcb829
manual-kernel: Fix handling spaces in readConfig.
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-12-13 22:54:57 +01:00
Mathijs Kwik
caf561d41a aufs3: upgrade to 1210 release, add linux-3.7 support 2012-12-13 14:00:28 +01:00
Shea Levy
9ddd1cc78b Linux 3.7
Kernel configuration succeeds, I'll let hydra test the build
2012-12-11 11:57:04 -05:00
Shea Levy
ce5ba30f64 Linux 3.6.10 2012-12-10 19:26:36 -05:00
Shea Levy
ed994dcbe2 Linux 3.4.23 2012-12-10 19:26:20 -05:00
Shea Levy
81a856c878 Linux 3.0.56 2012-12-10 19:25:00 -05:00
Eelco Dolstra
88ca46bfa0 linux: Update to 3.2 2012-12-07 13:24:40 +01:00
Mathijs Kwik
fe070086fb linux-3.6: upgrade to 3.6.9 2012-12-04 12:02:36 +01:00
Mathijs Kwik
38740214cb linux-3.4: upgrade to 3.4.21 2012-12-04 12:02:36 +01:00
Mathijs Kwik
47362f67ea linux-3.0: upgrade to 3.0.54 2012-12-04 12:02:36 +01:00
Shea Levy
9b0879bf85 Linux 3.6.8 2012-11-26 15:42:07 -05:00
Shea Levy
d4d1100123 Linux 3.4.20 2012-11-26 15:41:55 -05:00
Shea Levy
1180478089 Linux 3.0.53 2012-11-26 15:37:06 -05:00
Mathijs Kwik
3ee85e3a8d linux-3.6: upgrade to 3.6.7 2012-11-18 11:13:04 +01:00
Mathijs Kwik
6a46699855 linux-3.4: upgrade to 3.4.19 2012-11-18 11:13:04 +01:00
Mathijs Kwik
0404c409cc linux-3.2: upgrade to 3.2.34 2012-11-18 11:13:04 +01:00
Mathijs Kwik
d45b239dcc linux-3.0: upgrade to 3.0.52 2012-11-18 11:13:03 +01:00
Mathijs Kwik
f215bda5b4 linux-2.6.32: upgrade to 2.6.32.60 2012-11-18 11:13:03 +01:00
David Guibert
c604ff045e add cifs_timeout to kernel 3.5 2012-11-15 07:41:11 +01:00
Lluís Batlle i Rossell
bb3b603ea7 mips linux: Adding a patch to fix an ext3 bug in 3.5 and 3.6
I made it apply to all Mips, although the bug works only for n32 and o32 ABIs.
We don't support any n64 by now.
2012-11-06 00:16:13 +01:00
Mathijs Kwik
b56a899320 linux-3.6: upgrade to 3.6.6, contains fix for recent ext4 corruption 2012-11-05 21:11:21 +01:00
Mathijs Kwik
97c5b93402 linux-3.4: kernel 3.4.18, contains fix for recent ext4 corruption 2012-11-05 21:11:21 +01:00
Mathijs Kwik
a1c54023ce linux-3.0: upgrade to 3.0.51 2012-11-05 21:11:20 +01:00
Eelco Dolstra
1d384b0fe0 linux: Update to 3.2.33 2012-10-31 13:48:04 +01:00
Shea Levy
9f221073c2 Linux 3.6.4 2012-10-28 22:13:59 -04:00
Shea Levy
1da5d34957 Linux 3.4.16 2012-10-28 22:09:25 -04:00
Shea Levy
d843ec6b28 Linux 3.0.49 2012-10-28 22:05:33 -04:00
Shea Levy
125f6a02a4 Linux 3.6.3 2012-10-21 22:40:13 -04:00
Shea Levy
e71103deef Linux 3.4.15 2012-10-21 22:38:53 -04:00
Shea Levy
c01c02a74b Linux 3.0.47 2012-10-21 22:36:33 -04:00
Eelco Dolstra
76c010b928 linux: Update to 3.2.32 2012-10-18 12:22:17 -04:00
Mathijs Kwik
fb62b5fb91 linux-3.0: upgrade to 3.0.46 2012-10-13 12:22:48 +02:00
Mathijs Kwik
444b136eee linux-3.4: upgrade to 3.4.14 2012-10-13 12:22:47 +02:00
Mathijs Kwik
86693f1c5c linux-3.5: upgrade to 3.5.7 2012-10-13 12:22:47 +02:00
Mathijs Kwik
12ad270d2a linux-3.6: upgrade to 3.6.2 2012-10-13 12:22:47 +02:00
Mathijs Kwik
5711282fd8 linux kernels: mark kernels that can disable the conntrack-helper 2012-10-13 12:22:47 +02:00
Mathijs Kwik
8ea8105071 linux kernels: mark kernels with rpfilter support 2012-10-13 12:22:47 +02:00
Eelco Dolstra
ebd2b0e1ab linux: Update to 3.2.31 2012-10-10 21:51:36 -04:00
Mathijs Kwik
8f480e3035 linux-3.6: upgrade to 3.6.1
- enable aufs3 patch
- check other patches needing upgrade/enable
2012-10-09 16:05:24 +02:00
Mathijs Kwik
2f39ec92e3 linux-3.5: upgrade to 3.5.6 2012-10-09 16:05:23 +02:00
Mathijs Kwik
76aa428ac6 linux-3.4: upgrade to 3.4.13 2012-10-09 16:05:23 +02:00
Mathijs Kwik
332c6de736 linux-3.0: upgrade to 3.0.45 2012-10-09 16:05:23 +02:00
Michael Raskin
396de23762 Enable V4L2 modules 2012-10-04 15:35:21 +04:00
Shea Levy
359355e150 Linux 3.6 2012-10-01 07:01:31 -04:00
Lluis Batlle
22e050f8c6 linux: In case of an ARM kernel build, add extra include directories
They are required in order to build some modules, like that of
cryptodev.
2012-09-23 19:59:37 +02:00
Eelco Dolstra
0874615fcc Remove User Mode Linux
It hasn't built in a long time and it's obsolete IMHO.
2012-09-21 13:32:37 -04:00
Eelco Dolstra
50aac3247a linux: Update to 3.2.30 2012-09-21 13:30:00 -04:00
Mathijs Kwik
ce3e42df72 linux aufs3: upgrade patch and utils to 20120827 for all 3.x kernels 2012-09-16 13:05:52 +02:00
Mathijs Kwik
7b92af45f8 linux-3.4: upgrade to 3.4.11 2012-09-16 13:05:52 +02:00
Mathijs Kwik
c9b24ba210 linux-3.0: upgrade to 3.0.43 2012-09-16 13:05:52 +02:00
Lluís Batlle i Rossell
95fa07e183 linux-3.5: Updating to 3.5.4 2012-09-15 21:57:05 +02:00
Eelco Dolstra
080c0a5c20 linux: Update to 3.2.29 2012-09-13 10:10:26 -04:00
Mathijs Kwik
d37b642769 newer kernels need cifs-utils to mount CIFS filesystems
the kernel itself (and busybox's cifs mount code) are no longer able
to do this in some/most cases and will error out saying:
"CIFS VFS: connecting to DFS root not implemented yet""

Nixos' qemu-vm target is hurt by this, as it wants to mount /nix/store
via cifs very early in the boot process.

this commit just marks the problematic kernels.
An associated commit in nixos will use this info to fix the problem.
2012-08-30 18:25:49 +02:00
Mathijs Kwik
6fabe047c6 linux-3.4: upgrade to 3.4.10 2012-08-30 18:25:49 +02:00
Mathijs Kwik
8f1a34e228 linux-3.5: upgrade to 3.5.3 2012-08-30 18:25:49 +02:00
Mathijs Kwik
192b29181b linux-3.4: upgrade to 3.4.9
- aufs patch: upgrade to latest stable 3.4
2012-08-21 10:27:13 +02:00
Mathijs Kwik
6e9a6a5924 linux-3.3: upgrade to 3.3.8
- aufs patch: upgrade to latest stable 3.3
2012-08-21 10:26:44 +02:00
Eelco Dolstra
e91a4fb1e4 linux: Update to 3.2.28 2012-08-20 09:56:39 -04:00
Mathijs Kwik
03228d60fe linux-3.5: upgrade aufs3 patch to latest stable 2012-08-16 12:00:25 +02:00
Mathijs Kwik
05ed13dc49 linux-3.5: upgrade to 3.5.2 2012-08-16 12:00:04 +02:00
Shea Levy
839c58f5b1 linux/manual-config: Cleanup 2012-08-11 21:21:06 -04:00
Shea Levy
9ac776ab22 linux/manual-config.nix: Set sourceRoot directly to the pre-unpacked source rather than using a symlink 2012-08-11 21:07:37 -04:00
Shea Levy
0c18551c93 linux/manual-config: Do source unpacking/patching in a separate derivation.
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-11 21:02:30 -04:00
Eelco Dolstra
e69a6c57bc linux: Update to 3.2.27 2012-08-10 18:54:10 -04:00
Lluís Batlle i Rossell
691d069af9 perf: make it take the linux patches
Otherwise the previous patch I added does not get used for perf.
2012-08-10 10:03:53 +02:00
Lluís Batlle i Rossell
734bb84f09 linux-3.5: fix perf build with a patch from the perf mailing list 2012-08-10 09:41:43 +02:00
Mathijs Kwik
cbb2c3abf2 linux-3.5: upgrade to 3.5.1 2012-08-10 08:27:09 +02:00
Shea Levy
21a200d6b2 linux/manual-config: Fix depmod step, remove false comment 2012-08-07 06:36:50 -04:00
Eelco Dolstra
d6cc420fd7 linux: Update to 3.2.26 2012-08-06 09:57:21 -04:00
Mathijs Kwik
fb99c24d7c kernel-3.5: add aufs3 patch 2012-08-05 01:55:31 +02:00
Shea Levy
1935f7e5b8 linux/manual-config: Add informative comment 2012-08-03 08:33:31 -04:00
Shea Levy
1b7264d349 linux/manual-config.nix: When stripping, use xargs -r in case CONFIG_MODULES=y but no modules are actually installed 2012-08-01 23:32:02 -04:00
Shea Levy
4aba2bb3f5 linux/manual-config: Use kernelPatches like generic.nix, not a plain patches list 2012-08-01 23:02:17 -04:00
Shea Levy
fd330e9315 linux/manual-config: Install the kernel with the name given in stdenv.platform.kernelTarget 2012-08-01 15:39:49 -04:00
Shea Levy
ad49d92899 linux/manual-config: When installing firmware, create the firmware directory 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-01 11:56:12 -04:00
Shea Levy
3f4fd55c63 linux/manual-config: Remove unnecessary quotation 2012-08-01 11:26:30 -04:00
Shea Levy
443b9bc936 linux/kernel/manual-config: use isDisabled instead of isNo in case FIRMWARE_IN_KERNEL is left unspecified 2012-08-01 11:21:32 -04:00
Shea Levy
3dbfca0d7f linux/manual-config: Change from 'features' to 'config' and fix build when 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-08-01 06:18:03 -04:00
Mathijs Kwik
b5d4e8a17a linux-3.4: upgrade to 3.4.7 2012-07-31 10:26:18 +02:00
Shea Levy
da4c64026a linux/kernel/manual-config: Greatly simplify config parser 2012-07-29 15:54:31 -04:00
Shea Levy
298b5ccdab linux/kernel/manual-config: Only import from derivation when explicitly asked to 2012-07-29 13:26:39 -04:00
Shea Levy
f0694a3151 linux/kernel/manual-config: Do all of the config file parsing in the imported-from derivation 2012-07-29 13:24:05 -04:00
Shea Levy
6585646d41 linux/kernel/manual-config: Add meta 2012-07-29 04:59:38 -04:00
Shea Levy
46fa5ab105 linux/kernel/manual-config: Relink the symlink from the build directory to the source directory after the source directory is moved 2012-07-29 04:56:56 -04:00
Shea Levy
f7b6f01da1 linux/kernel/manual-config: Cleanup 2012-07-29 04:52:34 -04:00
Shea Levy
98341e0bda linux/kernel/manual-config: Use the kernel's make install 2012-07-29 04:48:50 -04:00
Shea Levy
a9a7085684 linux/kernel/manual-config: Allow manually specifying features, cleanup 2012-07-29 04:31:40 -04:00
Shea Levy
6bb20c7ba2 linux/kernel/manual-config: Strip modules after install 2012-07-29 04:23:28 -04:00
Shea Levy
6b18ab5365 linux/kernel/manual-config: Remove useless INSTALL_MOD_STRIP variable 2012-07-29 04:07:43 -04:00
Shea Levy
6e3b17feec linux/kernel/manual-config: Run depmod after build 2012-07-29 04:01:40 -04:00
Shea Levy
48b5e8eee7 linux/kernel/manual-config: Build in a separate directory and move the build and source trees into $out 2012-07-29 03:49:52 -04:00
Shea Levy
e42a6c5f46 linux/kernel/manual-config: Move the build directory to $out instead of symlinking it 2012-07-29 03:27:09 -04:00
Shea Levy
a36456ca25 linux/kernel-manual-config: Simplify the lines.nix runCommand now that I know how to escape properly 2012-07-29 03:09:44 -04:00
Shea Levy
5a9d9f4f45 linux/kernel/manual-config: Properly escape makeFlagsArray and installFlagsArray 2012-07-29 02:57:58 -04:00
Shea Levy
471b4bc9bb MODLIB needs to be passed directly to make 2012-07-29 02:49:31 -04:00
Shea Levy
aa40e0ff59 linux/kernel/manual-config: The default 'make install' tries to do something with LILO, so install the kernel manually 2012-07-29 01:57:59 -04:00
Shea Levy
dfa750732d linux/kernel/manual-config: Properly set env vars referencing $out 2012-07-29 01:34:27 -04:00