Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubootTools overlay seemingly superfluous #695

Closed
benaryorg opened this issue Mar 12, 2024 · 1 comment · Fixed by #698
Closed

ubootTools overlay seemingly superfluous #695

benaryorg opened this issue Mar 12, 2024 · 1 comment · Fixed by #698

Comments

@benaryorg
Copy link

benaryorg commented Mar 12, 2024

Description

Related to #623 and #626, the overlay patches seem unnecessary.
A configuration like the following would under normal circumstances use the kernel already built upstream:

{ pkgs, ... }:
{
  mobile.boot.stage-1.kernel.useNixOSKernel = true;
  boot.kernelPackages = pkgs.linuxPackages_6_6;
}

However the buildInputs change when running something like this against say nixpkgs/nixos-23.11 as the openssl dependency added in the overlay is already present upstream, which results in the dependency being added twice¹, which changes the derivation and causes a rebuild of the entire kernel and prevents reuse of upstream kernels.

As far as I can tell the ubootTools entry in the overlay has therefore become fully obsolete and can be dropped, though I'd like to hear a second opinion on that ^^

¹: the derivation differs for me as follows:

buildInputs=''
-/nix/store/jixn7hrwbhvbd9jb7458y1w13axk6hd0-ncurses-6.4-dev /nix/store/jwmw2x0cg5s2sskbmpahh6y5ys484ccy-util-linux-minimal-2.39.2-dev /nix/store/xl3jlfnmnvwzcbhmlav1iz917g92gvnf-gnutls-3.8.3-dev /nix/store/x2b2kzkakf8scw2z2lm1byb5fsmv13jh-openssl-3.0.13-dev
+/nix/store/jixn7hrwbhvbd9jb7458y1w13axk6hd0-ncurses-6.4-dev /nix/store/jwmw2x0cg5s2sskbmpahh6y5ys484ccy-util-linux-minimal-2.39.2-dev /nix/store/xl3jlfnmnvwzcbhmlav1iz917g92gvnf-gnutls-3.8.3-dev /nix/store/x2b2kzkakf8scw2z2lm1byb5fsmv13jh-openssl-3.0.13-dev /nix/store/x2b2kzkakf8scw2z2lm1byb5fsmv13jh-openssl-3.0.13-dev
''

Notes

This is currently not easily reproducible with android builds since those fail when useNixOSKernel = true is set due to other issues.
It should be possible to reproduce this with the uefi builds though, as those have tests (which I blindly assume to be building properly).
I'm currently not working on that though so I can neither confirm nor deny that.

@samueldr
Copy link
Member

It likely is, I'll have to take a look. It likely was needed to fix cross-compilation at some point.

Note that ubootTools as a whole recently became a dependency of any kernel build. In theory it should be unused in this situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants