-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
uboot: only apply raspberry pi patches to raspberry pi builds #146634
base: master
Are you sure you want to change the base?
Conversation
Otherwise, builds which don't care about the raspberry pi at all may fail to build because the rpi-specific patches don't apply to that particular source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(As briefly stated in the NixOS on ARM matrix room)
The buildUBoot
interface has poor semantics for being used outside of Nixpkgs safely.
Moving the patches around is not good. We should dogfood patches entirely, proving it's consequences-free on all tested platforms, rather than hope it is and only patch one platform.
The solution I would prefer being used is an interface that allows disabling the built-in patch set. Though it might be "too much magic", it could apply the patches only if src
is defaultSrc
.
(Side-note: there are two fresh competing PRs to fix the Pinephone issues in Mobile NixOS already) |
I think we shouldn't be applying any patches (unless they're for buildability with nixpkgs, but we don't have any such patches and if we need them they should be upstreamed) in the generic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this might not be what we want in the end, it is better then the current solution which applies these patches to all uboot builds,
The main issue here is that We (overall, not we people in this discussion) had the discussion about applying patches in the past, and the preferred option was to always apply patches all the time, to better dogfood them, rather than accidentally cause partial build failures. I understand we need a solution to this issue, but I really believe this is not the way forward. Mainly because this is pushing aside the real issue that at some point in the future we may need to apply "for Nixpkgs" patches, and at that point the issue comes back. |
I'm perfectly fine with "for nixpkgs" patches breaking my out-of-nixpkgs build though. Less so with "for raspberry pi" patches breaking my non-raspberry-pi build. I think that even if |
Since the function is called buildUboot and not buildPiUboot I appreciate the PR. The interface to not allow to disable the patches. |
I feel it's useful and should be kept around. Being able to follow the instructions here to get a uboot binary immediately without any concern around figuring out dependencies or cross compilers is hugely useful and reduces barriers to people interested in porting new boards. To that end, this patch gets in the way of anyone who wants to build against upstream uboot, or some vendor fork, or in-tree with a flake with
Fair concern, but particularly for the rpi, which is (guessing here) by-far the most common arm board that people are using, I am not sure it will go unnoticed for long.
IMO the preference should always be to not apply patches unless absolutely necessary and I'm not sure it's right to plan for a prolonged period of needing to apply "for nixpkgs" patches -- for this particular patch, upstream probably won't take it, but in other cases I think there's a strong likelihood that if nixos needs it, they'll just take the change straight-up. For this particular patch, maybe upstream would accept a patch that does:
And then we can pass it from make? |
The buildUBoot function was originally intended for internal use and is dedicated for Raspberry Pi platforms. With latest nixpkgs it is causing build failure due to an Raspberry Pi patch. This function has been removed from the U-Boot build configuration. More Information: NixOS/nixpkgs#311614 NixOS/nixpkgs#146634 Signed-off-by: Ganga Ram <Ganga.Ram@tii.ae>
The buildUBoot function is intended for internal use and is dedicated for Raspberry Pi platforms. With latest nixpkgs it is causing build failure in older uboot(prior to v2023.07) due to a Raspberry Pi patch. Now this function is not used for the U-Boot build. More Information: NixOS/nixpkgs#311614 NixOS/nixpkgs#146634 Signed-off-by: Ganga Ram <Ganga.Ram@tii.ae>
The buildUBoot function is intended for internal use and is dedicated for Raspberry Pi platforms. With latest nixpkgs it is causing build failure in older uboot(prior to v2023.07) due to a Raspberry Pi patch. Now this function is not used for the U-Boot build. More Information: NixOS/nixpkgs#311614 NixOS/nixpkgs#146634 Signed-off-by: Ganga Ram <Ganga.Ram@tii.ae>
The buildUBoot function is intended for internal use and is dedicated for Raspberry Pi platforms. With latest nixpkgs it is causing build failure in older uboot(prior to v2023.07) due to a Raspberry Pi patch. Now this function is not used for the U-Boot build. More Information: NixOS/nixpkgs#311614 NixOS/nixpkgs#146634 Signed-off-by: Ganga Ram <Ganga.Ram@tii.ae>
Motivation for this change
Otherwise, builds which don't care about the raspberry pi at all may
fail to build because the rpi-specific patches don't apply to that
particular source.
Found while trying to build mobile-nixos's pinephone uboot for the currently pinned nixpkgs revision.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)