about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/manual-config.nix
AgeCommit message (Collapse)AuthorFilesLines
2023-10-22Merge pull request #262677 from Artturin/repick2Artturi1-3/+2
linuxManualConfig: always depend on ubootTools
2023-10-22linuxManualConfig: always depend on ubootToolsAlyssa Ross1-3/+2
Since 41f788b1217 ("linuxManualConfig: use the default make target"), we don't know ahead of time whether the kernel build will attempt to produce a uImage in addition to whatever we're expecting it to build. ubootTools is not a big dependency, so let's just always include it.
2023-10-21linux: remove hack for old kernelsAlyssa Ross1-4/+0
The oldest kernel supported in Nixpkgs is now 4.19 LTS, so we don't need this any more.
2023-10-08Merge staging-next into staginggithub-actions[bot]1-6/+3
2023-09-30Merge pull request #245968 from amjoseph-nixpkgs/pr/linux/kernel/repick4Artturi1-1/+1
linuxManualConfig: fix inaccurate FIXME comment
2023-09-12linuxManualConfig: generalize `depmod` resolutionKiskae1-6/+3
2023-09-12linux_testing: 6.5-rc7 -> 6.6-rc1Kiskae1-2/+3
rc1: https://lwn.net/Articles/944122/
2023-07-28linuxManualConfig: fix inaccurate FIXME commentAlyssa Ross1-1/+1
I read this comment, checked out 4.19, saw that it didn't have any instances of /bin/pwd, and rejoiced, assuming that the removal must have been backported to the affected kernels. But actually, /bin/pwd was just removed earlier, in 4.15, so kernels older than that are still affected. Fix the version number in the comment so I don't go through exactly the same process again a few months from now next time I'm working on this file.
2023-07-28linuxManualConfig: set badPlatformsAlyssa Ross1-0/+3
Older kernels shouldn't be marked as supporting architectures that were only added to the kernel later.
2023-07-28Revert "linuxManualConfig: don't build inside source tree"Adam Joseph1-3/+4
This reverts commit d75cff2ee3bb6d91c818d43d1ba7603bb6dacd59.
2023-07-28Revert "linuxManualConfig: unpack directly into $dev"Adam Joseph1-21/+7
This reverts commit 7de3f08ce38aca9fddb5db7bcb7741fd389be9ef.
2023-07-28Revert "linuxManualConfig: use the default make target"Adam Joseph1-2/+6
This reverts commit 41f788b1217b05d8661ebb77bfc9d9f3f65b5dd2.
2023-07-28Revert "linuxManualConfig: install GDB scripts"Adam Joseph1-13/+5
This reverts commit d57568fcad7e3a9364850cb1c25d7a34693c02d5.
2023-07-28Revert "linuxManualConfig: get rid of drvAttrs"Adam Joseph1-318/+314
This reverts commit f521f4613355f8628fe378dad4c41d3fd8886966.
2023-07-28Revert "linuxManualConfig: fix inaccurate FIXME comment"Adam Joseph1-1/+1
This reverts commit 4d15632cafdcd748d32076fd3f0ad0744f5dd7ec.
2023-07-28Revert "linux: manual-config: use a non-random path for $buildRoot"Adam Joseph1-2/+1
This reverts commit a695425e46a89a879fbe290a4ffa162c2b4a20c9.
2023-07-28Revert "linux: default stdenv.hostPlatform.linux-kernel"Adam Joseph1-5/+4
This reverts commit febe4776287fd81b9dc0fd88a8bcb686765c8a6b.
2023-07-28Revert "linuxManualConfig: always depend on ubootTools"Adam Joseph1-8/+8
This reverts commit e5e02f3214ae381142606cf5defc35888d73f883.
2023-07-28Revert "linuxManualConfig: set badPlatforms"Adam Joseph1-3/+0
This reverts commit 5c5e5e2f1f47d9b0e6c48defe25aeba0bbf04d2c.
2023-07-28Revert "lib/systems: strip kernel to avoid reference cycles"Adam Joseph1-9/+0
This reverts commit 2458c94c9e177ad92aedc8b128a1e92e4dc3bd56.
2023-07-28Revert "linuxManualConfig: restore functionality of isModular and buildDTBs"Adam Joseph1-4/+1
This reverts commit 284d76ee3ddfde84bcc491f45d7e322da02bbae6.
2023-07-28partial revert of f3719756b550Adam Joseph1-3/+2
2023-07-22Merge pull request #239624 from Stunkymonkey/use-optionalString-thenFelix Bühler1-2/+3
treewide: use optionalString instead of 'then ""'
2023-07-06linuxManualConfig: restore functionality of isModular and buildDTBsAdam Joseph1-1/+4
Since https://github.com/NixOS/nixpkgs/pull/221707 the `isModular` and `buildDTBs` parameters no longer function properly -- they now control only whether or not these elements are copied to the outpath; they are build unconditionally in any case. This commit reverts the part of #221707 which caused this behavior change.
2023-07-06lib/systems: strip kernel to avoid reference cyclesAdam Joseph1-0/+9
Since https://github.com/NixOS/nixpkgs/pull/221707 we must ensure that the image resulting from a kernel build is stripped. If we do not do this, there will be circular dependencies among its outpaths. This commit fixes the breakage on mips. Closes #224694
2023-06-24treewide: use optionalString instead of 'then ""'Felix Buehler1-2/+3
2023-06-22linuxManualConfig: set badPlatformsAlyssa Ross1-0/+3
Older kernels shouldn't be marked as supporting architectures that were only added to the kernel later.
2023-05-22linuxManualConfig: always depend on ubootToolsAlyssa Ross1-8/+8
Since 41f788b1217 ("linuxManualConfig: use the default make target"), we don't know ahead of time whether the kernel build will attempt to produce a uImage in addition to whatever we're expecting it to build. ubootTools is not a big dependency, so let's just always include it.
2023-05-22linux: default stdenv.hostPlatform.linux-kernelAlyssa Ross1-4/+5
With this change, we can do a reasonable default build of Linux for configurations that do not have a corresponding platforms.nix entry, and where the user has not explicitly specified the linux-kernel values. This allows us to do best effort builds for obscure architectures (I tested a build for s390x). The platformName binding has not been used since 70cb7050f5c ("Trying to make the linux kernels also cross-build."), so I removed it.
2023-05-18linux: manual-config: use a non-random path for $buildRootPierre Bourdon1-1/+2
Fixes reproducibility issues with x86/amd64 VDSO ELFs Build-IDs. The kernel build system tries pretty hard to not leak build file paths in its output. However, the embedded VDSO ELF files are built using slightly different build options that do not include the path mapping options that protect the rest of the kernel against this issue. This should be fixed upstream eventually, but a lot of this logic is duplicated across architecture, so I don't expect it will be a trivial fix. Instead, make our derivation use a fixed build root directory so this does not impact the build reproducibility. Fixes #227800.
2023-05-08linuxManualConfig: fix inaccurate FIXME commentAlyssa Ross1-1/+1
I read this comment, checked out 4.19, saw that it didn't have any instances of /bin/pwd, and rejoiced, assuming that the removal must have been backported to the affected kernels. But actually, /bin/pwd was just removed earlier, in 4.15, so kernels older than that are still affected. Fix the version number in the comment so I don't go through exactly the same process again a few months from now next time I'm working on this file.
2023-04-03linuxManualConfig: get rid of drvAttrsAlyssa Ross1-314/+318
This is an attempt to make linuxManualConfig look a lot more like a normal package. Previously, about half the attributes passed to mkDerivation come from calling a "drvAttrs" function, which just served to alias some variables through function parameters. There wasn't really a system for which attributes came from drvAttrs, and which did not. I've also made a few other minor changes, like re-ordering attributes to be more idiomatic, and using variables that were moved out of drvAttrs in the definitions of attributes that weren't in drvAttrs before. I've limited my changes here to what I can confidently do without causing any rebuilds.
2023-03-21linuxManualConfig: add pahole to moduleBuildDependenciesAlyssa Ross1-0/+1
This seems to be needed for out-of-tree module builds since d57568fcad7. We do not yet understand why, but this will unblock the channels while we figure it out. Fixes: d57568fcad7 ("linuxManualConfig: install GDB scripts")
2023-03-20linuxManualConfig: install GDB scriptsAlyssa Ross1-5/+13
These are required to debug kernel modules. Since we're now able to do that, there's another reason besides BTF to enable DEBUG_INFO, so I've done that for pre-BTF kernel modules as well here. For GDB to get configured correctly, vmlinux-gdb.py has to be two directories up from scripts/gdb, and vmlinux has to be next to vmlinux-gdb.py. The least invasive way to satisfy these constraints is to make vmlinux a symlink, which GDB will resolve before looking for vmlinux-gdb.py. Tested both ways of getting the scripts into GDB that I know of: gdb /nix/store/7n77ijlxkxr6d613h02lr707kvjx6j1k-linux-6.1.19-dev/vmlinux \ -iex 'add-auto-load-safe-path /nix/store/7n77ijlxkxr6d613h02lr707kvjx6j1k-linux-6.1.19-dev/lib/modules/6.1.19/build/vmlinux-gdb.py' \ -ex 'lx-version' \ -ex 'q' gdb /nix/store/7n77ijlxkxr6d613h02lr707kvjx6j1k-linux-6.1.19-dev/vmlinux \ -ex 'source /nix/store/7n77ijlxkxr6d613h02lr707kvjx6j1k-linux-6.1.19-dev/lib/modules/6.1.19/build/vmlinux-gdb.py' \ -ex 'lx-version' \ -ex 'q' Also tested that the strip changes don't result in meaningful output size changes (there's some small variation due to BTF data not always coming out the same size, which is unrelated), and built every kernel I can on x86_64 to make sure I'm not relying on build system behaviour specific to newer kernels.
2023-03-19linuxManualConfig: use the default make targetAlyssa Ross1-6/+2
We've basically been reimplementing this — by default it contains vmlinux, dtbs (on applicable architectures), modules, and architecture specific stuff like $(KBUILD_IMAGE) and a couple of other miscellaneous files.
2023-03-19linuxManualConfig: unpack directly into $devAlyssa Ross1-7/+21
linux is unusual in that we include its sources in an output. There's no point unpacking into /build when we're going to copy the sources into $dev later. Let's unpack directly into the final destination of the code, and save copying a whole kernel source tree (often across filesystems!). This also means that Kbuild knows the location of the sources, which will allow us to install the GDB scripts — some scripts are generated, and some are not, so the generated ones end up in the build directory, accompanied by symlinks to the non-generated ones in the source directory.
2023-03-18linuxManualConfig: don't build inside source treeAlyssa Ross1-4/+3
We can avoid the need to explicitly exclude it later if we just put it somewhere else to begin with.
2023-02-22linuxManualConfig: remove obsolete commentsAlyssa Ross1-2/+0
Assuming the dead link refers to https://lore.kernel.org/linux-kbuild/1443741332.2730.75.camel@decadent.org.uk/ at this point it's fairly safe to say it's not getting in, as it hasn't been resubmitted since 2015, and nowadays the kernel documentation just suggests setting KBUILD_BUILD_TIMESTAMP like we do here.
2023-02-22linuxManualConfig: drop gen-kheaders-metadata.patchAlyssa Ross1-2/+0
All affected kernels are now EOL and no longer in Nixpkgs.
2023-02-22linuxManualConfig: remove obsolete firmware codeAlyssa Ross1-11/+2
The versionOlder check will not evaluate to true for any kernel in Nixpkgs.
2023-01-13kernel: add deterministic-uname to moduleBuildDependenciesArtturin1-2/+6
2023-01-06linux/kernel: backport symbol GPLification fix from 5.19Adam Joseph1-1/+12
Linux has a few PowerPC-specific symbols which are marked as GPL exports; these symbols wound up being exposed in Linux 5.12 and are needed by OpenZFS. The symbol licensing was fixed in mainline 5.19; this commit backports the fix to all previous affected kernels. This commit is required in order to build the NixOS ISO for PowerPC64.
2022-12-22linuxManualConfig: don't require lib and stdenv argumentsNaïm Favier1-7/+7
Reverts https://github.com/NixOS/nixpkgs/commit/7c7c83e2335c3aa6f26a4f9c905c49c430b5be09 which was only needed for the minimal-kernel.nix test module and clutters the call site. stdenv can still be overridden with `linuxManualConfig.override { stdenv = ...; }`.
2022-12-21linux: use `lib.versions.pad` for `modDirVersion`Naïm Favier1-3/+4
2022-12-03linux: further cleanup config after drop of 4.9Fabián Heredia Montiel1-5/+4
2022-10-30Merge pull request #197697 from delroth/linux-perf-crossPierre Bourdon1-0/+1
linuxPackages.perf: fix cross-compilation by providing HOSTLD
2022-10-25linuxPackages.perf: fix cross-compilation by providing HOSTLDPierre Bourdon1-0/+1
2022-10-14kernel: move prePatch to postPatch to not mess with patchesSandro Jäckel1-9/+4
2022-09-18linux/hardened/5.19: fix buildMaximilian Bosch1-5/+8
The options GCC_PLUGIN_RANDSTRUCT{,_PERFORMANCE} have been renamed to `RANDSTRUCT_*` in 595b893e2087de306d0781795fb8ec47873596a6 since CLang is about to support this as well and thus the options had to be generalized. Also, the file that is used to generate the seed has changed, only the reference to the file in the patch was changed on adding Linux 5.19[1] [1] b4d0cb44975e069e926a2c8963aded9557040541
2022-08-21linux: fix builds for old LTS kernelsK9001-0/+4