Thanks for the answer!
š
Yes, of course I can.
It contains only one line:
š
obj-$(CONFIG_MY_PROCLISTOUTPUT) += proclistoutput.o
š
and works with my Kconfig
š
config MY_PROCLISTOUTPUT
šššštristate "Display a list of processes"
ššššdefault y
šššš---help---
ššššThis module prints a list of processes
š
š
But I'm sure that the reason is not in my file, because:
- If I put my code in a folder /drivers (and include my Makefile and Kconfig) then everything works perfectly (I can build kernel object and I can built-in my code to the kernel)
- If I put my code in a folder /samples (and include my Makefile and Kconfig) then I can't build-in the code, but with .ko it works fine...
I suppose that the reason is in the kernel Makefile. The root Makefile contains this code (http://lxr.free-electrons.com/source/Makefile#L914)
š
ifdef CONFIG_SAMPLES
šššššššš$(Q)$(MAKE) $(build)=samples
endif
š
where
$(Q) = @
$(build) = -f scripts/Makefile.build obj
š
and further I lose understanding of the events...
š
10.04.2012, 08:26, "Vladimir Murzin" <murzin.v@gmail.com>:
š
> šHi Semen
>
> šCould you share a Makefile for your module?
>
> šBest wishes,
> šVladimir Murzin
>
> š-----Original Message-----
> šFrom: Martynov Semen <semen-martynov@yandex.ru>
> šSender: kernelnewbies-bounces@kernelnewbies.org
> šDate: Mon, 09 Apr 2012 23:56:15
> šTo: kernelnewbies@kernelnewbies.org<kernelnewbies@kernelnewbies.org>
> šSubject: No subject
>
> šGood afternoon,
>
> šI would like to understand, why I can't make the built-in object, when my code is in a folder /samples...
>
> šI have my module-code and if I put it in a folder /samples, I can receive only loadable module (.ko) but if I want to receive the built-in object - it turns out nothing (.Ï-file is created, but my code doesn't get in a kernel). When I allocate my module-code in any other folder (for example, /drivers) it works normally - I can receive .ko and I can make the built-in object.
>
> šQuestion - why I can't receive the built-in object when my code is in the folder /samples? What instruction in a make-file restricts it, and how?
>
> šP.S.: Sorry for my english.
>
> š--
> šBest regards,
> šSemen A Martynov.
>
> šSaint Petersburg, Russia.
> šhttps://www.facebook.com/semen.martynov
>
> š_______________________________________________
> šKernelnewbies mailing list
> šKernelnewbies@kernelnewbies.org
> šhttp://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
--
š
š
ñ ÎÁ Facebook: http://www.facebook.com/profile.php?id=1095131825