26

What do the terms "in-tree" and "out-of-tree" exactly mean? Also, does "source tree" specifically refer to the official kernel released from / maintained at kernel.org or is it a more general term which can refer to any (modified) Linux kernel source?

Anthon
  • 79,293
Lavya
  • 1,605

1 Answers1

22

"source tree" is not a term specific to kernel source development, so it has to be a more general term and its meaning with regards to kernel source is context dependent.

I have not come across "in-tree" and "out-of-tree" outside of the Linux kernel source development and then only for working with modules. All modules start out as "out-of-tree" developments, that can be compiled using the context of a source-tree. Once a module gets accepted to be included, it becomes an in-tree module. A I have not come across an official definition for both terms though, maybe that was never necessary as it was clear to those working with modules what was meant.

E.g. while Reiserfs module was still an out-of-tree module I did the RPM package generation for SuSE, once it became in-tree there was no longer need for that.

Anthon
  • 79,293
  • 1
    Thanks! So basically in-tree means a module that comes as a part of the source tree and out-of-tree that does not? – Lavya Jun 10 '15 at 07:26
  • 1
    @Lavya Yes, that is the only way I have seen it used. But as I indicated, I have not come across a formal definition. – Anthon Jun 10 '15 at 09:44
  • 4
    "in-tree" and "out-of-tree" are actually generic software development terms. It refers to where the resulting build output/artifacts are placed during a compile, either "in-tree", right next to the files they come from, or "out-of-tree", in a separate root directory that separates the build output from the source files. The kernel overloads these terms when talking about modules though, as you've described in your response. – mtalexan Jul 03 '18 at 15:31
  • @mtalexan Some references that support your claim would be useful. The only one I found so far is that autosetup has at some point (they didn't when I first used it), started to use out-of-tree the way you describe, but they use in-place instead of in-tree in their doc. – Anthon Jul 03 '18 at 16:43
  • @Anthon in-tree and in-place are synonyms for the same term in my experience. I don't really have references for it, it's been something I've picked up working in the industry across a number of companies and sub-fields for the last ~15 years rather than something I read in a book. I was just pointing out that in terms of technical jargon it's something you're likely to come across in other contexts with slightly different meanings. I wasn't critiquing either, just adding some additional context for future readers. – mtalexan Aug 02 '18 at 01:03
  • 1
    @mtalexan Since years and scope of experience seem important you: based on my 34 years of professional software development over organisations in three continents, I recommend that you never make a generic statement like "in-tree" and "out-of-tree" are actually generic software development terms based on your, limited, experience alone. There is more than books, and if using a tool like Google cannot easily give some support to your claims, things might not be as generic as you state, and then others are better of not being fed potentially incorrect information in the way you did. YMMV – Anthon Aug 02 '18 at 06:43
  • 1
    FYI, GNU radio project also use out-of-tree terminology. – matt Aug 22 '23 at 10:07
  • @matt Does it do so with the same meaning as I indicated? Do you have a link to where it is used? – Anthon Aug 22 '23 at 10:11
  • 1
    @Anthon: Here is their definition – matt Aug 22 '23 at 10:36