2008-01-08 00:18:20 +00:00
|
|
|
args : with args;
|
2008-03-24 19:39:12 +00:00
|
|
|
rec {
|
|
|
|
name = "kqemu-"+version;
|
|
|
|
src = fetchurl {
|
2009-04-10 16:36:55 +01:00
|
|
|
url = http://www.nongnu.org/qemu/kqemu-1.3.0pre11.tar.gz;
|
2008-03-24 19:39:12 +00:00
|
|
|
sha256 = "03svg2x52ziglf9r9irf6ziiz8iwa731fk1mdskwdip5jxbyy6jl";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [];
|
|
|
|
configureFlags = [''--PREFIx=$out'' ''--kernel-path=$(ls -d ${kernel}/lib/modules/*/build)''];
|
2009-05-20 00:25:58 +01:00
|
|
|
debugStep = fullDepEntry (''
|
2008-01-08 00:18:20 +00:00
|
|
|
cat config-host.mak
|
2008-03-24 19:39:12 +00:00
|
|
|
'') ["minInit"];
|
2009-05-20 00:25:58 +01:00
|
|
|
preConfigure = fullDepEntry (''
|
2008-03-24 19:39:12 +00:00
|
|
|
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
|
2009-02-08 13:22:26 +00:00
|
|
|
sed -e '/linux\/ioctl.h/a#include <linux\/sched.h>' -i kqemu-linux.c
|
2008-03-24 19:39:12 +00:00
|
|
|
'') ["minInit" "doUnpack"];
|
2009-02-24 21:17:54 +00: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-03-24 19:39:12 +00:00
|
|
|
|
|
|
|
meta = {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "Kernel module for Qemu acceleration";
|
2008-03-24 19:39:12 +00:00
|
|
|
};
|
2008-01-08 00:18:20 +00:00
|
|
|
}
|