I have made some progress and again got stuck - see step 4 below!

1. Must run "make ARCH=um" as with kernel build. This solved the sysdep/faultinfo.h missing errors and makes sense given that the kernel itself had this flag set for all "make" script calls.

2. According to http://www.it.kth.se/courses/2G1305/nistnet-under-ubuntu-20061012.html

To fix the following problems with compiling of knistnet:

/home/maguire/nistnet-3.0a/kernel/knistnet.c:916: error: too few arguments to function ippt->func /home/maguire/nistnet-3.0a/kernel/knistnet.c:961: error: too few arguments to function ippt->func /home/maguire/nistnet-3.0a/kernel/knistnet.c:972: error: too few arguments to function ippt->func /home/maguire/nistnet-3.0a/kernel/knistnet.c:1003: error: too few arguments to function ippt->func

you simply need to add another argument to the call, so that it looks like:

 return ippt->func(skb, dev, ippt, NULL);

and then (not hit this yet):

After doing the 'make' and 'make install', I cheated and manually added a line to the file /lib/modules/2.6.15.7-ubuntu1/modules.dep

 /lib/modules/2.6.15.7-ubuntu1/extra/nistnet.ko:

Thus the modprobe in the Load.Nistnet now finds the nistnet module.

3. I now have the KBUILD_BASENAME problem from some semaphore assembly code in

       kernelsource /include/asm/semaphore.h

';' or ')' required before KBUILD_BASENAME

The web site used in 2 above also had this issue but in a different place so trying:

If you get error messages: saying

error: syntax error before KBUILD_BASENAME

Change nistnet/Config: EXTRA_CFLAGS += $(OURINCS) $(DEVDEFS) -fno-common
to

See: http://www.it.kth.se/courses/2G1305/nistnet-under-ubuntu-20061012.html
for further details of runtime issues with missing files etc.


EXTRA_CFLAGS += $(OURINCS) $(DEVDEFS) -fno-common -DKBUILD_MODNAME=\"nistnet\" -DKBUILD_BASENAME=\"nistnet\"

See http://www.ubuntuforums.org/archive/index.php/t-192942.html for details.

This appears to resolve the problems here.

4. Current problem:

In file included from /mnt/hostfs/nistnet-3.0a/kernel/fast_rtc.c:67:
include/linux/mc146818rtc.h:16:59: error: asm/mc146818rtc.h: No such file or directory
/mnt/hostfs/nistnet-3.0a/kernel/fast_rtc.c: In function 'rtc_is_updating':
/mnt/hostfs/nistnet-3.0a/kernel/fast_rtc.c:211: warning: implicit declaration of function 'CMOS_READ' /mnt/hostfs/nistnet-3.0a/kernel/fast_rtc.c: In function 'uninstall_fast_timer': /mnt/hostfs/nistnet-3.0a/kernel/fast_rtc.c:297: warning: implicit declaration of function 'CMOS_WRITE' /mnt/hostfs/nistnet-3.0a/kernel/fast_rtc.c:321: warning: implicit declaration of function 'RTC_PORT'
make[3]: *** [/mnt/hostfs/nistnet-3.0a/kernel/fast_rtc.o] Error 1

Have tried various suggestions on this as there are plenty of instances of this file in the headers but they all seem to fail to find something, normally the

asm/mc146818rtc.h which seems to be referenced from the arch specific versions of the file.

I have these versions of the file:

root) ls ../linux-2.6.18.1/include/asm*/*/mc14681*.h
../linux-2.6.18.1/include/asm/arch/mc146818rtc.h
../linux-2.6.18.1/include/asm-mips/mach-atlas/mc146818rtc.h
../linux-2.6.18.1/include/asm-mips/mach-dec/mc146818rtc.h
../linux-2.6.18.1/include/asm-mips/mach-generic/mc146818rtc.h
../linux-2.6.18.1/include/asm-mips/mach-ip32/mc146818rtc.h
../linux-2.6.18.1/include/asm-mips/mach-jazz/mc146818rtc.h
../linux-2.6.18.1/include/asm-mips/mach-mips/mc146818rtc.h
../linux-2.6.18.1/include/asm-mips/mach-pb1x00/mc146818rtc.h
../linux-2.6.18.1/include/asm-mips/mach-rm200/mc146818rtc.h
../linux-2.6.18.1/include/asm-sh/mpc1211/mc146818rtc.h
../linux-2.6.18.1/include/asm-um/arch/mc146818rtc.h

I have tried explicitly including the asm/um and the asm/arch versions at different times with no success.

Any help will be valuable to me.

Nick


Nick Filer wrote:
I'm am trying to get NistNet (http://snad.ncsl.nist.gov/nistnet/) working in VNUML (http://www.dit.upm.es/vnumlwiki/index.php/Main_Page) and am having some problems which I'm not sure how to fix. NistNet is quite a cool tool to front-end Linux traffic shaping using "tc" etc. I have it working on some systems but for a student exercise getting it going from inside VNUML would be ideal. VNUML is light weight and we can give students root access safely. But the exercise needs NistNet to compile + run using a VNUML Kernel!

*Has anybody used NistNet with VNUML?*

If so which version?
What kernel?
How did you do it?

My host is running Fedora 8 with kernel 2.6.24.5-85-fc8.
My vnuml runs 2.6.18.1-bb2-xt-4m inside a debian like setup - the default VNUML 1.8.3 I think

I have so far tried using the 2.6.18.1 kernel in the VNUML install I have. I compiled the kernel + modules on my host with ARCH=um. Then tried to build NistNet. Had to modify the "configure" file to make it pick up the correct kernel - default uses "uname -r". I also had to modify the NistNet kernel package's Makefile (not generated by the configure) to also pick up the correct kernel headers.

So I tried a kernel from the range the NistNet site says should work, selected to coordiate with working VNUML kernels - I picked 2.6.10. But this has compile errors and I have not spotted any patches for it.

But I got lots of errors I do not understand.

I also had a go at building the kernel inside a running VNUML but did not get very far as the point of VNUML is to keep the system small and so much was missing....anyway, it did not seem easy.

Any help or advice would be gratefully received.

With thanks

Nick Filer
------------------------------------------------------------------------

_______________________________________________
nistnet mailing list
nistnet@antd.nist.gov
http://www-x.antd.nist.gov/mailman/listinfo/nistnet
_______________________________________________
nistnet mailing list
nistnet@antd.nist.gov
http://www-x.antd.nist.gov/mailman/listinfo/nistnet

Reply via email to