On Sat, Jun 28, 2008 at 02:51:51AM +0500, Shaz wrote:
> On Sat, Jun 28, 2008 at 2:32 AM, Adrian Bunk <[EMAIL PROTECTED]> wrote:
> > On Sat, Jun 28, 2008 at 02:16:14AM +0500, Shaz wrote:
> >> Hi,
> >>
> >> Need to compile an external module as a kernel built-in module. Its
> >> Makefile is set as obj-m meaning as a loadable module so it will be
> >> kept on filesystem separately. This means I have to do obj-y to make
> >> it built-in. But I wanted to know, before I just try it out, that the
> >> Makefile of the kernel module is way too complex for me and there was
> >> an install target which is creating files for miscilleneous functions
> >> of the module and it had a /dev/<module-name>, which means its a
> >> device driver.
> >>
> >> So what do I need to consider apart from the change obj-m to obj-y?
> >
> > It does not work this way.
>
> Are you sure because in kernel top-level Makefile contains SUBDIRS
> symbol for external modules and if it contains a path then target all
> becomes _all else _all becomes modules. Personally, I am not sure of
> this behavior but I think if we can do obj-y instead of obj-m than
> maybe this module is built-in. Sorry you already said it's not
> possible but I am still curious why it doesn't in the light of
> SUBDIRS.
The reason is simple:
When an external module gets built the kernel image is not rebuilt.
> By the way can you suggest how do I workout getting the code inside
> the kernel source.
>
> Analyzing the following from module's Makefile:
>
> all: $(src)/crypto/gmp.h $(src)/crypto/libgmp.a
> @$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) modules
>
> I thought maybe if i replace "modules" with "all", it might have the
> same effect as what I suggested in case of SUBDIRS for kernel
> Makefile.
Where can I find the source for this module?
> Thanks
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ