2003-07-30 04:37:19

by Studying MTD

[permalink] [raw]
Subject: linux-2.6.0-test1 : modules not working

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


2003-07-30 04:51:59

by Joshua Kwan

[permalink] [raw]
Subject: Re: linux-2.6.0-test1 : modules not working

On Tue, Jul 29, 2003 at 09:37:17PM -0700, Studying MTD wrote:
> 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

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


Attachments:
(No filename) (448.00 B)
(No filename) (189.00 B)
Download all attachments

2003-07-30 05:42:58

by Studying MTD

[permalink] [raw]
Subject: Re: linux-2.6.0-test1 : modules not working

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.

--- Joshua Kwan <[email protected]> wrote:
> On Tue, Jul 29, 2003 at 09:37:17PM -0700, Studying
> MTD wrote:
> > 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
>
> --
> 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

2003-07-30 06:17:53

by Alex Goddard

[permalink] [raw]
Subject: Re: linux-2.6.0-test1 : modules not working

On Tue, 29 Jul 2003, Studying MTD wrote:

> 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.

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/

--
Alex Goddard
[email protected]

2003-07-30 06:50:17

by Studying MTD

[permalink] [raw]
Subject: Re: linux-2.6.0-test1 : modules not working

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.

--- Alex Goddard <[email protected]> wrote:
> On Tue, 29 Jul 2003, Studying MTD wrote:
>
> > 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.
>
> 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/
>
> --
> 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

2003-07-30 07:22:09

by Alex Goddard

[permalink] [raw]
Subject: Re: linux-2.6.0-test1 : modules not working

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.

--
Alex Goddard
[email protected]

2003-07-30 07:34:44

by Studying MTD

[permalink] [raw]
Subject: Re: linux-2.6.0-test1 : modules not working

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.
>
> --
> 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

2003-07-30 15:04:17

by Randy.Dunlap

[permalink] [raw]
Subject: Re: linux-2.6.0-test1 : modules not working

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/ |

2003-07-30 18:02:09

by Studying MTD

[permalink] [raw]
Subject: Re: linux-2.6.0-test1 : modules not working

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.


--- "Randy.Dunlap" <[email protected]> wrote:
>
> 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

2003-07-30 18:49:18

by Richard B. Johnson

[permalink] [raw]
Subject: Re: linux-2.6.0-test1 : modules not working

On Wed, 30 Jul 2003, Studying MTD wrote:

> 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.

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.

2003-07-30 22:08:11

by Studying MTD

[permalink] [raw]
Subject: Re: linux-2.6.0-test1 : modules not working

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.

--- "Randy.Dunlap" <[email protected]> wrote:
> 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/ |
> -
> 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