Skip to contentSkip to conversation

linux-2.6.0-test1 : modules not working

DISCUSSION Studying MTD 5 participants 11 messages Jul 30, 2003

lore
Share & tools
lore
#0 lore raw

Greetings,

linux-2.6.0-test1 with modutils-2.4.18 giving :-

modprobe: QM_MODULES: Function not implemented
modprobe: QM_MODULES: Function not implemented

#lsmod
lsmod: QM_MODULES: Function not implemented

#insmod test_mod.o
insmod: QM_MODULES: Function not implemented

How to fix this problem.

Thanks.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

#1 lore raw
Quoted 2 lines · Studying MTD

modprobe: QM_MODULES: Function not implemented
modprobe: QM_MODULES: Function not implemented

Next time, please STFW, RTFM (in this case, post-halloween-2.5.txt on lwn.net), and you would already know that you need module-init-tools, available at rusty's page on kernel.org.

-Josh

Signature · 2 lines
Using words to describe magic is like using a screwdriver to cut roast beef.
		-- Tom Robbins
#2 lore raw

module-init-tools-0.9.12 is giving :-

#insmod hello_module.o
No module found in object
Error inserting 'hello_module.o': -1 Invalid module format

#file hello_module.o
hello_module.o: ELF 32-bit LSB relocatable, Hitachi SH, version 1 MathCoPro/FPU/MAU Required (SYSV), not stripped

how to fix this.

Thanks.

Quoted 5 lines · --- Joshua Kwan
Quoted 2 lines · Studying MTD

modprobe: QM_MODULES: Function not implemented
modprobe: QM_MODULES: Function not implemented

Quoted 15 lines

Next time, please STFW, RTFM (in this case, post-halloween-2.5.txt on
lwn.net), and you would already know that you need module-init-tools,
available at rusty's page on kernel.org.

-Josh

Signature · 6 lines
Using words to describe magic is like using a
screwdriver to cut roast beef.
		-- Tom Robbins


ATTACHMENT part 2 application/pgp-signature 

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

#3 lore raw
Quoted 7 lines · Studying MTD

module-init-tools-0.9.12 is giving :-

#insmod hello_module.o
No module found in object
Error inserting 'hello_module.o': -1 Invalid module format

Quoted 6 lines

#file hello_module.o
hello_module.o: ELF 32-bit LSB relocatable, Hitachi SH, version 1 MathCoPro/FPU/MAU Required (SYSV), not stripped

how to fix this.

Some information on how you built hello_module.o would be nice. You might also want to look at the first two (at least) articles here:
http://lwn.net/Articles/driver-porting/

Signature · 2 lines
Alex Goddard
[email protected]
#4 lore raw

I tried hello world example from
http://lwn.net/Articles/21817/

but i am still getting :-

#insmod hello_module.o
No module found in object
Error inserting 'hello_module.o': -1 Invalid module format

my config is :-
/*
* General setup
*/
#undef CONFIG_SWAP
#define CONFIG_SYSVIPC 1
#undef CONFIG_BSD_PROCESS_ACCT
#define CONFIG_SYSCTL 1
#define CONFIG_LOG_BUF_SHIFT 14
#undef CONFIG_EMBEDDED
#define CONFIG_KALLSYMS 1
#define CONFIG_FUTEX 1
#define CONFIG_EPOLL 1

/*
* Loadable module support
*/
#define CONFIG_MODULES 1
#define CONFIG_MODULE_UNLOAD 1
#define CONFIG_OBSOLETE_MODPARM 1
#define CONFIG_KMOD 1

How to fix this problem.

thanks.

Quoted 17 lines · --- Alex Goddard
Quoted 5 lines · Studying MTD

module-init-tools-0.9.12 is giving :-

#insmod hello_module.o
No module found in object
Error inserting 'hello_module.o': -1 Invalid

module

Quoted 4 lines

format

#file hello_module.o
hello_module.o: ELF 32-bit LSB relocatable,

Hitachi

Quoted 1 line

SH, version 1 MathCoPro/FPU/MAU Required (SYSV),

not

Quoted 2 lines

stripped

Quoted 18 lines
Quoted 1 line

how to fix this.

Some information on how you built hello_module.o would be nice. You might
also want to look at the first two (at least) articles here:
http://lwn.net/Articles/driver-porting/

Signature · 9 lines
Alex Goddard
[email protected]
-
To unsubscribe from this list: send the line
"unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at 
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

#5 lore raw
Quoted 9 lines · Studying MTD

I tried hello world example from
http://lwn.net/Articles/21817/

but i am still getting :-

#insmod hello_module.o
No module found in object
Error inserting 'hello_module.o': -1 Invalid module format

[Snip]

'kay. So modules are enabled and everything. More specifically, I was after information such as the gcc options and stuff you used to compile hello_module.o

Check the second article at that URL, and try building your hello_module with the basic Makefile it gives. That uses the best way for building external modules. After building your kernel that way, try inserting the hello_module.ko.

Signature · 2 lines
Alex Goddard
[email protected]
#6 lore raw

I am curious that linux-2.6.0-test1 supports external modules yet or not ?

Thanks.

Quoted 21 lines · --- Alex Goddard
Quoted 8 lines · Studying MTD

I tried hello world example from
http://lwn.net/Articles/21817/

but i am still getting :-

#insmod hello_module.o
No module found in object
Error inserting 'hello_module.o': -1 Invalid

module

Quoted 1 line

format

[Snip]

'kay. So modules are enabled and everything. More specifically, I was
after information such as the gcc options and stuff you used to compile
hello_module.o

Quoted 18 lines

Check the second article at that URL, and try building your hello_module
with the basic Makefile it gives. That uses the best way for building
external modules. After building your kernel that way, try inserting the
hello_module.ko.

Signature · 9 lines
Alex Goddard
[email protected]
-
To unsubscribe from this list: send the line
"unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at 
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

#7 lore raw

On Wed, 30 Jul 2003 00:34:41 -0700 (PDT) Studying MTD <[email protected]> wrote:

| I am curious that linux-2.6.0-test1 supports external
| modules yet or not ?
| 
| Thanks.
| 
| --- Alex Goddard <[email protected]> wrote:
| > On Tue, 29 Jul 2003, Studying MTD wrote:
| > 
| > > I tried hello world example from
| > > http://lwn.net/Articles/21817/
| > > 
| > > but i am still getting :-
| > > 
| > > #insmod hello_module.o
| > > No module found in object
| > > Error inserting 'hello_module.o': -1 Invalid
| > module
| > > format
| > 
| > [Snip]
| > 
| > 'kay.  So modules are enabled and everything.  More
| > specifically, I was 
| > after information such as the gcc options and stuff
| > you used to compile 
| > hello_module.o
| > 
| > Check the second article at that URL, and try
| > building your hello_module
| > with the basic Makefile it gives.  That uses the
| > best way for building
| > external modules.  After building your kernel that
| > way, try inserting the
| > hello_module.ko.

So you can insmod hello_module.ko successfully now?

Sure, 2.6 supports external modules (if you mean modules that are built outside of the kernel source tree), but for now you also need a full kernel source tree for the build system to reference. I.e., you can't build an external module without having a full kernel source tree installed and configured.

--
~Randy
| http://developer.osdl.org/rddunlap/ | http://www.xenotime.net/linux/ |

#8 lore raw

I am curious what is the minimum kernel source tree is required to build external modules.

I dont want to touch my kernel , i want to make another directory same 'module_test' and want to copy only required minimum kernel Source tree with modified scripts's Makefile and kbuild Makefile to build "Hello World".

Please help me.

Thanks.

Quoted 11 lines · --- "Randy.Dunlap

Sure, 2.6 supports external modules (if you mean modules that are
built outside of the kernel source tree), but for now you also
need a full kernel source tree for the build system to reference.
I.e., you can't build an external module without having a full
kernel source tree installed and configured.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

#9 lore raw
Quoted 9 lines · Studying MTD

I am curious what is the minimum kernel source tree is required to build external modules.

I dont want to touch my kernel , i want to make another directory same 'module_test' and want to copy only required minimum kernel Source tree with modified scripts's Makefile and kbuild Makefile to build "Hello World".

Quoted 3 lines

Please help me.

Thanks.

For Intel:

/usr/src/linux-2.6.0 /usr/src/linux-2.6.0/include/linux/* /usr/src/linux-2.6.0/include/asm-generic/* /usr/src/linux-2.6.0/include/asm-i386/* /usr/src/linux-2.6.0/include/asm # Symlink to above /usr/src/linux-2.6.0/include/math-emu/* /usr/src/linux-2.6.0/include/net/* /usr/src/linux-2.6.0/include/pcmcia/* /usr/src/linux-2.6.0/include/scsi/* /usr/src/linux-2.6.0/include/video/*

When you compile modules, you use -I/usr/src/linux-2.6.0/include ...on the command line. Remember to -D__KERNEL__ and -DMODULE.

That's all you need for 2.6.0 modules...

Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.

#10 lore raw
In reply to Randy.Dunlap

Thanks for your help, I am able to insert the module but not able to remove it.

#insmod modtest.ko
: module licence 'unspecified' taints kernel.
Hello World
#lsmod
Module Size Used by
896 0 - Live 0xc0102000

#rmmod modtest
Can't open 'modtest' : No such file or directory

#rmmod 896
Can't open '896' : No such file or directory

Please help me to rmmod it.

Thanks.

Quoted 58 lines · --- "Randy.Dunlap

On Wed, 30 Jul 2003 00:34:41 -0700 (PDT) Studying
MTD <[email protected]> wrote:

| I am curious that linux-2.6.0-test1 supports
external

| modules yet or not ?
| 
| Thanks.
| 
| --- Alex Goddard <[email protected]> wrote:
| > On Tue, 29 Jul 2003, Studying MTD wrote:
| > 
| > > I tried hello world example from
| > > http://lwn.net/Articles/21817/
| > > 
| > > but i am still getting :-
| > > 
| > > #insmod hello_module.o
| > > No module found in object
| > > Error inserting 'hello_module.o': -1 Invalid
| > module
| > > format
| > 
| > [Snip]
| > 
| > 'kay.  So modules are enabled and everything. 

More
| > specifically, I was
| > after information such as the gcc options and
stuff

| > you used to compile 
| > hello_module.o
| > 
| > Check the second article at that URL, and try
| > building your hello_module
| > with the basic Makefile it gives.  That uses the
| > best way for building
| > external modules.  After building your kernel

that
| > way, try inserting the
| > hello_module.ko.

So you can insmod hello_module.ko successfully now?

Sure, 2.6 supports external modules (if you mean modules that are
built outside of the kernel source tree), but for now you also
need a full kernel source tree for the build system to reference.
I.e., you can't build an external module without having a full
kernel source tree installed and configured.

--
~Randy

| http://developer.osdl.org/rddunlap/ |
http://www.xenotime.net/linux/ |
Quoted 7 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com