2008-11-02 16:54:44 +01:00
|
|
|
args : with args;
|
|
|
|
rec {
|
|
|
|
name = "kqemu-"+version;
|
|
|
|
src = fetchurl {
|
2009-05-10 23:22:36 +02:00
|
|
|
url = http://www.nongnu.org/qemu/kqemu-1.4.0pre1.tar.gz;
|
2008-11-02 16:54:44 +01:00
|
|
|
sha256 = "14dlmawn3gia1j401ag5si5k1a1vav7jpv86rl37p1hwmr7fihxs";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [];
|
|
|
|
configureFlags = [''--PREFIx=$out'' ''--kernel-path=$(ls -d ${kernel}/lib/modules/*/build)''];
|
|
|
|
debugStep = FullDepEntry (''
|
|
|
|
cat config-host.mak
|
|
|
|
'') ["minInit"];
|
|
|
|
preConfigure = FullDepEntry (''
|
|
|
|
sed -e 's/`uname -r`/'"$(basename ${kernel}/lib/modules/*)"'/' -i install.sh
|
|
|
|
sed -e '/kernel_path=/akernel_path=$out$kernel_path' -i install.sh
|
|
|
|
sed -e '/depmod/d' -i install.sh
|
|
|
|
cat install.sh
|
|
|
|
'') ["minInit" "doUnpack"];
|
2009-02-24 22:17:54 +01:00
|
|
|
fixInc = {
|
|
|
|
text = ''
|
|
|
|
sed -e '/#include/i#include <linux/sched.h>' -i kqemu-linux.c
|
|
|
|
'';
|
|
|
|
deps = ["minInit" "doUnpack"];
|
|
|
|
};
|
|
|
|
fixMemFunc = {
|
|
|
|
text=''
|
|
|
|
sed -e 's/memset/mymemset/g; s/memcpy/mymemcpy/g; s/void [*]my/static void *my/g' -i common/kernel.c
|
|
|
|
'';
|
|
|
|
deps = ["minInit" "doUnpack"];
|
|
|
|
};
|
|
|
|
phaseNames = ["fixInc" "fixMemFunc" "preConfigure" "doConfigure" "debugStep" "doMakeInstall"];
|
2008-11-02 16:54:44 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = " Kernel module for Qemu acceleration ";
|
|
|
|
};
|
|
|
|
}
|