-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add ootb RPi SD "support" #73
Conversation
4caec6c
to
7059224
Compare
latest kernel support got merged in master, so the patch + overlay is soon no more necesary |
Don't use sdcard module from master due to modules and pkg incopmatibilities
Ok, so: $ nix develop
$ flk sd fails with (what the heck?) /nix/store/fy819ys8fyzm02bjvzfvr7qiihr4allh-flk-env/bin/nix: line 2: 104701 Segmentation fault (core dumped) /nix/store/6b7s5f2vrlixmlyr9bi1gkrgkq6xqgmw-nix-2.4pre20201205_a5d85d0/bin/nix --option experimental-features "nix-command flakes ca-references" "$@" But on a similar structured repo, it fails with: Package ‘raspberrypi-firmware-1.20200601’ in /nix/store/vc3v85pjs6v04wn5w03z1b0mkl6r0p5q-source/pkgs/os-specific/linux/firmware/raspberrypi/default.nix:20 is not supported on ‘x86_64-linux’, refusing to evaluate.
a) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.
b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.
(use '--show-trace' to show detailed location information) I'm concluding that cross compilation is not supported to date in nixflk. |
I haven't messed with cross compilation in general in |
EDIT: Sorry this doesn't cross compile, it uses qemu emulation which may not be what you want. @blaggacao The radical but easiest way would likely to be: https://gist.github.com/mohe2015/3baaf764264f7bb9630bbe18dbdb6d8b/revisions (sorry for the not perfect diff, I just used my local version). This changes the build path to e.g. build with Edit: You then can't use the normal nixos-rebulid because it searches for the wrong path. No liability for any damages because I don't know myself what I'm doing but: sudo nix build --profile /nix/var/nix/profiles/system .#nixosConfigurations.x86_64-linux.NixOS.config.system.build.toplevel
sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch should work. nix build .#nixosConfigurations.aarch64-linux.nixSD.config.system.build.sdImage should build the aarch64 image. To get the old way to work again a merge of both methods would probably be necessary. |
This seems to be supplanted by your #105, can I close? |
Example of #72 — since this is potentially out of scope for nixflk, I'm leaving it as draft for others to discover how I solved it. Maybe some aspets can inform nixflk, though (like renaming niximg to nixISO, or such).