make the headers more generic, so we can also do things like MIPS.
svn path=/nixpkgs/trunk/; revision=4466
This commit is contained in:
30
pkgs/os-specific/linux/kernel-headers-cross/builder.sh
Normal file
30
pkgs/os-specific/linux/kernel-headers-cross/builder.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
source $stdenv/setup
|
||||
|
||||
|
||||
buildPhase() {
|
||||
make include/linux/version.h
|
||||
}
|
||||
|
||||
buildPhase=buildPhase
|
||||
|
||||
|
||||
installPhase() {
|
||||
mkdir $out
|
||||
mkdir $out/include
|
||||
#cd $out/include
|
||||
#ln -s asm-arm asm
|
||||
if test $cross = "arm-linux"; then
|
||||
arch=arm
|
||||
else if test $cross = "mips-linux"; then
|
||||
arch=mips
|
||||
fi
|
||||
fi
|
||||
make include/asm ARCH=$arch
|
||||
cp -prvd include/linux include/asm include/asm-$arch include/asm-generic $out/include
|
||||
echo -n > $out/include/linux/autoconf.h
|
||||
}
|
||||
|
||||
installPhase=installPhase
|
||||
|
||||
|
||||
genericBuild
|
||||
13
pkgs/os-specific/linux/kernel-headers-cross/default.nix
Normal file
13
pkgs/os-specific/linux/kernel-headers-cross/default.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{stdenv, fetchurl, cross}:
|
||||
|
||||
assert stdenv.system == "i686-linux";
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "linux-headers-2.6.13.4";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.13.4.tar.bz2;
|
||||
md5 = "94768d7eef90a9d8174639b2a7d3f58d";
|
||||
};
|
||||
inherit cross;
|
||||
}
|
||||
Reference in New Issue
Block a user