moby: cross-compile the kernel

This commit is contained in:
colin 2022-08-08 20:36:21 -07:00
parent f0b772d688
commit 913c9e5fdf
3 changed files with 8 additions and 2 deletions

View File

@ -12,3 +12,5 @@
nixpkgs.crossSystem.system = "aarch64-linux";
}];
```
- <https://github.com/nix-community/aarch64-build-box>
- apply for access to the community arm build box

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, mobile-nixos, ... }:
{ config, pkgs, nixpkgs, lib, mobile-nixos, ... }:
{
imports = [
# (import "${mobile-nixos}/lib/configuration.nix" {
@ -57,7 +57,10 @@
# - and sun50i-a64-cpu-opp.dtsi
# - no need to touch the allwinner-h6 stuff: that's the SBC pine product
# - i think it's safe to ignore sun9i stuff, but i don't know what it is
boot.kernelPackages = pkgs.linuxPackages_5_18;
# boot.kernelPackages = pkgs.linuxPackages_5_18;
boot.kernelPackages =
let p = (import nixpkgs { localSystem = "x86_64-linux"; });
in p.pkgsCross.aarch64-multiplatform.linuxPackages_5_18;
boot.kernelPatches =
let
# use the last commit on the 5.18 branch (5.18.14)

View File

@ -12,6 +12,7 @@ with lib;
# enable cross compilation
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
# nixpkgs.config.allowUnsupportedSystem = true;
# nixpkgs.crossSystem.system = "aarch64-linux";
powerManagement.cpuFreqGovernor = "powersave";