TheGNUCopyleftTheGNUproject(GNUisarecursiveacronymforGNU'sNotUNIX)predatesLinuxandwaslaunchedtodevelopafreeUNIX-likeoperatingsystem.AcompleteGNUoperatingsystemispoweredbytheLinuxkernelbutalsocontains components suchaslibraries,compilers,and utilities.A Linux-based computerishencemoreaccuratelyaGNU/Linuxsystem.AllcomponentsofaGNU/Linuxsystemarebuiltusingfreesoftware.There aredifferent flavors of free software.One suchflavor is called public domain software.Software releasedunderthepublic domain is not copyrighted,and no restrictions areimposedon its usage.You can useit forfree, make changes to it, and even restrict the distribution of your modified sources.As you can see, the"norestrictions"clauseintroduces thepower to introduce restrictions downstream.TheFreeSoftwareFoundation,theprimarysponsoroftheGNUproject,createdtheGNUPublicLicense(GPL),alsocalledacopyleft,topreventthepossibilityofmiddlementransformingfreesoftwareintoproprietarysoftware.Thosewhomodifycopyleftedsoftwarearerequiredtoalsocopylefttheirderivedwork.TheLinuxkerneland mostcomponents ofaGNU systemsuchas theGNUCompilerCollection(GCC)are released undertheGPL.So,ifyoumakemodificationstothekernel,youhavetoreturnyourchangesbacktothecommunityEssentially,youhavetopassontherightsvested onyoubythecopyleft.TheLinuxkernelislicensedunderGPLversion2.ThereisanongoingdebateinthekernelcommunityaboutwhetherthekernelshouldmovetoGPLv3,thelatestversionof theGPL.ThecurrenttideseemstobeagainstrelicensingthekerneltoadoptGPLv3.Linuxapplications that invokesystemcallsto accesskernel servicesarenot considered derived work,however,and won't be restricted by the GPL.Similarly,libraries are covered by a less-stringent license called the GNULesserGeneralPublicLicense(LGPL).Proprietarysoftwareispermitted to dynamically link with librariesreleasedundertheLGPL
The GNU Copyleft The GNU project (GNU is a recursive acronym for GNU's Not UNIX) predates Linux and was launched to develop a free UNIX-like operating system. A complete GNU operating system is powered by the Linux kernel but also contains components such as libraries, compilers, and utilities. A Linux-based computer is hence more accurately a GNU/Linux system. All components of a GNU/Linux system are built using free software. There are different flavors of free software. One such flavor is called public domain software. Software released under the public domain is not copyrighted, and no restrictions are imposed on its usage. You can use it for free, make changes to it, and even restrict the distribution of your modified sources. As you can see, the "no restrictions" clause introduces the power to introduce restrictions downstream. The Free Software Foundation, the primary sponsor of the GNU project, created the GNU Public License (GPL), also called a copyleft, to prevent the possibility of middlemen transforming free software into proprietary software. Those who modify copylefted software are required to also copyleft their derived work. The Linux kernel and most components of a GNU system such as the GNU Compiler Collection (GCC) are released under the GPL. So, if you make modifications to the kernel, you have to return your changes back to the community. Essentially, you have to pass on the rights vested on you by the copyleft. The Linux kernel is licensed under GPL version 2. There is an ongoing debate in the kernel community about whether the kernel should move to GPLv3, the latest version of the GPL. The current tide seems to be against relicensing the kernel to adopt GPLv3. Linux applications that invoke system calls to access kernel services are not considered derived work, however, and won't be restricted by the GPL. Similarly, libraries are covered by a less-stringent license called the GNU Lesser General Public License (LGPL). Proprietary software is permitted to dynamically link with libraries released under the LGPL
Kernel.orgTheprimaryrepositoryofLinuxkernelsourcesiswww.kernel.org.Thewebsitecontainsall releasedkernelversions.Anumberof websites around theworldmirrorthe contents ofkernel.org.In addition to releasedkernels,kernel.orgalsohostsasetofpatchesmaintained byfront-linedevelopers thatserve as a test bed forfuture stable releases.A patch is a text file containing source code differences between adevelopment treeand theoriginal snapshot from which the developer started work.Apopularpatch-setavailableatkernel.org is the-mm patch periodicallyreleased by AndrewMorton,the lead maintainer of the Linuxkernel.You will find experimental features in the-mm patch that havenot yet made it to the mainline sourcetree.Another patch-set periodically released on kernel.org is the-rt (real time)patch maintained by IngoMolnar.Several-rtfeatureshavebeenmerged intothemainlinekernel
Kernel.org The primary repository of Linux kernel sources is www.kernel.org. The website contains all released kernel versions. A number of websites around the world mirror the contents of kernel.org. In addition to released kernels, kernel.org also hosts a set of patches maintained by front-line developers that serve as a test bed for future stable releases. A patch is a text file containing source code differences between a development tree and the original snapshot from which the developer started work. A popular patch-set available at kernel.org is the -mm patch periodically released by Andrew Morton, the lead maintainer of the Linux kernel. You will find experimental features in the -mm patch that have not yet made it to the mainline source tree. Another patch-set periodically released on kernel.org is the –rt (real time) patch maintained by Ingo Molnar. Several –rt features have been merged into the mainline kernel
Mailing Lists and ForumsThe Linux Kernel Mailing List (LKML) is the forum where developers debate on design issues and decide onfuture features.You can find a real-timefeed of the mailing list at www.lkml.org.Thekernel now containsseveral million lines of code contributed bythousands of developers all overthe world.LKML actsas thethreadthattiesallthesedeveloperstogether.LKML is not for general Linux questions.The basic rule is to post only questions pertaining to kerneldevelopmentthathavenotbeenpreviouslyanswered inthemailing listorinpopularlyavailabledocumentation.If theC compilercrashed whilecompilingyour Linuxapplication,you should postthatquestionelsewhere.Discussions in some LKML threads are more interesting than a New York Times bestseller. Spend a few hoursbrowsing LKMLarchivestogetaninsight intothephilosophybehindtheLinuxkernel.Most subprojects in the kernel have their own specific mailing lists. So, subscribe to the linux-mtd mailing list ifyou are developing a Linux flash memory driver or initiate a thread in the linux-usb-devel mailing list if youthink you have found a bug in theUsB mass storage driver.Wereferto relevant mailing lists at the end ofseveralchapters.Invariousforums,kernel expertsfromaroundtheglobegatherunder oneroof.TheLinuxSymposiumheldannually at Ottawa, Canada, is one such conference. Others include the Linux Kongress that takes place inGermany and linux.conf.au organizedin Australia.Therearealso numerous commercial Linux forums whereindustry leaders meetand share their insights.An example is the LinuxWorld Conference and Expoheld yearlyinNorthAmericaForthelatestnewsfromthedevelopercommunity,checkouthttp://lwn.net/.Ifyouwanttogleanthehighlightsof thelatestkernel releasewithout manycryptic referencestokernel internals,thismightbeagoodplacetolook.You canfindanotherweb communitythatdiscusses currentkernel topicsathttp://kerneltrap.org/.Witheverymajorkernel release,youwillseesweepingimprovements,beitkernelpreemption,lock-freereaders,newservicestooffloadworkfrom interrupthandlers,orsupportfornewarchitectures.Stayinconstanttouchwiththemailing lists,websites,andforums,tokeepyourselfinthethick of things
Mailing Lists and Forums The Linux Kernel Mailing List (LKML) is the forum where developers debate on design issues and decide on future features. You can find a real-time feed of the mailing list at www.lkml.org. The kernel now contains several million lines of code contributed by thousands of developers all over the world. LKML acts as the thread that ties all these developers together. LKML is not for general Linux questions. The basic rule is to post only questions pertaining to kernel development that have not been previously answered in the mailing list or in popularly available documentation. If the C compiler crashed while compiling your Linux application, you should post that question elsewhere. Discussions in some LKML threads are more interesting than a New York Times bestseller. Spend a few hours browsing LKML archives to get an insight into the philosophy behind the Linux kernel. Most subprojects in the kernel have their own specific mailing lists. So, subscribe to the linux-mtd mailing list if you are developing a Linux flash memory driver or initiate a thread in the linux-usb-devel mailing list if you think you have found a bug in the USB mass storage driver. We refer to relevant mailing lists at the end of several chapters. In various forums, kernel experts from around the globe gather under one roof. The Linux Symposium held annually at Ottawa, Canada, is one such conference. Others include the Linux Kongress that takes place in Germany and linux.conf.au organized in Australia. There are also numerous commercial Linux forums where industry leaders meet and share their insights. An example is the LinuxWorld Conference and Expo held yearly in North America. For the latest news from the developer community, check out http://lwn.net/. If you want to glean the highlights of the latest kernel release without many cryptic references to kernel internals, this might be a good place to look. You can find another web community that discusses current kernel topics at http://kerneltrap.org/. With every major kernel release, you will see sweeping improvements, be it kernel preemption, lock-free readers, new services to offload work from interrupt handlers, or support for new architectures. Stay in constant touch with the mailing lists, websites, and forums, to keep yourself in the thick of things
LinuxDistributionsBecause a GNU/Linux system consists of numerous utilities, programs, libraries, and tools, in addition to thekernel, it's a daunting task to acquire and correctly install all the pieces.Linux distributions come to therescueby classifying the components and bundling them into packages in an orderly fashion.A typical distributioncontains thousands of ready-made packages.You need not worry about downloading the right program versionsorfixingdependencyissues.Because packaging is a way to make a lot of money within the ambit of the GNU license, there are several Linuxdistributions in the market today.Distributions such as Red Hat/Fedora,Debian,SuSE,Slackware,Gentoo,Ubuntu,andMandrivaareprimarilymeantforthedesktopuser.MontaVista,TimeSys,andWindRiverdistributions are geared toward embedded development. Embedded Linux distributions also include adynamicallyconfigurablecompactapplication-settotailorthesystem'sfootprintto suit resourceconstraintsIn addition to packaging, distributions offer value-adds for kernel development. Many projects startdevelopment based on kernels supplied by a distribution rather than a kernel released officially at kernel.orgReasonsforthisincludethefollowing:. Linux distributions that comply with standards relevant to your device's industry domain are often betterstartingpointsfordevelopment.SpecialInterestGroups(SiGs)havetakenshapetopromoteLinux invariousdomains.TheConsumerElectronicsLinuxForum(CELF),hostedatwww.celinuxforum.org,focusesonusingLinuxonconsumerelectronicsdevices.TheCELFspecificationdefinesthesupportleveloffeaturessuchasscalablefootprint,fastboot,executeinplace,andpowermanagement,desirableonconsumer electronics devices.The efforts of the Open SourceDevelopmentLab (OSDL),hosted atwww.osdl.org,centerson characteristicsdistincttocarrier-grade devices.OSDL'sCarrier GradeLinux(CGL)specificationcodifies valueadditions suchasreliability,highavailability,runtimepatching,andenhancederrorrecovery,importantinthetelecomspace.Themainlinekernelmightnotincludefull supportfortheembeddedcontrollerofyourchoiceevenifthecontrollerisbuilt aroundakernel-supportedCPU core.ALinuxdistributionmightofferdevicedriversforalltheperipheralmodulesinsidethecontroller,however.Debugging tools that you plan to use during kernel development may not be part of the mainline kernel.Forexample,thekernel hasnobuilt-in debuggersupport.If youwanttouseakerneldebuggerduringdevelopment,you have to separately download and apply the corresponding patches.You have to enduremore hassles if tested patches are not readily available for yourkernel version. Distributions prepackagemanyuseful debuggingfeatures,soyoucanstartusingthemrightaway.Somedistributions provide legal indemnification so that your company won'tbe liablefor lawsuits arisingoutofkernelbugs..Distributions tend to do a lot of testing on the kernels they release.[1][1] Because this necessitates freezing the kernel to a version that is not the latest, distribution-supplied kernels often contain back-ports of some features released in later official kernels.You can purchase service and support packages from distribution vendors forkernels that they supply
Linux Distributions Because a GNU/Linux system consists of numerous utilities, programs, libraries, and tools, in addition to the kernel, it's a daunting task to acquire and correctly install all the pieces. Linux distributions come to the rescue by classifying the components and bundling them into packages in an orderly fashion. A typical distribution contains thousands of ready-made packages. You need not worry about downloading the right program versions or fixing dependency issues. Because packaging is a way to make a lot of money within the ambit of the GNU license, there are several Linux distributions in the market today. Distributions such as Red Hat/Fedora, Debian, SuSE, Slackware, Gentoo, Ubuntu, and Mandriva are primarily meant for the desktop user. MontaVista, TimeSys, and Wind River distributions are geared toward embedded development. Embedded Linux distributions also include a dynamically configurable compact application-set to tailor the system's footprint to suit resource constraints. In addition to packaging, distributions offer value-adds for kernel development. Many projects start development based on kernels supplied by a distribution rather than a kernel released officially at kernel.org. Reasons for this include the following: Linux distributions that comply with standards relevant to your device's industry domain are often better starting points for development. Special Interest Groups (SIGs) have taken shape to promote Linux in various domains. The Consumer Electronics Linux Forum (CELF), hosted at www.celinuxforum.org, focuses on using Linux on consumer electronics devices. The CELF specification defines the support level of features such as scalable footprint, fast boot, execute in place, and power management, desirable on consumer electronics devices. The efforts of the Open Source Development Lab (OSDL), hosted at www.osdl.org, centers on characteristics distinct to carrier-grade devices. OSDL's Carrier Grade Linux (CGL) specification codifies value additions such as reliability, high availability, runtime patching, and enhanced error recovery, important in the telecom space. The mainline kernel might not include full support for the embedded controller of your choice even if the controller is built around a kernel-supported CPU core. A Linux distribution might offer device drivers for all the peripheral modules inside the controller, however. Debugging tools that you plan to use during kernel development may not be part of the mainline kernel. For example, the kernel has no built-in debugger support. If you want to use a kernel debugger during development, you have to separately download and apply the corresponding patches. You have to endure more hassles if tested patches are not readily available for your kernel version. Distributions prepackage many useful debugging features, so you can start using them right away. Some distributions provide legal indemnification so that your company won't be liable for lawsuits arising out of kernel bugs. Distributions tend to do a lot of testing on the kernels they release.[1] [1] Because this necessitates freezing the kernel to a version that is not the latest, distribution-supplied kernels often contain backports of some features released in later official kernels. You can purchase service and support packages from distribution vendors for kernels that they supply