- 论坛徽章:
- 0
|
* Decide which kernel you are using. 2.4.x or 2.6.x, then
cp Makefile-Linux2x Makefile (x = 4 or 6)
Note: make sure to do this for 2.6.x kernel. a "make -f Makefile-26" doesnot wor
k
* Change KERNELSRC if need in Makefile
* If you cross compile it for 2.4.x kernel, you need to change CROSS_COMPILE
* Build kernel module (use root if compile for 2.6.x)
make
* Load kernel module as root
./load
* Build user space test program
make -f Makefile-user
* Run test program
./test
* run "dmesg" to check if reported data are same.
* Unload kernel module
./unload
上面是安装手册
我的系统fc6,服务器hp 580
make出现下列错误
[root@localhost iomtr_kstat]# make
make -C /lib/modules/`uname -r`/build/ SUBDIRS=`pwd` modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-1.2798.fc6-i586'
CC [M] /home/iometer-2004.07.30/src/iomtr_kstat/iomtr_kstat.o
/home/iometer-2004.07.30/src/iomtr_kstat/iomtr_kstat.c:58:26: error: linux/config.h: No such file or directory
/home/iometer-2004.07.30/src/iomtr_kstat/iomtr_kstat.c: In function 鈏mkstat_ioctl?
/home/iometer-2004.07.30/src/iomtr_kstat/iomtr_kstat.c:257: error: 鈙truct tcp_mib?has no member named 釺cpInSegs?
/home/iometer-2004.07.30/src/iomtr_kstat/iomtr_kstat.c:258: error: 鈙truct tcp_mib?has no member named 釺cpInSegs?
/home/iometer-2004.07.30/src/iomtr_kstat/iomtr_kstat.c:259: error: 鈙truct tcp_mib?has no member named 釺cpOutSegs?
/home/iometer-2004.07.30/src/iomtr_kstat/iomtr_kstat.c:260: error: 鈙truct tcp_mib?has no member named 釺cpOutSegs?
/home/iometer-2004.07.30/src/iomtr_kstat/iomtr_kstat.c:261: error: 鈙truct tcp_mib?has no member named 釺cpRetransSegs?
/home/iometer-2004.07.30/src/iomtr_kstat/iomtr_kstat.c:262: error: 鈙truct tcp_mib?has no member named 釺cpRetransSegs?
make[2]: *** [/home/iometer-2004.07.30/src/iomtr_kstat/iomtr_kstat.o] Error 1
make[1]: *** [_module_/home/iometer-2004.07.30/src/iomtr_kstat] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-1.2798.fc6-i586'
make: *** [standalone] Error 2 |
|