Hi all

After having so much fun getting uClinux working XIP on this actelM7
board (arm7) I now need to create a device driver so I can er well flash
an LED ;-). I started trying to get a hello loadable module working and
failed ;-( however I am wondering do I really need loadable modules my
kernel is XIP to save memory if I use modules will it not just eat
into my memory ? Would it be better to just link the driver into the
kernel and just have a bigger linux kernel foot print ? ie use obj-y+= and
not obj-m+= in the  Makefile ?
    As stated above I started trying to get dav's
   
  www. ucdot .org /article.pl?sid=03/09/09/0130224&mode=thread
   
  hello.c module working on the uClinux-2.6.11.8 kernel by changing the
following

linux-2.6.x/drivers/char/Kconfig (added an option for hello.c)
linux-2.6.x/drivers/char/Makefile (added obj-$(CONFIG_HELLO) +=
hello.o)

then I copied hello.c into linux-2.6.x/drivers/char and compiled the
kernel after this I run

make modules and make modules_install and everything went well however
when I executed the insmod I got the following error

/lib/modules/2.6.11.8-hsc0/kernel/drivers/char> busybox insmod hello.ko
hello: relocation out of range, section 2 reloc 0 sym 'printk'
insmod: cannot insert `hello.ko': Invalid module format (-1): Exec
format error
pid 13: failed 256
/lib/modules/2.6.11.8-hsc0/kernel/drivers/char>

any ideas why ? the uClinux-dist top level Make file strips out some
stuff when you execute modules_install however it looks like it only
looks in /lib/modules not
/lib/modules/2.6.11.8-hsc0/kernel/drivers/char> is this a problem ? Do
I need to go down this road at all would it be better for me to link a
driver into the kernel when compiling?

sorry for all the questions ;-( but thanks for reading

       
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to