kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* some simple(?) questions about Kbuild and installing kernel headers
@ 2016-05-27 11:53 Robert P. J. Day
  2016-05-27 16:10 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2016-05-27 11:53 UTC (permalink / raw)
  To: kernelnewbies


  for various reasons, i'm poring over the grotty details of the
installation of kernel headers, so a couple questions before i get any
further into the code.

  first, is there any value to a Kbuild file with no content? for
example, here's the entirety of
arch/cris/include/arch-v10/arch/Kbuild:

# CRISv10 arch

that is, one commented-out line, no references to any include files.
does such a file have any meaning? or can such files be deleted until
such time as they need to contain some content?

  next, with an example from that same directory, the "page.h" header
file:

#ifndef _CRIS_ARCH_PAGE_H
#define _CRIS_ARCH_PAGE_H

#ifdef __KERNEL__

... snip ...

#endif
#endif

  in other words, the *entirety* of the contents of that header file
are protected by "__KERNEL__". first, that seems silly given that we
know the Kbuild file is empty (but that's admittedly an obscure
situation).

  but even if the Kbuild file *wasn't* empty, there are two sub-cases.
first, if the "page.h" header file isn't being exported to user space,
there's no need for any use of __KERNEL__ to begin with since it's
exclusively a kernel header file.

  and if it *is* being exported, what ends up being exported is, well,
an empty header file, correct? which seems a bit silly, *unless* ...
are there cases where certain header files *must* exist in user space
just as placeholders, even if they're empty? that would explain it,
but it still seems yucky.

  one last query ... is there any value to an unexported header file
containing any __KERNEL__ protection? i'm assuming not; examples of
that are probably just leftovers that weren't cleaned up properly.

  more questions later as i get deeper into the code ...

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

* some simple(?) questions about Kbuild and installing kernel headers
  2016-05-27 11:53 some simple(?) questions about Kbuild and installing kernel headers Robert P. J. Day
@ 2016-05-27 16:10 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-05-27 16:10 UTC (permalink / raw)
  To: kernelnewbies

On Fri, May 27, 2016 at 07:53:00AM -0400, Robert P. J. Day wrote:
> 
>   for various reasons, i'm poring over the grotty details of the
> installation of kernel headers, so a couple questions before i get any
> further into the code.
> 
>   first, is there any value to a Kbuild file with no content? for
> example, here's the entirety of
> arch/cris/include/arch-v10/arch/Kbuild:
> 
> # CRISv10 arch
> 
> that is, one commented-out line, no references to any include files.
> does such a file have any meaning? or can such files be deleted until
> such time as they need to contain some content?

Try removing it and see if building the chris arch works! :)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-27 16:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-27 11:53 some simple(?) questions about Kbuild and installing kernel headers Robert P. J. Day
2016-05-27 16:10 ` Greg KH

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