I’m building custom sd card image with nixos for aarch64 target (mt7622 soc) on x86 host computer and faced with kernel cross-compile issue. In general everything works, but when I’m trying to apply patches to kernel or changes in config kernel recompiles from scratch (obviously) using user-space qemu to call aarch64 version of gcc (which is less obvious for me). It takes a lot of time even on 12-core i7. Is it possible to build kernel using native gcc without qemu emulation?
I’m building my image using this command:
NIXOS_CONFIG=$(pwd)/configuration.nix nix-build ./image.nix
and using configuration.nix, image.nix