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

nixos/raspberryPi: use buildPackages for conf builders #66535

Closed

Conversation

eadwu
Copy link
Member

@eadwu eadwu commented Aug 12, 2019

Extension of #62333.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@eadwu eadwu force-pushed the raspberryPi/builder-cross-compilation-fix branch from 9a3e3b4 to 841e671 Compare August 12, 2019 20:27
@eadwu eadwu changed the title nixos/raspberryPi: use buildPackages for extlinux nixos/raspberryPi: use buildPackages for conf builders Aug 12, 2019
@matthewbauer
Copy link
Member

I do not this this is correct. system.build.installBootLoader will be run on the cross system, so you should not use buildPackages here, otherwise, nixos-rebuild switch will get the wrong execution format. There could be a corner case here I have not considered, but I thought we got them all set correctly in #62333.

More discussion on this at #62318

/cc @illegalprime @kampka

@eadwu
Copy link
Member Author

eadwu commented Aug 13, 2019

I'm currently cross compiling to aarch64 from x86_64 so if it runs on the cross system, it'll fail with the wrong exec format on my host system. While for running nixos-rebuild switch on the native system (aarch64), I was under the thought buildPackages would be equivalent to the normal package set for the system so it wouldn't have any changes?

@eadwu
Copy link
Member Author

eadwu commented Aug 13, 2019

Well I somehow ventured into nixos/modules/system/boot/loader/raspberrypi after trying to debug why the image wouldn't boot correctly (it was due to the latest raspberrypifw upstream) so I'll just close this since the sd-image-aarch64.nix works fine now.

@eadwu eadwu closed this Aug 13, 2019
@eadwu eadwu deleted the raspberryPi/builder-cross-compilation-fix branch November 17, 2020 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants