From cfd9b77e82c6a4224b74215c7c0504014d83aa39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 21 Feb 2015 19:01:17 +0000 Subject: [PATCH] kernel: I hope to fix the dtbs thing I thought $arch was defined. Now I'm using karch, that should serve for cross building as well. --- pkgs/os-specific/linux/kernel/manual-config.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index dd619993ff0..ea29c7f9e0c 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -122,7 +122,7 @@ let mkdir -p $out/lib/firmware '') + (if (platform ? kernelDTB && platform.kernelDTB) then '' make $makeFlags "''${makeFlagsArray[@]}" dtbs - cp arch/$arch/boot/dts/*dtb $out + cp $buildRoot/arch/$karch/boot/dts/*dtb $out '' else "") + (if isModular then '' make modules_install $makeFlags "''${makeFlagsArray[@]}" \ $installFlags "''${installFlagsArray[@]}" @@ -225,6 +225,8 @@ stdenv.mkDerivation ((drvAttrs config stdenv.platform (kernelPatches ++ nativeKe "ARCH=${stdenv.platform.kernelArch}" ]; + karch = stdenv.platform.kernelArch; + crossAttrs = let cp = stdenv.cross.platform; in (drvAttrs crossConfig cp (kernelPatches ++ crossKernelPatches) crossConfigfile) // { makeFlags = commonMakeFlags ++ [ @@ -232,6 +234,8 @@ stdenv.mkDerivation ((drvAttrs config stdenv.platform (kernelPatches ++ nativeKe "CROSS_COMPILE=$(crossConfig)-" ]; + karch = cp.kernelArch; + # !!! uboot has messed up cross-compiling, nativeDrv builds arm tools on x86, # crossDrv builds x86 tools on x86 (but arm uboot). If this is fixed, uboot # can just go into buildInputs (but not nativeBuildInputs since cp.uboot