Repository navigation
linux: non‐trivial builder clean‐ups - #571142
Conversation
ea25ed1 to
6ebebc6
Compare
|
Seems to break some linuxPackages, e.g. zfs? |
4bff6e6 to
f64e61c
Compare
6ebebc6 to
865e4a7
Compare
|
Should be fixed now; I considered just building directly into the final build tree location (it also leaks into e.g. some Rust |
There was a problem hiding this comment.
The PR's base branch is set to staging-nixos, but this PR causes 1676 rebuilds.
It is therefore considered a mass rebuild.
Please change the base branch to the right base branch for your changes (probably staging).
This saves copying it after the build, and avoids issues relating to the kernel build system recording the absolute directory of the source tree and triggering unnecessary rebuilds when it changes.
`make clean` is [documented] to leave enough to build external modules, which it almost does for our purposes (we also need to keep `vmlinux` and `resolve_btfids`, and PowerPC is weird). We can avoid redundant builds and simplify our packaging by using it and then moving the entire build directory. [documented]: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile?h=v7.2#n1982> This also shrinks the `dev` output by dropping some intermediate object files from `scripts/`.
This is only relevant when the `vmlinux` ELF target is used. As before, we don’t strip the `vmlinux` in the `dev` output (which makes it extremely huge and makes the stripping of the source tree we do quite pointless, but that’s a matter for another day…), as that’s a symlink since the previous commit.
The kernel has an explicit top‐level target for this file we can use to catch the error more quickly.
865e4a7 to
cf4da14
Compare
|
Fixed the merge conflict with #569786. |
There was a problem hiding this comment.
The PR's base branch is set to staging-nixos, but this PR causes 1705 rebuilds.
It is therefore considered a mass rebuild.
Please change the base branch to the right base branch for your changes (probably staging).
zowoq
left a comment
There was a problem hiding this comment.
LGTM, also built the nsresourced nixosTest, a couple of aarch64 native and riscv cross kernels.
I'll add an exemption for this. #572634 |
|
Bisecting FTBFS of 42f4cc3 fails on: cp -rL ../scripts/gdb/ $dev/lib/modules/${modDirVersion}/build/scripts…, ignoring that one because the next commit dropped that line. Since 739a9b2 (b47137a does not fix this): And then at some later point, specifically |
| # Apply the equivalent of upstream commit | ||
| # dda135077ecc9f15c407f094dcfe7800376be867 to older versions to | ||
| # avoid cyclic output dependency issues when building | ||
| # uncompressed kernel images. | ||
| + lib.optionalString (lib.versionOlder version "7.0") " --remap-path-prefix=${placeholder "dev"}/lib/modules/${modDirVersion}/source/= --remap-path-scope=macro" |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This one seems to come from Extracting that from Same issue with the embedded 32-bit & 64-bit vDSO solibs: And those also have a reference to |
|
Also affects powerpc64le-linux ( |
Clean up the kernel source unpacking and retained build tree in preparation for the image rebuild and deterministic module signing work.
Stacked on top of #571141.
This is part of the end‐to‐end NixOS boot security project, funded through NGI Fediversity Fund, a fund established by NLnet with financial support from the European Commission’s Next Generation Internet programme.
Things done
linux_5_10,linux,linux_latest)passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.