From e9f3ef3b2be5342f7785b9c4410f0457f8e4f209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Thu, 7 Mar 2024 11:47:15 +0200 Subject: [PATCH] arm64 kernel: cross-compile --- flake.nix | 7 +++++++ shared/platform/orangepi5plus.nix | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 26a4ee9..b0859e7 100644 --- a/flake.nix +++ b/flake.nix @@ -110,6 +110,13 @@ nicer = super.callPackage ./pkgs/nicer.nix {}; gamja = super.callPackage ./pkgs/gamja.nix {}; }) + (_: _: { + crossArm64 = import nixpkgs { + system = "x86_64-linux"; + hostPlatform.config = "aarch64-linux"; + buildPlatform.config = "x86_64-linux"; + }; + }) ]; mkVM = system: diff --git a/shared/platform/orangepi5plus.nix b/shared/platform/orangepi5plus.nix index 61e84c4..3564c19 100644 --- a/shared/platform/orangepi5plus.nix +++ b/shared/platform/orangepi5plus.nix @@ -5,7 +5,7 @@ modulesPath, ... }: let - crossPkgs = pkgs.pkgsCross.aarch64-multiplatform; + crossPkgs = pkgs.crossArm64.pkgsCross.aarch64-multiplatform; in { boot = { kernelPackages = crossPkgs.linuxPackagesFor (crossPkgs.buildLinux rec {