about summary refs log tree commit diff
path: root/pkgs/build-support/kernel
AgeCommit message (Collapse)AuthorFilesLines
2024-03-27Merge pull request #288212 from r-ryantm/auto-update/makeInitrdNGToolWill Fancher1-2/+2
makeInitrdNGTool: 0.1.0 -> 0.1.0
2024-03-19treewide: add meta.mainProgram to packages with a single binarystuebinm1-0/+1
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.
2024-02-12makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm1-2/+2
2024-02-10Merge pull request #283770 from r-ryantm/auto-update/makeInitrdNGToolWill Fancher1-2/+2
makeInitrdNGTool: 0.1.0 -> 0.1.0
2024-01-28compressFirmwareXz: don't allow referencesAlyssa Ross1-1/+3
2024-01-28compressFirmwareXz: fail on broken symlinksAlyssa Ross1-0/+3
This would have caught the last two issues we had with compression.
2024-01-28compressFirmwareXz: fix symlink type checkAlyssa Ross1-1/+1
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")
2024-01-25makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm1-2/+2
2024-01-23compressFirmwareXz: fix links to directoriesFranz Pletz1-1/+5
Only add the `.xz` suffix to links if link target is a regular file. This breaks if the target is a directory. Fixes #283005.
2024-01-07makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm1-6/+6
2024-01-01makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm1-6/+6
2023-12-24Merge pull request #272125 from yaxitech/reproducible-initrdAtemu1-4/+4
make-initrd-ng: fix reproducibility problems
2023-12-16makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm1-8/+8
2023-12-04make-initrd-ng: fix reproducibility problemsAndreas Stührk1-4/+4
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`.
2023-11-29makeModulesClosure: handle firmware glob patternsAlyssa Ross1-6/+5
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.
2023-11-23makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm1-4/+4
2023-10-19systemd-stage-1: Use specific fs packagesWill Fancher1-1/+1
2023-10-11makeInitrdNGTool: 0.1.0 -> 0.1.0R. Ryantm1-25/+16
2023-08-14make-initrd-ng: use hostPlatform.ubootArch for uinitrdArchAdam Joseph1-1/+1
This allows make-initrd-ng to pick up the few cases where Linux and u-boot disagree.
2023-07-22Merge pull request #239624 from Stunkymonkey/use-optionalString-thenFelix Bühler1-1/+1
treewide: use optionalString instead of 'then ""'
2023-06-25compressFirmwareXz: preserve meta attributesrnhmjoj1-2/+6
Among other things, this preserves the package priority, which is important when building the `hardware.firmware` environment in NixOS.
2023-06-24treewide: use optionalString instead of 'then ""'Felix Buehler1-1/+1
2023-05-25makeInitrdNGTool: better errorsCole Helbling3-23/+68
It's extremely frustrating seeing "Error: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }" without any hint as to where exactly that occurred. This commit fixes that by adding context to most errors.
2023-04-11systemd-initrd: Fix up root directory modeWill Fancher1-2/+2
2023-02-20make-initrd-ng: document wrapped file behaviorLily Foster1-0/+3
2023-02-20make-initrd-ng: support wrapped executablesLily Foster1-1/+15
2022-11-19splice.nix: start deprecating nativeDrv and crossDrvArtturin1-1/+1
2022-08-02make-initrd-ng: clean up a bitK9001-4/+3
2022-08-02makeInitrdNG: add meta and update scriptLinus Heckemann2-0/+12
2022-08-02makeInitrdNG: make stripping fully optionalLinus Heckemann3-19/+19
Now the tool will only strip binaries if a strip executable is passed via the STRIP environment variable. This is exposed via the strip option for makeInitrdNG and the NixOS option boot.initrd.systemd.strip.
2022-08-02make-initrd-ng: use goblin instead of shelling out to patchelf and friendsK9003-51/+142
2022-08-02make-initrd-ng: rustfmtK9001-10/+27
2022-05-26compressFirmwareXz: fix with empty lib/firmwareAlyssa Ross1-1/+1
Fixes: 8aa8e0ce7f1 ("nixos/udev: compress all firmware if supported")
2022-05-13nixos/udev: compress all firmware if supportedAlyssa Ross2-2/+22
This should be a significant disk space saving for most NixOS installations. This method is a bit more complicated than doing it in the postInstall for the firmware derivations, but this way it's automatic, so each firmware package doesn't have to separately implement its compression. Currently, only xz compression is supported, but it's likely that future versions of Linux will additionally support zstd, so I've written the code in such a way that it would be very easy to implement zstd compression for those kernels when they arrive, falling back to xz for older (current) kernels. I chose the highest possible level of compression (xz -9) because even at this level, decompression time is negligible. Here's how long it took to decompress every firmware file my laptop uses: i915/kbl_dmc_ver1_04.bin 2ms regulatory.db 4ms regulatory.db.p7s 3ms iwlwifi-7265D-29.ucode 62ms 9d71-GOOGLE-EVEMAX-0-tplg.bin 22ms intel/dsp_fw_kbl.bin 65ms dsp_lib_dsm_core_spt_release.bin 6ms intel/ibt-hw-37.8.10-fw-22.50.19.14.f.bseq 7ms And since booting NixOS is a parallel process, it's unlikely (but difficult to measure) that the time to user interaction was held up at all by most of these. Fixes (partially?) #148197
2022-05-01makeInitrdNG: Strip more and remove outputJanne Heß3-10/+25
This strips all elf files as far as possible and removes a lot of unnecessary output. Also wrap in the binaries instead of relying on $PATH.
2022-04-21Merge pull request #165892 from tpwrules/fix-initrd-dirlinksArtturi2-3/+3
make-initrd: fix reproducibility problems
2022-04-16nixos/stage-1-init: Pass all parameters to the builderJanne Heß1-1/+15
This is for compatiblity with the old builder to get compat with uboot support and to prepend microcode updates to the initrd
2022-04-14make-initrd: fix reproducibility problemsThomas Watson2-3/+3
cpio includes the number of directory hard links in archives it creates. Some filesystems, like btrfs, do not count directory hard links the same way as more common filesystems like ext4 or tmpfs, so archives built when /tmp is on such a filesystem do not reproduce. This patch replaces cpio with bsdtar, which does not have this issue. The specific invocation is from this page: https://reproducible-builds.org/docs/archives/
2022-03-22make-initrd-ng: initWill Fancher6-0/+389
2022-01-29make-initrd: fix reproducibility problems with hard linksThomas Watson1-1/+1
2021-08-08make-initrd: fix #132059Linus Heckemann2-3/+3
2021-01-27treewide: stdenvNoCC.lib -> libBen Siraphob1-1/+1
2021-01-23lib: Clean up how linux and gcc config is specifiedJohn Ericson1-2/+2
Second attempt of 8929989614589ee3acd070a6409b2b9700c92d65; see that commit for details. This reverts commit 0bc275e63423456d6deb650e146120c39c1e0723.
2021-01-22Revert "lib: Clean up how linux and gcc config is specified"Jonathan Ringer1-2/+2
This is a stdenv-rebuild, and should not be merged into master This reverts commit 8929989614589ee3acd070a6409b2b9700c92d65.
2021-01-21lib: Clean up how linux and gcc config is specifiedJohn Ericson1-2/+2
The `platform` field is pointless nesting: it's just stuff that happens to be defined together, and that should be an implementation detail. This instead makes `linux-kernel` and `gcc` top level fields in platform configs. They join `rustc` there [all are optional], which was put there and not in `platform` in anticipation of a change like this. `linux-kernel.arch` in particular also becomes `linuxArch`, to match the other `*Arch`es. The next step after is this to combine the *specific* machines from `lib.systems.platforms` with `lib.systems.examples`, keeping just the "multiplatform" ones for defaulting.
2021-01-11nixos/modules-closure.sh: don't fail if firmware is missingDominik Xaver Hörl1-1/+2
Since fdf32154fc90698ef72ffa96ef39d920e1b9c951, we no longer allow missing modules in the initrd. Unfortunately since before this commit, the modules-closure script would also fail on missing firmware, which is a very common case (e.g. xhci-pci.ko.xz lists renesas_usb_fw.mem as dependent firmware). Fix this by only issuing a warning instead.
2020-12-17make-initrd: various improvementsLinus Heckemann3-18/+135
- Generate a link to the initramfs file with an appropriate file extension, guessed based on the compressor by default - Use correct metadata in u-boot images if generated, up to now this was hardcoded to gzip and would silently generate an erroneous image if another compressor was specified - Document all the parameters - Improve cross-building compatibility, by allowing passing either a string as before, or a function taking a package set and returning the path to a compressor in the "compressor" argument of the function. - Support more compression algorithms - Place compressor executable function and arguments in passthru, for reuse when appending initramfses Co-Authored-By: Dominik Xaver Hörl <hoe.dom@gmx.de>
2020-12-17makeInitrd: include dotfiles at rootLinus Heckemann1-2/+2
2020-12-17makeInitrd: don't assume uImage => armLinus Heckemann2-2/+3
mips for example might use uImages too
2020-12-17makeInitrd: make uinitrd behaviour optionalLinus Heckemann1-3/+2