summaryrefslogtreecommitdiff
path: root/pkgs/build-support/kernel (follow)
Commit message (Expand)AuthorAgeFilesLines
* Merge master into staging-nixosnixpkgs-ci[bot]2026-01-281-1/+2
|\
| * compressFirmwareZstd: enable __structuredAttrs and fix allowedRequisitesStefan Frijters2026-01-251-1/+2
* | kernel/modules-closure.sh: depmod fails on Linux 6.12+ due to missing modules...Alyssa Ross2026-01-271-0/+2
|\ \
| * | kernel/modules-closure: copy modules.builtin.modinfo for depmod•••Co-authored-by: Alyssa Ross <hi@alyssa.is> 韶光2026-01-271-0/+2
| |/
* | treewide: fix typos (#479869)Michael Daniels2026-01-241-1/+1
|\ \ | |/ |/|
| * treewide: fix typosBen Siraphob2026-01-131-1/+1
* | make-initrd: drop unused `toValidStoreName` localSergei Trofimovich2026-01-221-6/+0
|/
* treewide: remove redundant parentheses•••Auto-fixed by nixf-diagnose. Wolfgang Walther2025-10-051-2/+2
* nixos/systemd-initrd: silence various warnings•••Silences 2 warning messages that appear when using the systemd initrd: 1. "System tainted (var-run-bad)": occurs because `/var/run` isn't a symlink to `/run`. Fixed by making /run and linking /var/run to it. 2. "Failed to make /usr a mountpoint": occurs because ProtectSystem defaults to true in the initrd, which makes systemd try to remount `/usr` as read-only, which doesn't exist in the initrd. Fixed by linking `/usr/bin` and `/usr/sbin` to the initrd bin directories. Also moves the `/tmp` creation from the initrd module to make-initrd-ng, to avoid making an unnecessary `/tmp/.keep`, saving a store path and a few bytes in the initrd image. andre4ik32025-08-161-1/+2
* treewide: run nixfmt 1.0.0Wolfgang Walther2025-07-243-3/+6
* nixos/systemd-initrd: deprecate strip•••It only saved ~1MiB of initramfs size, but caused a few issues like unloadable kernel modules. Gerg-L2025-05-083-41/+4
* make-initrd-ng: fix file permissions•••We want to strip the write bit from files after we copied them. XOR is not the right operator for this, since if the bit is 0 in both the actual permissions and the mask, then the result will be a 1. So in practice, we were assigning write permissions for group and others to all files and we were only stripping the write permissions of the owner (since the owner had write permissions, and so the result of the XOR is 0). The correct thing to do is to AND with the maximum permissions that we want to maintain (which is the inverse of what we want to strip), so that only those bits are preserved and the others are always set to 0. r-vdp2025-05-081-1/+1
* make-initrd-ng: Restore stripped file permissions•••Previously, all initrd ELFs would be made *world-writable*. This commit sets the write bit for the file owner exclusively, and removes it when done. It also sets the umask so that files don't implicitly become writable for other users by mistake. Fixes: https://github.com/NixOS/nixpkgs/security/advisories/GHSA-m7pq-h9p4-8rr4 Reported-By: sudoBash418 <sudobash418@gmail.com> sudoBash4182025-04-133-4/+23
* Merge master into staging-nextnixpkgs-ci[bot]2025-03-202-0/+11
|\
| * nixos/initrd: add extraFirmwarePaths option•••(cherry picked from commit 488d4316b9e1510c9b4a2eeb8d7e2cc66839a1fc) Jared Baur2025-03-182-0/+11
* | make-initrd: use closureInfo again (#372931)Philip Taron2025-03-093-79/+2
|\ \ | |/ |/|
| * pkgs/pathsFromGraph: drop•••Nix 2.* is widely used now, so closureInfo should be used instead. Dominik Xaver Hörl2025-01-231-68/+0
| * make-initrd: use closureInfoDominik Xaver Hörl2025-01-232-11/+2
| * treewide: format all inactive Nix files•••After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \ --argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7 result/bin/apply-formatting $NIXPKGS_PATH Silvan Mosberger2024-12-106-175/+265
* | treewide: load structured attributes in all bash builders consistently•••It's hard to put the sourcing of ./.attrs.sh into all builder consistently - mistakes will happen. Thus, load structured attrs once in make-derivation and then source the remaining builder on top. This should fix quite a few builders with structured attributes in principle. Most importantly it helps substitute / substituteAll, which are required for bootstrap on some platforms. Wolfgang Walther2024-12-292-4/+0
* | treewide: format all inactive Nix files•••After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \ --argstr baseRev 57b193d8ddeaf4f5219d2bae1d23b081e4906e57 result/bin/apply-formatting $NIXPKGS_PATH Silvan Mosberger2024-12-106-175/+265
|/
* tree-wide: switch initrd generators back to gnu cpio•••Originally, we switched to bsdtar from libarchive to solve a reproducibility issue related to hardlinks As of gnu cpio 2.14 the --ignore-dirnlink option is introduced and now included in --reproducible, which solves this issue By switching back, we are in turn solving an issue in libarchive >=3.7.5 erroring out with "Error reading archive -: (null)" Change-Id: Ib6140d599b6547d8e941b0251ce996e303c41fa6 Yureka2024-10-313-6/+6
* makeInitrdNG: fixup `contents` documentationAaron Andersen2024-09-101-2/+2
* make-initrd-ng: also print json itself if it fails to parse•••The current error message is hard to debug because the error is in the nix store: > Error: failed to parse JSON in "/build/.attr-1s42g1c76fxb77skzq0b4wdhcrg8jmzb54czmxvh1qm7psgsbcni" > > Caused by: > missing field `source` at line 1 column 102 > > Location: > src/main.rs:329:10 Jörg Thalheim2024-08-021-1/+6
* nixos/make-initrd-ng: dlopen ELF notesWill Fancher2024-07-211-22/+111
* nixos/make-initrd-ng: Pass contents as JSONWill Fancher2024-07-214-22/+72
* makeModulesClosure: include /lib/firmware/edid•••modules-closure.sh seems to consider everything under /lib/firmware to be a kernel module, this change adds a special handling of `edid` directory, which does not contain kernel modules fixes #279739 Krzysztof Nazarewski2024-07-181-0/+8
* Merge pull request #319220 from ExpidusOS/fix/test-infinite-recurse•••Fix failures with pkgs/top-level/release-attrpaths-superset.nixjade2024-06-301-5/+5
|\
| * pkgs/build-support/kernel/make-initrd.nix: fix eval for test on darwinTristan Ross2024-06-141-5/+5
* | maintainers: drop lheckemannLinus Heckemann2024-06-211-1/+1
|/
* nixos/udev: compress firmware with zstd if possible•••Closes #267442 $ nix path-info -Sh /nix/store/qj1dm7wfw5m3mxf1gn3fdm0az9y1h5ny-linux-firmware-20240312-xz /nix/store/qj1dm7wfw5m3mxf1gn3fdm0az9y1h5ny-linux-firmware-20240312-xz 440.3M $ nix path-info -Sh /nix/store/c3szcjxb3g990dbiz7llwmkaf0bi98j2-linux-firmware-20240312-zstd /nix/store/c3szcjxb3g990dbiz7llwmkaf0bi98j2-linux-firmware-20240312-zstd 460.6M This is an increase of 4.4%, but OTOH zstd has a significantly higher decompression speed[1]. [1] https://gregoryszorc.com/blog/2017/03/07/better-compression-with-zstandard/ Maximilian Bosch2024-04-192-29/+43
* linux kernel: prefer zstd where possible•••Closes #302291 Closes #301536 The following things have changed: * For 5.7+: ZSWAP compressor uses zstd now. * For 5.11+: ZRAM compressor uses zstd now. * For 5.13+: kernel modules are compressed with zstd instead of xz. * For 5.19+: support zstd-compressed firmware. The modules-closure functionality needed explicit support for copying over `.zst` files. Also, the VM image builder used busybox's `insmod` before which doesn't support zstd. Switched to `kmod` and added xz/zstd as dependencies for it, similar to how it's done for the actual stage1 in d33e52b2539c5b36a5a876df9006a7145efd42ea. The use of `kmod` here doesn't seem to be such a big deal since it's only a build-time dependency. Maximilian Bosch2024-04-191-1/+1
* Merge pull request #288212 from r-ryantm/auto-update/makeInitrdNGTool•••makeInitrdNGTool: 0.1.0 -> 0.1.0Will Fancher2024-03-271-2/+2
|\
| * makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm2024-02-121-2/+2
* | treewide: add meta.mainProgram to packages with a single binary•••The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible. stuebinm2024-03-191-0/+1
|/
* Merge pull request #283770 from r-ryantm/auto-update/makeInitrdNGTool•••makeInitrdNGTool: 0.1.0 -> 0.1.0Will Fancher2024-02-101-2/+2
|\
| * makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm2024-01-251-2/+2
* | compressFirmwareXz: don't allow referencesAlyssa Ross2024-01-281-1/+3
* | compressFirmwareXz: fail on broken symlinks•••This would have caught the last two issues we had with compression. Alyssa Ross2024-01-281-0/+3
* | compressFirmwareXz: fix symlink type check•••The previous version didn't work in the case of relative symlinks in subdirectories. If "foo/bar" was a link to "baz", it would check for a link to "baz" in the root, rather than under "foo". We don't need to dereference the symlink ourselves for [ anyway, as it dereferences its arguments itself, so all we need to do to fix this is to pass it the link. Fixes: 14f83d5c6f98 ("compressFirmwareXz: fix links to directories") Alyssa Ross2024-01-281-1/+1
* | compressFirmwareXz: fix links to directories•••Only add the `.xz` suffix to links if link target is a regular file. This breaks if the target is a directory. Fixes #283005. Franz Pletz2024-01-231-1/+5
|/
* makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm2024-01-071-6/+6
* makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm2024-01-011-6/+6
* Merge pull request #272125 from yaxitech/reproducible-initrd•••make-initrd-ng: fix reproducibility problemsAtemu2023-12-241-4/+4
|\
| * make-initrd-ng: fix reproducibility problems•••The previous find invocation didn't match the root directory, so the root directory's access and modification time wasn't set to a deterministic value and the build time leaked into the output. `make-initrd` replaced `cpio` with `bsdtar` in #165892 because the former includes the number of hardlinks in the created archive, which depends on the filesystem (and can also be influenced by `nix-store --optimise`). The same problem applies to `make-initrd-ng`, so this commit replaces `cpio` with `libarchive`'s `bsdtar`. Andreas Stührk2023-12-041-4/+4
* | makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm2023-12-161-8/+8
|/
* makeModulesClosure: handle firmware glob patterns•••A handful of kernel modules use glob patterns to express their firmware dependencies. (`git grep 'MODULE_FIRMWARE.*\*'`) Previously, we weren't handling these patterns. Now, we are. Alyssa Ross2023-11-291-6/+5
* makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm2023-11-231-4/+4
* systemd-stage-1: Use specific fs packagesWill Fancher2023-10-191-1/+1
* makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm2023-10-111-25/+16