I'm so sorry about the broken link...
it links to my question how to build .ko file
question about building a module (
http://www.niosforum.com/forum/index.php?act=st&f=18&t=2411)
if it still doesn't work, you can find it on page 3 in the uclinux section of this forum.
for testing you'll have to transfer your module in your niossystem of course.
Here is a little example, how to use the commands. Lets assume your module name is 'Hello_Kernel':
first
busybox insmod Hello_Kernel"
insert your module
then you'll need make it visible in your filesystem:
mknod "Hello_Kernel" c a b"
a and b are the major and minor numbers defined in your module code. So put will have to put the numbers instead of a and b. c is an option !
to access the module in your user application program
use the open(...) command. The name of the module to be opened is "Hello_Kernel".
---
you unload your module with rmmod.
i recommend to read 'Linux device drivers- 3rd Edition' by Corbet & Rubini. Its published by O'reilly. there is also an online version. The online version covers an older kernel. But i don't have the link right now.