kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: murzin.v@gmail.com (Vladimir Murzin)
To: kernelnewbies@lists.kernelnewbies.org
Subject: No subject
Date: Tue, 10 Apr 2012 20:08:04 +0400	[thread overview]
Message-ID: <20120410160801.GA4110@pinguin> (raw)
In-Reply-To: <545141334033294@web125.yandex.ru>

On Tue, Apr 10, 2012 at 10:48:14AM +0600, Martynov Semen wrote:
> <one more time in plain text>
> 
> Yes, of course.
> It contains only one line:
> 
> obj-$(CONFIG_MY_PROCLISTOUTPUT) += proclistoutput.o
> 
> and works with 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 build-in the code I can't, but with .ko it works fine...
> 
> I suppose that the reason 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 at kernelnewbies.org
> > Date: Mon, 09 Apr 2012 23:56:15
> > To: kernelnewbies at 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 at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> -- 
> 
> 
> ? ?? Facebook: http://www.facebook.com/profile.php?id=1095131825

Hi Semen

It happens because ./script isn't listed as a subdir for visiting and
linking objects into vmlinux. Please, refer to [1] for details.

[1] http://lxr.linux.no/linux+*/Makefile#L508

Best wishes,
Vladimir Murzin

  reply	other threads:[~2012-04-10 16:08 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09 17:56 No subject Martynov Semen
2012-04-10  2:26 ` Vladimir Murzin
2012-04-10  4:03   ` Martynov Semen
2012-04-10  4:48   ` Martynov Semen
2012-04-10 16:08     ` Vladimir Murzin [this message]
2012-04-10 17:00       ` Semen Martynov
  -- strict thread matches above, loose matches on Subject: below --
2018-08-02 10:48 TU PHUNG VAN
2018-07-06  5:52 inventsekar
2018-05-08  6:10 Vishnu Gopinath
2016-03-07 17:52 nunojsa
2015-10-21  6:17 Rock Lee
2015-09-18 17:23 Shraddha Barke
2015-09-18  4:49 Shraddha Barke
2015-03-30  4:56 Woody Wu
2015-01-27 16:49 Grzegorz Dwornicki
2014-08-29 14:22 Ravi Raj
2014-08-29 14:47 ` Valdis.Kletnieks at vt.edu
2014-08-29 14:58   ` Ravi Raj
2014-08-29 15:32     ` No subject Valdis.Kletnieks at vt.edu
2014-08-29 15:34     ` Valdis.Kletnieks at vt.edu
2014-05-12  4:37 Sivakumar V
2014-04-21  2:59 Amber Thrall
2013-07-30  4:09 PV Juliet
2013-02-25  7:24 Prasad Lakshman
2013-02-15  5:48 Kaushal Billore
2013-02-06 22:30 Jimmy Pan
2012-12-05 13:48 Niroj Pokhrel
2012-11-19 11:41 唐忠诚
2012-11-02 10:46 Pritam Bankar
2012-10-15  9:24 Niroj Pokhrel
2012-08-13 10:09 Vivek Panwar
2012-08-06 10:43 =?gb18030?B?wObC5A==?=
2012-07-30 19:04 siddhesh phadke
2011-12-30 17:16 Philip Anil-QBW348
2011-12-16  2:18 Swapnil Gaikwad
2011-11-21 15:22 Jimmy Pan
2011-09-23  3:42 毕春雷
2011-06-16 11:41 Venkateswarlu P
2011-06-14 12:20 Venkateswarlu P
2011-03-22 18:13 nijil yes
2011-02-26  6:20 Aldyth Maharsha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120410160801.GA4110@pinguin \
    --to=murzin.v@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).