linux内核代码之什么是Linux staging tree

在查看内核代码相关资料时总是碰到staging的相关字眼(XX Moved Out Of Linux Staging、YYstill in the staging tree),搞的一头雾水。并且在内核drivers\staging目录下有很多代码模块,他们到底是做什么东东的?索性就搜了一下什么是staging tree。

Greg Kh在2008年6月10号在Linux内核邮件列表里宣布建立了另外一棵kernel tree,没错,就是Linux staging tree。根据Greg的解释,staging tree建立之目的是用来放置一些未充分测试或者因为一些其他原因未能进入内核的新增驱动程序和新增文件系统。并且列出了哪些代码可以进入staging tree哪些则no way。

以下是该邮件全文:

DateTue, 10 Jun 2008 12:05:40 -0700FromGreg KH <>Subject[ANNOUNCE] linux-staging tree created
Oh great, not yet-another-kernel-tree, just what the world needs...Yes, this is an announcement of a new kernel tree, linux-staging.  It isa quilt series of patches that can be found at:git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.gitIn a long and meandering thread with some of the other kernel developersa week or so ago, it came up that there is no single place for companiesand developers to put their code for testing while it gets cleaned upfor submission into the kernel tree.  All of the different subsystemshave trees, but they generally only want code that is about to go intothis release, or the next one.  For stuff that is farther off, there isno place to go.So, here's the tree for it.  From the README:PURPOSEThe linux-staging tree was created to hold drivers and filesystems andother semi-major additions to the Linux kernel that are not ready to bemerged at this point in time.  It is here for companies and authors toget a wider range of testing, and to allow for other members of thecommunity to help with the development of these features for theeventual inclusion into the main kernel tree.This tree will be included in the daily linux-next builds, and will gettesting by all users of that tree.The rules of what can be included here is as follows:- the code must be released under a Linux kernel-compatible  license- the goal of the developers must be to merge this code into the  main kernel tree in the near future, but not for the next  kernel release.- the code must build properly on the x86 platform- this is not a tree for bugfixes or rewrites of existing kernel  code, this should be for new features, drivers, and  filesystems.- the patches included must detail exactly what is needed to be  completed in order for them to be included into the main  kernel tree.- there must be some email address associated with the patch  that can be used for bug reporting and questions about  cleanups and testing the code.What this tree is not:- it is not a place to dump features that are being actively  developed by a community of people (reiserfs4 for example.)- it is not a place to dump code and then run away, hoping that  someone else will do the cleanup work for you.  While there  are developers available to do this kind of work, you need to  get someone to agree to "babysit" the code.I'll follow up this message with a list of the current status of theindividual patches and what is currently contained in the tree.  I hopeto release a status like this every week or so, depending on how thedevelopment goes.What I need from all of you:  Kernel Janitors:  Here is the perfect way to get involved.  The code in this treeis in desparate need of cleanups and fixes that can be triviallyfound using 'sparse' and 'scripts/checkpatch.pl'.  I'll gladlytake these kinds of patches and of course, correctly credit you.  Linux driver project developers:Same as above, here's a great place to start out helping withreal code.  If any of you wants to take any of these driversover and become the primary contact point for them, just let meknow.  Linux-next developers:Stephen, I would really like this tree to be included in -next.Yes, I know it contains things that will not be included in thenext release, but the inclusion and basic build testing that isprovided by your tree is invaluable.  You can place it at theend, and if there is even a whiff of a problem in any of thepatches, you have my full permission to drop them on the floorand run away screaming (and let me know please, so I can fix itup.)  Linux kernel developers:If there are any external patches floating around for driversthat need to be cleaned up and gotten into the kernel tree,please point them out to me and I'll be glad to add them to thistree and work to get them included.  Right now we are pushing: - 192 files changed, 131073 insertions(+), 651 deletions(-)so what's a few more thousand lines of code :)Any questions?  Comments?thanks,greg k-h

本次记录的重点当然不是解释什么是Linux staging tree。重点是Andrew Morton老先生那句the staging tree "is where code goes to be ignored."如果辩证的看待此问题,这些代码能进入Linux必定有其独特之处,只是未经时间检验或达到最佳设计效果。如果能够研究这些代码,一方面能够学习大牛们的编程技术和设计理念,再者,如果能对代码进行优化改进,也算是尽自己的微薄之力嘛。

离开之后,我想你不要忘记一件事:不要忘记想念我。

linux内核代码之什么是Linux staging tree

相关文章:

你感兴趣的文章:

标签云: