I am new to Nix. I want to compile Linux from external source (hosted on github) for riscv64. I am using ubuntu on x86_64 machine. Can any one point me to some reference code how cross compilation works? Whatever tutorial I have found, they explain cross compilation of linux versions available with nixpkgs.
Thanks.
Have a look at this repo: https://github.com/zhaofengli/nixos-riscv64 and especially for building a Kernel hosted in some git repo: https://github.com/zhaofengli/nixos-riscv64/blob/def02c67833bf551288c5cbd8ed6652b255d2fe8/pkgs/linux-visionfive/default.nix
1 Like
@matthewcroughan had a project with this
1 Like