Created
November 22, 2017 00:26
-
-
Save telent/f4db573d4ed3d8d314487ae7c3794bb7 to your computer and use it in GitHub Desktop.
(this doesn't work)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> { | |
crossSystem = { | |
system = "mipsel-linux-gnu"; | |
withTLS = true; | |
platform = { | |
uboot = null; | |
name = "malta"; | |
kernelArch = "mips"; | |
kernelBaseConfig = "malta_defconfig"; | |
kernelHeadersBaseConfig = "malta_defconfig"; | |
kernelTarget = "uImage"; | |
gcc = { abi = "gnu"; } ; | |
kernelAutoModules = false; | |
kernelModules = false; | |
kernelPreferBuiltin = true; | |
}; | |
}; | |
}; | |
let nocheck = d : lib.overrideDerivation d (a: { | |
doCheck = stdenv.buildPlatform == stdenv.hostPlatform; | |
}); | |
in rec { | |
hello = (nocheck pkgs.hello); | |
linux = linux_latest; | |
kernel = lib.overrideDerivation linux (a: { | |
name = "nixwrt_kernel"; | |
}); | |
all = buildEnv { | |
name = "nixwrt"; | |
paths = [ hello pkgs.busybox ]; | |
}; | |
} |
For the avoidance of doubt, the command I'm running is
NIX_PATH=nixpkgs=`pwd`/nixpkgs nix-build -A linux --show-trace
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to cross-compile a mips kernel for my router, building on an x86-64 machine. However, I cobbled it together by copypasta and cargo-culting and perhaps unsurprisingly it dosn't work. It dies with the error
Can anyone see what I'm doing wrong?