ref-classes.xml 168 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927
  1. <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
  4. <chapter id='ref-classes'>
  5. <title>Classes</title>
  6. <para>
  7. Class files are used to abstract common functionality and share it amongst
  8. multiple recipe (<filename>.bb</filename>) files.
  9. To use a class file, you simply make sure the recipe inherits the class.
  10. In most cases, when a recipe inherits a class it is enough to enable its
  11. features.
  12. There are cases, however, where in the recipe you might need to set
  13. variables or override some default behavior.
  14. </para>
  15. <para>
  16. Any <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink> usually
  17. found in a recipe can also be placed in a class file.
  18. Class files are identified by the extension <filename>.bbclass</filename>
  19. and are usually placed in a <filename>classes/</filename> directory beneath
  20. the <filename>meta*/</filename> directory found in the
  21. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
  22. Class files can also be pointed to by
  23. <link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link>
  24. (e.g. <filename>build/</filename>) in the same way as
  25. <filename>.conf</filename> files in the <filename>conf</filename> directory.
  26. Class files are searched for in
  27. <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
  28. using the same method by which <filename>.conf</filename> files are
  29. searched.
  30. </para>
  31. <para>
  32. This chapter discusses only the most useful and important classes.
  33. Other classes do exist within the <filename>meta/classes</filename>
  34. directory in the
  35. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
  36. You can reference the <filename>.bbclass</filename> files directly
  37. for more information.
  38. </para>
  39. <section id='ref-classes-allarch'>
  40. <title><filename>allarch.bbclass</filename></title>
  41. <para>
  42. The <filename>allarch</filename> class is inherited
  43. by recipes that do not produce architecture-specific output.
  44. The class disables functionality that is normally needed for recipes
  45. that produce executable binaries (such as building the cross-compiler
  46. and a C library as pre-requisites, and splitting out of debug symbols
  47. during packaging).
  48. <note>
  49. <para>Unlike some distro recipes (e.g. Debian), OpenEmbedded recipes
  50. that produce packages that depend on tunings through use of the
  51. <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
  52. and
  53. <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>
  54. variables, should never be configured for all architectures
  55. using <filename>allarch</filename>.
  56. This is the case even if the recipes do not produce
  57. architecture-specific output.</para>
  58. <para>Configuring such recipes for all architectures causes the
  59. <link linkend='ref-tasks-package_write_deb'><filename>do_package_write_*</filename></link>
  60. tasks to have different signatures for the machines with different
  61. tunings.
  62. Additionally, unnecessary rebuilds occur every time an
  63. image for a different <filename>MACHINE</filename> is built
  64. even when the recipe never changes.</para>
  65. </note>
  66. </para>
  67. <para>
  68. By default, all recipes inherit the
  69. <link linkend='ref-classes-base'><filename>base</filename></link> and
  70. <link linkend='ref-classes-package'><filename>package</filename></link>
  71. classes, which enable functionality
  72. needed for recipes that produce executable output.
  73. If your recipe, for example, only produces packages that contain
  74. configuration files, media files, or scripts (e.g. Python and Perl),
  75. then it should inherit the <filename>allarch</filename> class.
  76. </para>
  77. </section>
  78. <section id='ref-classes-archiver'>
  79. <title><filename>archiver.bbclass</filename></title>
  80. <para>
  81. The <filename>archiver</filename> class supports releasing
  82. source code and other materials with the binaries.
  83. </para>
  84. <para>
  85. For more details on the source archiver, see the
  86. "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
  87. section in the Yocto Project Development Manual.
  88. You can also see the
  89. <link linkend='var-ARCHIVER_MODE'><filename>ARCHIVER_MODE</filename></link>
  90. variable for information about the variable flags (varflags)
  91. that help control archive creation.
  92. </para>
  93. </section>
  94. <section id='ref-classes-autotools'>
  95. <title><filename>autotools*.bbclass</filename></title>
  96. <para>
  97. The <filename>autotools*</filename> classes support Autotooled
  98. packages.
  99. </para>
  100. <para>
  101. The <filename>autoconf</filename>, <filename>automake</filename>,
  102. and <filename>libtool</filename> packages bring standardization.
  103. This class defines a set of tasks (e.g.
  104. <filename>configure</filename>, <filename>compile</filename> and
  105. so forth) that
  106. work for all Autotooled packages.
  107. It should usually be enough to define a few standard variables
  108. and then simply <filename>inherit autotools</filename>.
  109. These classes can also work with software that emulates Autotools.
  110. For more information, see the
  111. "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-autotooled-package'>Autotooled Package</ulink>"
  112. section in the Yocto Project Development Manual.
  113. </para>
  114. <para>
  115. By default, the <filename>autotools*</filename> classes
  116. use out-of-tree builds (i.e.
  117. <filename>autotools.bbclass</filename>).
  118. (<link linkend='var-B'><filename>B</filename></link> <filename>!=</filename>
  119. <link linkend='var-S'><filename>S</filename></link>).
  120. </para>
  121. <para>
  122. If the software being built by a recipe does not support
  123. using out-of-tree builds, you should have the recipe inherit the
  124. <filename>autotools-brokensep</filename> class.
  125. The <filename>autotools-brokensep</filename> class behaves the same
  126. as the <filename>autotools</filename> class but builds with
  127. <link linkend='var-B'><filename>B</filename></link> ==
  128. <link linkend='var-S'><filename>S</filename></link>.
  129. This method is useful when out-of-tree build support is either not
  130. present or is broken.
  131. <note>
  132. It is recommended that out-of-tree support be fixed and used
  133. if at all possible.
  134. </note>
  135. </para>
  136. <para>
  137. It's useful to have some idea of how the tasks defined by
  138. the <filename>autotools*</filename> classes work and what they do
  139. behind the scenes.
  140. <itemizedlist>
  141. <listitem><para><link linkend='ref-tasks-configure'><filename>do_configure</filename></link> -
  142. Regenerates the
  143. configure script (using <filename>autoreconf</filename>) and
  144. then launches it with a standard set of arguments used during
  145. cross-compilation.
  146. You can pass additional parameters to
  147. <filename>configure</filename> through the
  148. <filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename>
  149. or
  150. <link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>
  151. variables.
  152. </para></listitem>
  153. <listitem><para><link linkend='ref-tasks-compile'><filename>do_compile</filename></link> -
  154. Runs <filename>make</filename> with arguments that specify the
  155. compiler and linker.
  156. You can pass additional arguments through
  157. the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename>
  158. variable.
  159. </para></listitem>
  160. <listitem><para><link linkend='ref-tasks-install'><filename>do_install</filename></link> -
  161. Runs <filename>make install</filename> and passes in
  162. <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>
  163. as <filename>DESTDIR</filename>.
  164. </para></listitem>
  165. </itemizedlist>
  166. </para>
  167. </section>
  168. <section id='ref-classes-base'>
  169. <title><filename>base.bbclass</filename></title>
  170. <para>
  171. The <filename>base</filename> class is special in that every
  172. <filename>.bb</filename> file implicitly inherits the class.
  173. This class contains definitions for standard basic
  174. tasks such as fetching, unpacking, configuring (empty by default),
  175. compiling (runs any <filename>Makefile</filename> present), installing
  176. (empty by default) and packaging (empty by default).
  177. These classes are often overridden or extended by other classes
  178. such as the
  179. <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
  180. class or the
  181. <link linkend='ref-classes-package'><filename>package</filename></link>
  182. class.
  183. </para>
  184. <para>
  185. The class also contains some commonly used functions such as
  186. <filename>oe_runmake</filename>, which runs
  187. <filename>make</filename> with the arguments specified in
  188. <link linkend='var-EXTRA_OEMAKE'><filename>EXTRA_OEMAKE</filename></link>
  189. variable as well as the arguments passed directly to
  190. <filename>oe_runmake</filename>.
  191. </para>
  192. </section>
  193. <section id='ref-classes-bash-completion'>
  194. <title><filename>bash-completion.bbclass</filename></title>
  195. <para>
  196. Sets up packaging and dependencies appropriate for recipes that
  197. build software that includes bash-completion data.
  198. </para>
  199. </section>
  200. <section id='ref-classes-bin-package'>
  201. <title><filename>bin_package.bbclass</filename></title>
  202. <para>
  203. The <filename>bin_package</filename> class is a
  204. helper class for recipes that extract the contents of a binary package
  205. (e.g. an RPM) and install those contents rather than building the
  206. binary from source.
  207. The binary package is extracted and new packages in the configured
  208. output package format are created.
  209. Extraction and installation of proprietary binaries is a good example
  210. use for this class.
  211. <note>
  212. For RPMs and other packages that do not contain a subdirectory,
  213. you should specify an appropriate fetcher parameter to point to
  214. the subdirectory.
  215. For example, if BitBake is using the Git fetcher
  216. (<filename>git://</filename>), the "subpath" parameter limits
  217. the checkout to a specific subpath of the tree.
  218. Here is an example where <filename>${BP}</filename> is used so that
  219. the files are extracted into the subdirectory expected by the
  220. default value of
  221. <link linkend='var-S'><filename>S</filename></link>:
  222. <literallayout class='monospaced'>
  223. SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}"
  224. </literallayout>
  225. See the
  226. "<ulink url='&YOCTO_DOCS_BB_URL;#bb-fetchers'>Fetchers</ulink>"
  227. section in the BitBake User Manual for more information on
  228. supported BitBake Fetchers.
  229. </note>
  230. </para>
  231. </section>
  232. <section id='ref-classes-binconfig'>
  233. <title><filename>binconfig.bbclass</filename></title>
  234. <para>
  235. The <filename>binconfig</filename> class helps to correct paths in
  236. shell scripts.
  237. </para>
  238. <para>
  239. Before <filename>pkg-config</filename> had become widespread, libraries
  240. shipped shell scripts to give information about the libraries and
  241. include paths needed to build software (usually named
  242. <filename>LIBNAME-config</filename>).
  243. This class assists any recipe using such scripts.
  244. </para>
  245. <para>
  246. During staging, the OpenEmbedded build system installs such scripts
  247. into the <filename>sysroots/</filename> directory.
  248. Inheriting this class results in all paths in these scripts being
  249. changed to point into the <filename>sysroots/</filename> directory so
  250. that all builds that use the script use the correct directories
  251. for the cross compiling layout.
  252. See the
  253. <link linkend='var-BINCONFIG_GLOB'><filename>BINCONFIG_GLOB</filename></link>
  254. variable for more information.
  255. </para>
  256. </section>
  257. <section id='ref-classes-binconfig-disabled'>
  258. <title><filename>binconfig-disabled.bbclass</filename></title>
  259. <para>
  260. An alternative version of the
  261. <link linkend='ref-classes-binconfig'><filename>binconfig</filename></link>
  262. class, which disables binary configuration scripts by making them
  263. return an error in favor of using <filename>pkg-config</filename>
  264. to query the information.
  265. The scripts to be disabled should be specified using the
  266. <link linkend='var-BINCONFIG'><filename>BINCONFIG</filename></link>
  267. variable within the recipe inheriting the class.
  268. </para>
  269. </section>
  270. <section id='ref-classes-blacklist'>
  271. <title><filename>blacklist.bbclass</filename></title>
  272. <para>
  273. The <filename>blacklist</filename> class prevents
  274. the OpenEmbedded build system from building specific recipes
  275. (blacklists them).
  276. To use this class, inherit the class globally and set
  277. <link linkend='var-PNBLACKLIST'><filename>PNBLACKLIST</filename></link>
  278. for each recipe you wish to blacklist.
  279. Specify the <link linkend='var-PN'><filename>PN</filename></link>
  280. value as a variable flag (varflag) and provide a reason, which is
  281. reported, if the package is requested to be built as the value.
  282. For example, if you want to blacklist a recipe called "exoticware",
  283. you add the following to your <filename>local.conf</filename>
  284. or distribution configuration:
  285. <literallayout class='monospaced'>
  286. INHERIT += "blacklist"
  287. PNBLACKLIST[exoticware] = "Not supported by our organization."
  288. </literallayout>
  289. </para>
  290. </section>
  291. <section id='ref-classes-bluetooth'>
  292. <title><filename>bluetooth.bbclass</filename></title>
  293. <para>
  294. The <filename>bluetooth</filename> class defines a variable that
  295. expands to the recipe (package) providing core
  296. bluetooth support on the platform.
  297. </para>
  298. <para>
  299. For details on how the class works, see the
  300. <filename>meta/classes/bluetooth.bbclass</filename> file in the Yocto
  301. Project
  302. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
  303. </para>
  304. </section>
  305. <section id='ref-classes-bugzilla'>
  306. <title><filename>bugzilla.bbclass</filename></title>
  307. <para>
  308. The <filename>bugzilla</filename> class supports setting up an
  309. instance of Bugzilla in which you can automatically files bug reports
  310. in response to build failures.
  311. For this class to work, you need to enable the XML-RPC interface in
  312. the instance of Bugzilla.
  313. </para>
  314. </section>
  315. <section id='ref-classes-buildhistory'>
  316. <title><filename>buildhistory.bbclass</filename></title>
  317. <para>
  318. The <filename>buildhistory</filename> class records a
  319. history of build output metadata, which can be used to detect possible
  320. regressions as well as used for analysis of the build output.
  321. For more information on using Build History, see the
  322. "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
  323. section.
  324. </para>
  325. </section>
  326. <section id='ref-classes-buildstats'>
  327. <title><filename>buildstats.bbclass</filename></title>
  328. <para>
  329. The <filename>buildstats</filename> class records
  330. performance statistics about each task executed during the build
  331. (e.g. elapsed time, CPU usage, and I/O usage).
  332. </para>
  333. <para>
  334. When you use this class, the output goes into the
  335. <link linkend='var-BUILDSTATS_BASE'><filename>BUILDSTATS_BASE</filename></link>
  336. directory, which defaults to <filename>${TMPDIR}/buildstats/</filename>.
  337. You can analyze the elapsed time using
  338. <filename>scripts/pybootchartgui/pybootchartgui.py</filename>, which
  339. produces a cascading chart of the entire build process and can be
  340. useful for highlighting bottlenecks.
  341. </para>
  342. <para>
  343. Collecting build statistics is enabled by default through the
  344. <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
  345. variable from your <filename>local.conf</filename> file.
  346. Consequently, you do not have to do anything to enable the class.
  347. However, if you want to disable the class, simply remove "buildstats"
  348. from the <filename>USER_CLASSES</filename> list.
  349. </para>
  350. </section>
  351. <section id='ref-classes-buildstats-summary'>
  352. <title><filename>buildstats-summary.bbclass</filename></title>
  353. <para>
  354. When inherited globally, prints statistics at the end of the build
  355. on sstate re-use.
  356. In order to function, this class requires the
  357. <link linkend='ref-classes-buildstats'><filename>buildstats</filename></link>
  358. class be enabled.
  359. </para>
  360. </section>
  361. <section id='ref-classes-ccache'>
  362. <title><filename>ccache.bbclass</filename></title>
  363. <para>
  364. The <filename>ccache</filename> class enables the
  365. <ulink url='http://ccache.samba.org/'>C/C++ Compiler Cache</ulink>
  366. for the build.
  367. This class is used to give a minor performance boost during the build.
  368. However, using the class can lead to unexpected side-effects.
  369. Thus, it is recommended that you do not use this class.
  370. See <ulink url='http://ccache.samba.org/'></ulink> for information on
  371. the C/C++ Compiler Cache.
  372. </para>
  373. </section>
  374. <section id='ref-classes-chrpath'>
  375. <title><filename>chrpath.bbclass</filename></title>
  376. <para>
  377. The <filename>chrpath</filename> class
  378. is a wrapper around the "chrpath" utility, which is used during the
  379. build process for <filename>nativesdk</filename>,
  380. <filename>cross</filename>, and
  381. <filename>cross-canadian</filename> recipes to change
  382. <filename>RPATH</filename> records within binaries in order to make
  383. them relocatable.
  384. </para>
  385. </section>
  386. <section id='ref-classes-clutter'>
  387. <title><filename>clutter.bbclass</filename></title>
  388. <para>
  389. The <filename>clutter</filename> class consolidates the
  390. major and minor version naming and other common items used by Clutter
  391. and related recipes.
  392. <note>
  393. Unlike some other classes related to specific libraries, recipes
  394. building other software that uses Clutter do not need to
  395. inherit this class unless they use the same recipe versioning
  396. scheme that the Clutter and related recipes do.
  397. </note>
  398. </para>
  399. </section>
  400. <section id='ref-classes-cmake'>
  401. <title><filename>cmake.bbclass</filename></title>
  402. <para>
  403. The <filename>cmake</filename> class allows for
  404. recipes that need to build software using the CMake build system.
  405. You can use the
  406. <link linkend='var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></link>
  407. variable to specify additional configuration options to be passed on
  408. the <filename>cmake</filename> command line.
  409. </para>
  410. </section>
  411. <section id='ref-classes-cml1'>
  412. <title><filename>cml1.bbclass</filename></title>
  413. <para>
  414. The <filename>cml1</filename> class provides basic support for the
  415. Linux kernel style build configuration system.
  416. </para>
  417. </section>
  418. <section id='ref-classes-compress_doc'>
  419. <title><filename>compress_doc.bbclass</filename></title>
  420. <para>
  421. Enables compression for man pages and info pages.
  422. This class is intended to be inherited globally.
  423. The default compression mechanism is gz (gzip) but you can
  424. select an alternative mechanism by setting the
  425. <link linkend='var-DOC_COMPRESS'><filename>DOC_COMPRESS</filename></link>
  426. variable.
  427. </para>
  428. </section>
  429. <section id='ref-classes-copyleft_compliance'>
  430. <title><filename>copyleft_compliance.bbclass</filename></title>
  431. <para>
  432. The <filename>copyleft_compliance</filename> class
  433. preserves source code for the purposes of license compliance.
  434. This class is an alternative to the <filename>archiver</filename>
  435. class and is still used by some users even though it has been
  436. deprecated in favor of the
  437. <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
  438. class.
  439. </para>
  440. </section>
  441. <section id='ref-classes-copyleft_filter'>
  442. <title><filename>copyleft_filter.bbclass</filename></title>
  443. <para>
  444. A class used by the
  445. <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
  446. and
  447. <link linkend='ref-classes-copyleft_compliance'><filename>copyleft_compliance</filename></link>
  448. classes for filtering licenses.
  449. The <filename>copyleft_filter</filename> class is an internal class
  450. and is not intended to be used directly.
  451. </para>
  452. </section>
  453. <section id='ref-classes-core-image'>
  454. <title><filename>core-image.bbclass</filename></title>
  455. <para>
  456. The <filename>core-image</filename> class
  457. provides common definitions for the
  458. <filename>core-image-*</filename> image recipes, such as support for
  459. additional
  460. <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
  461. </para>
  462. </section>
  463. <section id='ref-classes-cpan'>
  464. <title><filename>cpan*.bbclass</filename></title>
  465. <para>
  466. The <filename>cpan*</filename> classes support Perl modules.
  467. </para>
  468. <para>
  469. Recipes for Perl modules are simple.
  470. These recipes usually only need to point to the source's archive and
  471. then inherit the proper class file.
  472. Building is split into two methods depending on which method the module
  473. authors used.
  474. <itemizedlist>
  475. <listitem><para>Modules that use old
  476. <filename>Makefile.PL</filename>-based build system require
  477. <filename>cpan.bbclass</filename> in their recipes.
  478. </para></listitem>
  479. <listitem><para>Modules that use
  480. <filename>Build.PL</filename>-based build system require
  481. using <filename>cpan_build.bbclass</filename> in their recipes.
  482. </para></listitem>
  483. </itemizedlist>
  484. Both build methods inherit the <filename>cpan-base</filename> class
  485. for basic Perl support.
  486. </para>
  487. </section>
  488. <section id='ref-classes-cross'>
  489. <title><filename>cross.bbclass</filename></title>
  490. <para>
  491. The <filename>cross</filename> class provides support for the recipes
  492. that build the cross-compilation tools.
  493. </para>
  494. </section>
  495. <section id='ref-classes-cross-canadian'>
  496. <title><filename>cross-canadian.bbclass</filename></title>
  497. <para>
  498. The <filename>cross-canadian</filename> class
  499. provides support for the recipes that build the Canadian
  500. Cross-compilation tools for SDKs.
  501. See the
  502. "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
  503. section for more discussion on these cross-compilation tools.
  504. </para>
  505. </section>
  506. <section id='ref-classes-crosssdk'>
  507. <title><filename>crosssdk.bbclass</filename></title>
  508. <para>
  509. The <filename>crosssdk</filename> class
  510. provides support for the recipes that build the cross-compilation
  511. tools used for building SDKs.
  512. See the
  513. "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
  514. section for more discussion on these cross-compilation tools.
  515. </para>
  516. </section>
  517. <section id='ref-classes-debian'>
  518. <title><filename>debian.bbclass</filename></title>
  519. <para>
  520. The <filename>debian</filename> class renames output packages so that
  521. they follow the Debian naming policy (i.e. <filename>glibc</filename>
  522. becomes <filename>libc6</filename> and <filename>glibc-devel</filename>
  523. becomes <filename>libc6-dev</filename>.)
  524. Renaming includes the library name and version as part of the package
  525. name.
  526. </para>
  527. <para>
  528. If a recipe creates packages for multiple libraries
  529. (shared object files of <filename>.so</filename> type), use the
  530. <link linkend='var-LEAD_SONAME'><filename>LEAD_SONAME</filename></link>
  531. variable in the recipe to specify the library on which to apply the
  532. naming scheme.
  533. </para>
  534. </section>
  535. <section id='ref-classes-deploy'>
  536. <title><filename>deploy.bbclass</filename></title>
  537. <para>
  538. The <filename>deploy</filename> class handles deploying files
  539. to the
  540. <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
  541. directory.
  542. The main function of this class is to allow the deploy step to be
  543. accelerated by shared state.
  544. Recipes that inherit this class should define their own
  545. <link linkend='ref-tasks-deploy'><filename>do_deploy</filename></link>
  546. function to copy the files to be deployed to
  547. <link linkend='var-DEPLOYDIR'><filename>DEPLOYDIR</filename></link>,
  548. and use <filename>addtask</filename> to add the task at the appropriate
  549. place, which is usually after
  550. <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
  551. or
  552. <link linkend='ref-tasks-install'><filename>do_install</filename></link>.
  553. The class then takes care of staging the files from
  554. <filename>DEPLOYDIR</filename> to
  555. <filename>DEPLOY_DIR_IMAGE</filename>.
  556. </para>
  557. </section>
  558. <section id='ref-classes-devshell'>
  559. <title><filename>devshell.bbclass</filename></title>
  560. <para>
  561. The <filename>devshell</filename> class adds the
  562. <filename>do_devshell</filename> task.
  563. Distribution policy dictates whether to include this class.
  564. See the
  565. "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
  566. in the Yocto Project Development Manual for more information about
  567. using <filename>devshell</filename>.
  568. </para>
  569. </section>
  570. <section id='ref-classes-distro_features_check'>
  571. <title><filename>distro_features_check.bbclass</filename></title>
  572. <para>
  573. The <filename>distro_features_check</filename> class
  574. allows individual recipes to check for required and conflicting
  575. <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
  576. </para>
  577. <para>
  578. This class provides support for the
  579. <link linkend='var-REQUIRED_DISTRO_FEATURES'><filename>REQUIRED_DISTRO_FEATURES</filename></link>
  580. and
  581. <link linkend='var-CONFLICT_DISTRO_FEATURES'><filename>CONFLICT_DISTRO_FEATURES</filename></link>
  582. variables.
  583. If any conditions specified in the recipe using the above variables are
  584. not met, the recipe will be skipped.
  585. </para>
  586. </section>
  587. <section id='ref-classes-distrodata'>
  588. <title><filename>distrodata.bbclass</filename></title>
  589. <para>
  590. The <filename>distrodata</filename> class
  591. provides for automatic checking for upstream recipe updates.
  592. The class creates a comma-separated value (CSV) spreadsheet that
  593. contains information about the recipes.
  594. The information provides the
  595. <link linkend='ref-tasks-distrodata'><filename>do_distrodata</filename></link>
  596. and
  597. <filename>do_distro_check</filename> tasks, which do upstream checking
  598. and also verify if a package is used in multiple major distributions.
  599. </para>
  600. <para>
  601. The class is not included by default.
  602. To use it, you must set the
  603. <link linkend='var-INHERIT'><filename>INHERIT</filename></link>
  604. variable:
  605. <literallayout class='monospaced'>
  606. INHERIT+= "distrodata"
  607. </literallayout>
  608. </para>
  609. <para>
  610. The <filename>distrodata</filename> class also provides the
  611. <link linkend='ref-tasks-checkpkg'><filename>do_checkpkg</filename></link>
  612. task, which can be used against a simple recipe or against an
  613. image to get all its recipe information.
  614. </para>
  615. </section>
  616. <section id='ref-classes-distutils'>
  617. <title><filename>distutils*.bbclass</filename></title>
  618. <para>
  619. The <filename>distutils*</filename> classes support recipes for Python
  620. version 2.x extensions, which are simple.
  621. These recipes usually only need to point to the source's archive and
  622. then inherit the proper class.
  623. Building is split into two methods depending on which method the
  624. module authors used.
  625. <itemizedlist>
  626. <listitem><para>Extensions that use an Autotools-based build system
  627. require Autotools and the classes based on
  628. <filename>distutils</filename> in their recipes.
  629. </para></listitem>
  630. <listitem><para>Extensions that use build systems based on
  631. <filename>distutils</filename> require
  632. the <filename>distutils</filename> class in their recipes.
  633. </para></listitem>
  634. <listitem><para>Extensions that use build systems based on
  635. <filename>setuptools</filename> require the
  636. <link linkend='ref-classes-setuptools'><filename>setuptools</filename></link>
  637. class in their recipes.
  638. </para></listitem>
  639. </itemizedlist>
  640. The <filename>distutils-common-base</filename> class is required by
  641. some of the <filename>distutils*</filename> classes to provide common
  642. Python2 support.
  643. </para>
  644. <para>
  645. The <filename>distutils-tools</filename> class supports recipes for
  646. additional "distutils" tools.
  647. </para>
  648. </section>
  649. <section id='ref-classes-distutils3'>
  650. <title><filename>distutils3*.bbclass</filename></title>
  651. <para>
  652. The <filename>distutils3*</filename> classes support recipes for Python
  653. version 3.x extensions, which are simple.
  654. These recipes usually only need to point to the source's archive and
  655. then inherit the proper class.
  656. Building is split into three methods depending on which method the
  657. module authors used.
  658. <itemizedlist>
  659. <listitem><para>Extensions that use an Autotools-based build system
  660. require Autotools and
  661. <filename>distutils</filename>-based classes in their recipes.
  662. </para></listitem>
  663. <listitem><para>Extensions that use
  664. <filename>distutils</filename>-based build systems require
  665. the <filename>distutils</filename> class in their recipes.
  666. </para></listitem>
  667. <listitem><para>Extensions that use build systems based on
  668. <filename>setuptools3</filename> require the
  669. <link linkend='ref-classes-setuptools'><filename>setuptools3</filename></link>
  670. class in their recipes.
  671. </para></listitem>
  672. </itemizedlist>
  673. The <filename>distutils3*</filename> classes either inherit their
  674. corresponding <filename>distutils*</filename> class or replicate them
  675. using a Python3 version instead (e.g.
  676. <filename>distutils3-base</filename> inherits
  677. <filename>distutils-common-base</filename>, which is the same as
  678. <filename>distutils-base</filename> but inherits
  679. <filename>python3native</filename> instead of
  680. <filename>pythonnative</filename>).
  681. </para>
  682. </section>
  683. <section id='ref-classes-externalsrc'>
  684. <title><filename>externalsrc.bbclass</filename></title>
  685. <para>
  686. The <filename>externalsrc</filename> class supports building software
  687. from source code that is external to the OpenEmbedded build system.
  688. Building software from an external source tree means that the build
  689. system's normal fetch, unpack, and patch process is not used.
  690. </para>
  691. <para>
  692. By default, the OpenEmbedded build system uses the
  693. <link linkend='var-S'><filename>S</filename></link> and
  694. <link linkend='var-B'><filename>B</filename></link> variables to
  695. locate unpacked recipe source code and to build it, respectively.
  696. When your recipe inherits the <filename>externalsrc</filename> class,
  697. you use the
  698. <link linkend='var-EXTERNALSRC'><filename>EXTERNALSRC</filename></link>
  699. and
  700. <link linkend='var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></link>
  701. variables to ultimately define <filename>S</filename> and
  702. <filename>B</filename>.
  703. </para>
  704. <para>
  705. By default, this class expects the source code to support recipe builds
  706. that use the <link linkend='var-B'><filename>B</filename></link>
  707. variable to point to the directory in which the OpenEmbedded build
  708. system places the generated objects built from the recipes.
  709. By default, the <filename>B</filename> directory is set to the
  710. following, which is separate from the source directory
  711. (<filename>S</filename>):
  712. <literallayout class='monospaced'>
  713. ${WORKDIR}/${BPN}/{PV}/
  714. </literallayout>
  715. See these variables for more information:
  716. <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
  717. <link linkend='var-BPN'><filename>BPN</filename></link>, and
  718. <link linkend='var-PV'><filename>PV</filename></link>,
  719. </para>
  720. <para>
  721. For more information on the
  722. <filename>externalsrc</filename> class, see the comments in
  723. <filename>meta/classes/externalsrc.bbclass</filename> in the
  724. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
  725. For information on how to use the <filename>externalsrc</filename>
  726. class, see the
  727. "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
  728. section in the Yocto Project Development Manual.
  729. </para>
  730. </section>
  731. <section id='ref-classes-extrausers'>
  732. <title><filename>extrausers.bbclass</filename></title>
  733. <para>
  734. The <filename>extrausers</filename> class allows
  735. additional user and group configuration to be applied at the image
  736. level.
  737. Inheriting this class either globally or from an image recipe allows
  738. additional user and group operations to be performed using the
  739. <link linkend='var-EXTRA_USERS_PARAMS'><filename>EXTRA_USERS_PARAMS</filename></link>
  740. variable.
  741. <note>
  742. The user and group operations added using the
  743. <filename>extrausers</filename> class are not tied to a specific
  744. recipe outside of the recipe for the image.
  745. Thus, the operations can be performed across the image as a whole.
  746. Use the
  747. <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
  748. class to add user and group configuration to a specific recipe.
  749. </note>
  750. Here is an example that uses this class in an image recipe:
  751. <literallayout class='monospaced'>
  752. inherit extrausers
  753. EXTRA_USERS_PARAMS = "\
  754. useradd -p '' tester; \
  755. groupadd developers; \
  756. userdel nobody; \
  757. groupdel -g video; \
  758. groupmod -g 1020 developers; \
  759. usermod -s /bin/sh tester; \
  760. "
  761. </literallayout>
  762. Here is an example that adds two users named "tester-jim" and
  763. "tester-sue" and assigns passwords:
  764. <literallayout class='monospaced'>
  765. inherit extrausers
  766. EXTRA_USERS_PARAMS = "\
  767. useradd -P tester01 tester-jim; \
  768. useradd -P tester01 tester-sue; \
  769. "
  770. </literallayout>
  771. Finally, here is an example that sets the root password to
  772. "1876*18":
  773. <literallayout class='monospaced'>
  774. inherit extrausers
  775. EXTRA_USERS_PARAMS = "\
  776. usermod -P 1876*18 root; \
  777. "
  778. </literallayout>
  779. </para>
  780. </section>
  781. <section id='ref-classes-fontcache'>
  782. <title><filename>fontcache.bbclass</filename></title>
  783. <para>
  784. The <filename>fontcache</filename> class generates the
  785. proper post-install and post-remove (postinst and postrm)
  786. scriptlets for font packages.
  787. These scriptlets call <filename>fc-cache</filename> (part of
  788. <filename>Fontconfig</filename>) to add the fonts to the font
  789. information cache.
  790. Since the cache files are architecture-specific,
  791. <filename>fc-cache</filename> runs using QEMU if the postinst
  792. scriptlets need to be run on the build host during image creation.
  793. </para>
  794. <para>
  795. If the fonts being installed are in packages other than the main
  796. package, set
  797. <link linkend='var-FONT_PACKAGES'><filename>FONT_PACKAGES</filename></link>
  798. to specify the packages containing the fonts.
  799. </para>
  800. </section>
  801. <section id='ref-classes-fs-uuid'>
  802. <title><filename>fs-uuid.bbclass</filename></title>
  803. <para>
  804. The <filename>fs-uuid</filename> class extracts UUID from
  805. <filename>${</filename><link linkend='var-ROOTFS'><filename>ROOTFS</filename></link><filename>}</filename>,
  806. which must have been built by the time that this function gets called.
  807. The <filename>fs-uuid</filename> class only works on
  808. <filename>ext</filename> file systems and depends on
  809. <filename>tune2fs</filename>.
  810. </para>
  811. </section>
  812. <section id='ref-classes-gconf'>
  813. <title><filename>gconf.bbclass</filename></title>
  814. <para>
  815. The <filename>gconf</filename> class provides common
  816. functionality for recipes that need to install GConf schemas.
  817. The schemas will be put into a separate package
  818. (<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-gconf</filename>)
  819. that is created automatically when this class is inherited.
  820. This package uses the appropriate post-install and post-remove
  821. (postinst/postrm) scriptlets to register and unregister the schemas
  822. in the target image.
  823. </para>
  824. </section>
  825. <section id='ref-classes-gettext'>
  826. <title><filename>gettext.bbclass</filename></title>
  827. <para>
  828. The <filename>gettext</filename> class provides support for
  829. building software that uses the GNU <filename>gettext</filename>
  830. internationalization and localization system.
  831. All recipes building software that use
  832. <filename>gettext</filename> should inherit this class.
  833. </para>
  834. </section>
  835. <section id='ref-classes-gnome'>
  836. <title><filename>gnome.bbclass</filename></title>
  837. <para>
  838. The <filename>gnome</filename> class supports recipes that
  839. build software from the GNOME stack.
  840. This class inherits the
  841. <link linkend='ref-classes-gnomebase'><filename>gnomebase</filename></link>,
  842. <link linkend='ref-classes-gtk-icon-cache'><filename>gtk-icon-cache</filename></link>,
  843. <link linkend='ref-classes-gconf'><filename>gconf</filename></link> and
  844. <link linkend='ref-classes-mime'><filename>mime</filename></link> classes.
  845. The class also disables GObject introspection where applicable.
  846. </para>
  847. </section>
  848. <section id='ref-classes-gnomebase'>
  849. <title><filename>gnomebase.bbclass</filename></title>
  850. <para>
  851. The <filename>gnomebase</filename> class is the base
  852. class for recipes that build software from the GNOME stack.
  853. This class sets
  854. <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> to
  855. download the source from the GNOME mirrors as well as extending
  856. <link linkend='var-FILES'><filename>FILES</filename></link>
  857. with the typical GNOME installation paths.
  858. </para>
  859. </section>
  860. <section id='ref-classes-gobject-introspection'>
  861. <title><filename>gobject-introspection.bbclass</filename></title>
  862. <para>
  863. Provides support for recipes building software that
  864. supports GObject introspection.
  865. This functionality is only enabled if the
  866. "gobject-introspection-data" feature is in
  867. <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
  868. as well as "qemu-usermode" being in
  869. <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>.
  870. <note>
  871. This functionality is backfilled by default and,
  872. if not applicable, should be disabled through
  873. <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
  874. or
  875. <link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></link>,
  876. respectively.
  877. </note>
  878. </para>
  879. </section>
  880. <section id='ref-classes-grub-efi'>
  881. <title><filename>grub-efi.bbclass</filename></title>
  882. <para>
  883. The <filename>grub-efi</filename>
  884. class provides <filename>grub-efi</filename>-specific functions for
  885. building bootable images.
  886. </para>
  887. <para>
  888. This class supports several variables:
  889. <itemizedlist>
  890. <listitem><para>
  891. <link linkend='var-INITRD'><filename>INITRD</filename></link>:
  892. Indicates list of filesystem images to concatenate and use
  893. as an initial RAM disk (initrd) (optional).
  894. </para></listitem>
  895. <listitem><para>
  896. <link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:
  897. Indicates a filesystem image to include as the root filesystem
  898. (optional).</para></listitem>
  899. <listitem><para>
  900. <link linkend='var-GRUB_GFXSERIAL'><filename>GRUB_GFXSERIAL</filename></link>:
  901. Set this to "1" to have graphics and serial in the boot menu.
  902. </para></listitem>
  903. <listitem><para>
  904. <link linkend='var-LABELS'><filename>LABELS</filename></link>:
  905. A list of targets for the automatic configuration.
  906. </para></listitem>
  907. <listitem><para>
  908. <link linkend='var-APPEND'><filename>APPEND</filename></link>:
  909. An override list of append strings for each
  910. <filename>LABEL</filename>.
  911. </para></listitem>
  912. <listitem><para>
  913. <link linkend='var-GRUB_OPTS'><filename>GRUB_OPTS</filename></link>:
  914. Additional options to add to the configuration (optional).
  915. Options are delimited using semi-colon characters
  916. (<filename>;</filename>).</para></listitem>
  917. <listitem><para>
  918. <link linkend='var-GRUB_TIMEOUT'><filename>GRUB_TIMEOUT</filename></link>:
  919. Timeout before executing the default <filename>LABEL</filename>
  920. (optional).
  921. </para></listitem>
  922. </itemizedlist>
  923. </para>
  924. </section>
  925. <section id='ref-classes-gsettings'>
  926. <title><filename>gsettings.bbclass</filename></title>
  927. <para>
  928. The <filename>gsettings</filename> class
  929. provides common functionality for recipes that need to install
  930. GSettings (glib) schemas.
  931. The schemas are assumed to be part of the main package.
  932. Appropriate post-install and post-remove (postinst/postrm)
  933. scriptlets are added to register and unregister the schemas in the
  934. target image.
  935. </para>
  936. </section>
  937. <section id='ref-classes-gtk-doc'>
  938. <title><filename>gtk-doc.bbclass</filename></title>
  939. <para>
  940. The <filename>gtk-doc</filename> class
  941. is a helper class to pull in the appropriate
  942. <filename>gtk-doc</filename> dependencies and disable
  943. <filename>gtk-doc</filename>.
  944. </para>
  945. </section>
  946. <section id='ref-classes-gtk-icon-cache'>
  947. <title><filename>gtk-icon-cache.bbclass</filename></title>
  948. <para>
  949. The <filename>gtk-icon-cache</filename> class
  950. generates the proper post-install and post-remove (postinst/postrm)
  951. scriptlets for packages that use GTK+ and install icons.
  952. These scriptlets call <filename>gtk-update-icon-cache</filename> to add
  953. the fonts to GTK+'s icon cache.
  954. Since the cache files are architecture-specific,
  955. <filename>gtk-update-icon-cache</filename> is run using QEMU if the
  956. postinst scriptlets need to be run on the build host during image
  957. creation.
  958. </para>
  959. </section>
  960. <section id='ref-classes-gtk-immodules-cache'>
  961. <title><filename>gtk-immodules-cache.bbclass</filename></title>
  962. <para>
  963. The <filename>gtk-immodules-cache</filename> class
  964. generates the proper post-install and post-remove (postinst/postrm)
  965. scriptlets for packages that install GTK+ input method modules for
  966. virtual keyboards.
  967. These scriptlets call <filename>gtk-update-icon-cache</filename> to add
  968. the input method modules to the cache.
  969. Since the cache files are architecture-specific,
  970. <filename>gtk-update-icon-cache</filename> is run using QEMU if the
  971. postinst scriptlets need to be run on the build host during image
  972. creation.
  973. </para>
  974. <para>
  975. If the input method modules being installed are in packages other than
  976. the main package, set
  977. <link linkend='var-GTKIMMODULES_PACKAGES'><filename>GTKIMMODULES_PACKAGES</filename></link>
  978. to specify the packages containing the modules.
  979. </para>
  980. </section>
  981. <section id='ref-classes-gzipnative'>
  982. <title><filename>gzipnative.bbclass</filename></title>
  983. <para>
  984. The <filename>gzipnative</filename> class enables the use of
  985. different native versions of <filename>gzip</filename>
  986. and <filename>pigz</filename> rather than the versions of these tools
  987. from the build host.
  988. </para>
  989. </section>
  990. <section id='ref-classes-icecc'>
  991. <title><filename>icecc.bbclass</filename></title>
  992. <para>
  993. The <filename>icecc</filename> class supports
  994. <ulink url='https://github.com/icecc/icecream'>Icecream</ulink>, which
  995. facilitates taking compile jobs and distributing them among remote
  996. machines.
  997. </para>
  998. <para>
  999. The class stages directories with symlinks from <filename>gcc</filename>
  1000. and <filename>g++</filename> to <filename>icecc</filename>, for both
  1001. native and cross compilers.
  1002. Depending on each configure or compile, the OpenEmbedded build system
  1003. adds the directories at the head of the <filename>PATH</filename> list
  1004. and then sets the <filename>ICECC_CXX</filename> and
  1005. <filename>ICEC_CC</filename> variables, which are the paths to the
  1006. <filename>g++</filename> and <filename>gcc</filename> compilers,
  1007. respectively.
  1008. </para>
  1009. <para>
  1010. For the cross compiler, the class creates a <filename>tar.gz</filename>
  1011. file that contains the Yocto Project toolchain and sets
  1012. <filename>ICECC_VERSION</filename>, which is the version of the
  1013. cross-compiler used in the cross-development toolchain, accordingly.
  1014. </para>
  1015. <para>
  1016. The class handles all three different compile stages
  1017. (i.e native ,cross-kernel and target) and creates the necessary
  1018. environment <filename>tar.gz</filename> file to be used by the remote
  1019. machines.
  1020. The class also supports SDK generation.
  1021. </para>
  1022. <para>
  1023. If <link linkend='var-ICECC_PATH'><filename>ICECC_PATH</filename></link>
  1024. is not set in your <filename>local.conf</filename> file, then the
  1025. class tries to locate the <filename>icecc</filename> binary
  1026. using <filename>which</filename>.
  1027. If
  1028. <link linkend='var-ICECC_ENV_EXEC'><filename>ICECC_ENV_EXEC</filename></link>
  1029. is set in your <filename>local.conf</filename> file, the variable should
  1030. point to the <filename>icecc-create-env</filename> script
  1031. provided by the user.
  1032. If you do not point to a user-provided script, the build system
  1033. uses the default script provided by the recipe
  1034. <filename>icecc-create-env-native.bb</filename>.
  1035. <note>
  1036. This script is a modified version and not the one that comes with
  1037. <filename>icecc</filename>.
  1038. </note>
  1039. </para>
  1040. <para>
  1041. If you do not want the Icecream distributed compile support to apply
  1042. to specific recipes or classes, you can effectively "blacklist" them
  1043. by listing the recipes and classes using the
  1044. <link linkend='var-ICECC_USER_PACKAGE_BL'><filename>ICECC_USER_PACKAGE_BL</filename></link>
  1045. and
  1046. <link linkend='var-ICECC_USER_CLASS_BL'><filename>ICECC_USER_CLASS_BL</filename></link>,
  1047. variables, respectively, in your <filename>local.conf</filename> file.
  1048. Doing so causes the OpenEmbedded build system to handle these
  1049. compilations locally.
  1050. </para>
  1051. <para>
  1052. Additionally, you can list recipes using the
  1053. <link linkend='var-ICECC_USER_PACKAGE_WL'><filename>ICECC_USER_PACKAGE_WL</filename></link>
  1054. variable in your <filename>local.conf</filename> file to force
  1055. <filename>icecc</filename> to be enabled for recipes using an empty
  1056. <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
  1057. variable.
  1058. </para>
  1059. <para>
  1060. Inheriting the <filename>icecc</filename> class changes all sstate
  1061. signatures.
  1062. Consequently, if a development team has a dedicated build system
  1063. that populates
  1064. <link linkend='var-SSTATE_MIRRORS'><filename>STATE_MIRRORS</filename></link>
  1065. and they want to reuse sstate from
  1066. <filename>STATE_MIRRORS</filename>, then all developers and the
  1067. build system need to either inherit the <filename>icecc</filename>
  1068. class or nobody should.
  1069. </para>
  1070. <para>
  1071. At the distribution level, you can inherit the
  1072. <filename>icecc</filename> class to be sure that all builders start
  1073. with the same sstate signatures.
  1074. After inheriting the class, you can then disable the feature by setting
  1075. the
  1076. <link linkend='var-ICECC_DISABLED'><filename>ICECC_DISABLED</filename></link>
  1077. variable to "1" as follows:
  1078. <literallayout class='monospaced'>
  1079. INHERIT_DISTRO_append = " icecc"
  1080. ICECC_DISABLED ??= "1"
  1081. </literallayout>
  1082. This practice makes sure everyone is using the same signatures but also
  1083. requires individuals that do want to use Icecream to enable the feature
  1084. individually as follows in your <filename>local.conf</filename> file:
  1085. <literallayout class='monospaced'>
  1086. ICECC_DISABLED = ""
  1087. </literallayout>
  1088. </para>
  1089. </section>
  1090. <section id='ref-classes-image'>
  1091. <title><filename>image.bbclass</filename></title>
  1092. <para>
  1093. The <filename>image</filename> class helps support creating images
  1094. in different formats.
  1095. First, the root filesystem is created from packages using
  1096. one of the <filename>rootfs*.bbclass</filename>
  1097. files (depending on the package format used) and then one or more image
  1098. files are created.
  1099. <itemizedlist>
  1100. <listitem><para>The
  1101. <filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></filename>
  1102. variable controls the types of images to generate.
  1103. </para></listitem>
  1104. <listitem><para>The
  1105. <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>
  1106. variable controls the list of packages to install into the
  1107. image.</para></listitem>
  1108. </itemizedlist>
  1109. For information on customizing images, see the
  1110. "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage'>Customizing Images</ulink>"
  1111. section in the Yocto Project Development Manual.
  1112. For information on how images are created, see the
  1113. "<link linkend='images-dev-environment'>Images</link>" section elsewhere
  1114. in this manual.
  1115. </para>
  1116. </section>
  1117. <section id='ref-classes-image-buildinfo'>
  1118. <title><filename>image-buildinfo.bbclass</filename></title>
  1119. <para>
  1120. The <filename>image-buildinfo</filename> class writes information
  1121. to the target filesystem on <filename>/etc/build</filename>.
  1122. </para>
  1123. </section>
  1124. <section id='ref-classes-image_types'>
  1125. <title><filename>image_types.bbclass</filename></title>
  1126. <para>
  1127. The <filename>image_types</filename> class defines all of
  1128. the standard image output types that you can enable through the
  1129. <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
  1130. variable.
  1131. You can use this class as a reference on how to add support for custom
  1132. image output types.
  1133. </para>
  1134. <para>
  1135. By default, this class is enabled through the
  1136. <link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link>
  1137. variable in
  1138. <link linkend='ref-classes-image'><filename>image.bbclass</filename></link>.
  1139. If you define your own image types using a custom BitBake class and
  1140. then use <filename>IMAGE_CLASSES</filename> to enable it, the custom
  1141. class must either inherit <filename>image_types</filename> or
  1142. <filename>image_types</filename> must also appear in
  1143. <filename>IMAGE_CLASSES</filename>.
  1144. </para>
  1145. </section>
  1146. <section id='ref-classes-image_types_uboot'>
  1147. <title><filename>image_types_uboot.bbclass</filename></title>
  1148. <para>
  1149. The <filename>image_types_uboot</filename> class
  1150. defines additional image types specifically for the U-Boot bootloader.
  1151. </para>
  1152. </section>
  1153. <section id='ref-classes-image-live'>
  1154. <title><filename>image-live.bbclass</filename></title>
  1155. <para>
  1156. This class controls building "live" (i.e. HDDIMG and ISO) images.
  1157. Live images contain syslinux for legacy booting, as well as the
  1158. bootloader specified by
  1159. <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
  1160. if
  1161. <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
  1162. contains "efi".
  1163. </para>
  1164. <para>
  1165. Normally, you do not use this class directly.
  1166. Instead, you add "live" to
  1167. <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
  1168. You can selectively build just one of these types through the
  1169. <link linkend='var-NOISO'><filename>NOISO</filename></link>
  1170. and
  1171. <link linkend='var-NOHDD'><filename>NOHDD</filename></link> variables.
  1172. For example, if you were building an ISO image, you would add "live"
  1173. to <filename>IMAGE_FSTYPES</filename>, set the
  1174. <filename>NOISO</filename> variable to "0" and the build system would
  1175. use the <filename>image-live</filename> class to build the ISO image.
  1176. </para>
  1177. </section>
  1178. <section id='ref-classes-image-mklibs'>
  1179. <title><filename>image-mklibs.bbclass</filename></title>
  1180. <para>
  1181. The <filename>image-mklibs</filename> class
  1182. enables the use of the <filename>mklibs</filename> utility during the
  1183. <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
  1184. task, which optimizes the size of
  1185. libraries contained in the image.
  1186. </para>
  1187. <para>
  1188. By default, the class is enabled in the
  1189. <filename>local.conf.template</filename> using the
  1190. <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
  1191. variable as follows:
  1192. <literallayout class='monospaced'>
  1193. USER_CLASSES ?= "buildstats image-mklibs image-prelink"
  1194. </literallayout>
  1195. </para>
  1196. </section>
  1197. <section id='ref-classes-image-prelink'>
  1198. <title><filename>image-prelink.bbclass</filename></title>
  1199. <para>
  1200. The <filename>image-prelink</filename> class
  1201. enables the use of the <filename>prelink</filename> utility during
  1202. the
  1203. <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
  1204. task, which optimizes the dynamic
  1205. linking of shared libraries to reduce executable startup time.
  1206. </para>
  1207. <para>
  1208. By default, the class is enabled in the
  1209. <filename>local.conf.template</filename> using the
  1210. <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
  1211. variable as follows:
  1212. <literallayout class='monospaced'>
  1213. USER_CLASSES ?= "buildstats image-mklibs image-prelink"
  1214. </literallayout>
  1215. </para>
  1216. </section>
  1217. <section id='ref-classes-image-vm'>
  1218. <title><filename>image-vm.bbclass</filename></title>
  1219. <para>
  1220. The <filename>image-vm</filename> class supports building VM
  1221. images.
  1222. </para>
  1223. </section>
  1224. <section id='ref-classes-image-vmdk'>
  1225. <title><filename>image-vmdk.bbclass</filename></title>
  1226. <para>
  1227. The <filename>image-vmdk</filename> class supports building VMware
  1228. VMDK images.
  1229. Normally, you do not use this class directly.
  1230. Instead, you add "vmdk" to
  1231. <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
  1232. </para>
  1233. </section>
  1234. <section id='ref-classes-insane'>
  1235. <title><filename>insane.bbclass</filename></title>
  1236. <para>
  1237. The <filename>insane</filename> class adds a step to the package
  1238. generation process so that output quality assurance checks are
  1239. generated by the OpenEmbedded build system.
  1240. A range of checks are performed that check the build's output
  1241. for common problems that show up during runtime.
  1242. Distribution policy usually dictates whether to include this class.
  1243. </para>
  1244. <para>
  1245. You can configure the sanity checks so that specific test failures
  1246. either raise a warning or an error message.
  1247. Typically, failures for new tests generate a warning.
  1248. Subsequent failures for the same test would then generate an error
  1249. message once the metadata is in a known and good condition.
  1250. See the
  1251. "<link linkend='ref-qa-checks'>QA Error and Warning Messages</link>"
  1252. Chapter for a list of all the warning and error messages
  1253. you might encounter using a default configuration.
  1254. </para>
  1255. <para>
  1256. Use the
  1257. <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link> and
  1258. <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
  1259. variables to control the behavior of
  1260. these checks at the global level (i.e. in your custom distro
  1261. configuration).
  1262. However, to skip one or more checks in recipes, you should use
  1263. <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>.
  1264. For example, to skip the check for symbolic link
  1265. <filename>.so</filename> files in the main package of a recipe,
  1266. add the following to the recipe.
  1267. You need to realize that the package name override, in this example
  1268. <filename>${PN}</filename>, must be used:
  1269. <literallayout class='monospaced'>
  1270. INSANE_SKIP_${PN} += "dev-so"
  1271. </literallayout>
  1272. Please keep in mind that the QA checks exist in order to detect real
  1273. or potential problems in the packaged output.
  1274. So exercise caution when disabling these checks.
  1275. </para>
  1276. <para>
  1277. The following list shows the tests you can list with the
  1278. <filename>WARN_QA</filename> and <filename>ERROR_QA</filename>
  1279. variables:
  1280. <itemizedlist>
  1281. <listitem><para><emphasis><filename>already-stripped:</filename></emphasis>
  1282. Checks that produced binaries have not already been
  1283. stripped prior to the build system extracting debug symbols.
  1284. It is common for upstream software projects to default to
  1285. stripping debug symbols for output binaries.
  1286. In order for debugging to work on the target using
  1287. <filename>-dbg</filename> packages, this stripping must be
  1288. disabled.
  1289. </para></listitem>
  1290. <listitem><para><emphasis><filename>arch:</filename></emphasis>
  1291. Checks the Executable and Linkable Format (ELF) type, bit size,
  1292. and endianness of any binaries to ensure they match the target
  1293. architecture.
  1294. This test fails if any binaries do not match the type since
  1295. there would be an incompatibility.
  1296. The test could indicate that the
  1297. wrong compiler or compiler options have been used.
  1298. Sometimes software, like bootloaders, might need to bypass
  1299. this check.
  1300. </para></listitem>
  1301. <listitem><para><emphasis><filename>buildpaths:</filename></emphasis>
  1302. Checks for paths to locations on the build host inside the
  1303. output files.
  1304. Currently, this test triggers too many false positives and
  1305. thus is not normally enabled.
  1306. </para></listitem>
  1307. <listitem><para><emphasis><filename>build-deps:</filename></emphasis>
  1308. Determines if a build-time dependency that is specified through
  1309. <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>,
  1310. explicit
  1311. <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
  1312. or task-level dependencies exists to match any runtime
  1313. dependency.
  1314. This determination is particularly useful to discover where
  1315. runtime dependencies are detected and added during packaging.
  1316. If no explicit dependency has been specified within the
  1317. metadata, at the packaging stage it is too late to ensure that
  1318. the dependency is built, and thus you can end up with an
  1319. error when the package is installed into the image during the
  1320. <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
  1321. task because the auto-detected dependency was not satisfied.
  1322. An example of this would be where the
  1323. <link linkend='ref-classes-update-rc.d'><filename>update-rc.d</filename></link>
  1324. class automatically adds a dependency on the
  1325. <filename>initscripts-functions</filename> package to packages
  1326. that install an initscript that refers to
  1327. <filename>/etc/init.d/functions</filename>.
  1328. The recipe should really have an explicit
  1329. <filename>RDEPENDS</filename> for the package in question on
  1330. <filename>initscripts-functions</filename> so that the
  1331. OpenEmbedded build system is able to ensure that the
  1332. <filename>initscripts</filename> recipe is actually built and
  1333. thus the <filename>initscripts-functions</filename> package is
  1334. made available.
  1335. </para></listitem>
  1336. <listitem><para><emphasis><filename>compile-host-path:</filename></emphasis>
  1337. Checks the
  1338. <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
  1339. log for indications
  1340. that paths to locations on the build host were used.
  1341. Using such paths might result in host contamination of the
  1342. build output.
  1343. </para></listitem>
  1344. <listitem><para><emphasis><filename>debug-deps:</filename></emphasis>
  1345. Checks that all packages except <filename>-dbg</filename>
  1346. packages do not depend on <filename>-dbg</filename>
  1347. packages, which would cause a packaging bug.
  1348. </para></listitem>
  1349. <listitem><para><emphasis><filename>debug-files:</filename></emphasis>
  1350. Checks for <filename>.debug</filename> directories in anything but the
  1351. <filename>-dbg</filename> package.
  1352. The debug files should all be in the <filename>-dbg</filename> package.
  1353. Thus, anything packaged elsewhere is incorrect packaging.</para></listitem>
  1354. <listitem><para><emphasis><filename>dep-cmp:</filename></emphasis>
  1355. Checks for invalid version comparison statements in runtime
  1356. dependency relationships between packages (i.e. in
  1357. <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
  1358. <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
  1359. <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
  1360. <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
  1361. <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
  1362. and
  1363. <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>
  1364. variable values).
  1365. Any invalid comparisons might trigger failures or undesirable
  1366. behavior when passed to the package manager.
  1367. </para></listitem>
  1368. <listitem><para><emphasis><filename>desktop:</filename></emphasis>
  1369. Runs the <filename>desktop-file-validate</filename> program
  1370. against any <filename>.desktop</filename> files to validate
  1371. their contents against the specification for
  1372. <filename>.desktop</filename> files.</para></listitem>
  1373. <listitem><para><emphasis><filename>dev-deps:</filename></emphasis>
  1374. Checks that all packages except <filename>-dev</filename>
  1375. or <filename>-staticdev</filename> packages do not depend on
  1376. <filename>-dev</filename> packages, which would be a
  1377. packaging bug.</para></listitem>
  1378. <listitem><para><emphasis><filename>dev-so:</filename></emphasis>
  1379. Checks that the <filename>.so</filename> symbolic links are in the
  1380. <filename>-dev</filename> package and not in any of the other packages.
  1381. In general, these symlinks are only useful for development purposes.
  1382. Thus, the <filename>-dev</filename> package is the correct location for
  1383. them.
  1384. Some very rare cases do exist for dynamically loaded modules where
  1385. these symlinks are needed instead in the main package.
  1386. </para></listitem>
  1387. <listitem><para><emphasis><filename>file-rdeps:</filename></emphasis>
  1388. Checks that file-level dependencies identified by the
  1389. OpenEmbedded build system at packaging time are satisfied.
  1390. For example, a shell script might start with the line
  1391. <filename>#!/bin/bash</filename>.
  1392. This line would translate to a file dependency on
  1393. <filename>/bin/bash</filename>.
  1394. Of the three package managers that the OpenEmbedded build
  1395. system supports, only RPM directly handles file-level
  1396. dependencies, resolving them automatically to packages
  1397. providing the files.
  1398. However, the lack of that functionality in the other two
  1399. package managers does not mean the dependencies do not still
  1400. need resolving.
  1401. This QA check attempts to ensure that explicitly declared
  1402. <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
  1403. exist to handle any file-level dependency detected in
  1404. packaged files.
  1405. </para></listitem>
  1406. <listitem><para><emphasis><filename>files-invalid:</filename></emphasis>
  1407. Checks for
  1408. <link linkend='var-FILES'><filename>FILES</filename></link>
  1409. variable values that contain "//", which is invalid.
  1410. </para></listitem>
  1411. <listitem><para><emphasis><filename>host-user-contaminated:</filename></emphasis>
  1412. Checks that no package produced by the recipe contains any
  1413. files outside of <filename>/home</filename> with a user or
  1414. group ID that matches the user running BitBake.
  1415. A match usually indicates that the files are being installed
  1416. with an incorrect UID/GID, since target IDs are independent
  1417. from host IDs.
  1418. For additional information, see the section describing the
  1419. <link linkend='ref-tasks-install'><filename>do_install</filename></link>
  1420. task.
  1421. </para></listitem>
  1422. <listitem><para><emphasis><filename>incompatible-license:</filename></emphasis>
  1423. Report when packages are excluded from being created due to
  1424. being marked with a license that is in
  1425. <link linkend='var-INCOMPATIBLE_LICENSE'><filename>INCOMPATIBLE_LICENSE</filename></link>.
  1426. </para></listitem>
  1427. <listitem><para><emphasis><filename>install-host-path:</filename></emphasis>
  1428. Checks the
  1429. <link linkend='ref-tasks-install'><filename>do_install</filename></link>
  1430. log for indications
  1431. that paths to locations on the build host were used.
  1432. Using such paths might result in host contamination of the
  1433. build output.
  1434. </para></listitem>
  1435. <listitem><para><emphasis><filename>installed-vs-shipped:</filename></emphasis>
  1436. Reports when files have been installed within
  1437. <filename>do_install</filename> but have not been included in
  1438. any package by way of the
  1439. <link linkend='var-FILES'><filename>FILES</filename></link>
  1440. variable.
  1441. Files that do not appear in any package cannot be present in
  1442. an image later on in the build process.
  1443. Ideally, all installed files should be packaged or not
  1444. installed at all.
  1445. These files can be deleted at the end of
  1446. <filename>do_install</filename> if the files are not
  1447. needed in any package.
  1448. </para></listitem>
  1449. <listitem><para><emphasis><filename>invalid-chars:</filename></emphasis>
  1450. Checks that the recipe metadata variables
  1451. <link linkend='var-DESCRIPTION'><filename>DESCRIPTION</filename></link>,
  1452. <link linkend='var-SUMMARY'><filename>SUMMARY</filename></link>,
  1453. <link linkend='var-LICENSE'><filename>LICENSE</filename></link>,
  1454. and
  1455. <link linkend='var-SECTION'><filename>SECTION</filename></link>
  1456. do not contain non-UTF-8 characters.
  1457. Some package managers do not support such characters.
  1458. </para></listitem>
  1459. <listitem><para><emphasis><filename>invalid-packageconfig:</filename></emphasis>
  1460. Checks that no undefined features are being added to
  1461. <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>.
  1462. For example, any name "foo" for which the following form
  1463. does not exist:
  1464. <literallayout class='monospaced'>
  1465. PACKAGECONFIG[foo] = "..."
  1466. </literallayout>
  1467. </para></listitem>
  1468. <listitem><para><emphasis><filename>la:</filename></emphasis>
  1469. Checks <filename>.la</filename> files for any <filename>TMPDIR</filename>
  1470. paths.
  1471. Any <filename>.la</filename> file containing these paths is incorrect since
  1472. <filename>libtool</filename> adds the correct sysroot prefix when using the
  1473. files automatically itself.</para></listitem>
  1474. <listitem><para><emphasis><filename>ldflags:</filename></emphasis>
  1475. Ensures that the binaries were linked with the
  1476. <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
  1477. options provided by the build system.
  1478. If this test fails, check that the <filename>LDFLAGS</filename> variable
  1479. is being passed to the linker command.</para></listitem>
  1480. <listitem><para><emphasis><filename>libdir:</filename></emphasis>
  1481. Checks for libraries being installed into incorrect
  1482. (possibly hardcoded) installation paths.
  1483. For example, this test will catch recipes that install
  1484. <filename>/lib/bar.so</filename> when
  1485. <filename>${base_libdir}</filename> is "lib32".
  1486. Another example is when recipes install
  1487. <filename>/usr/lib64/foo.so</filename> when
  1488. <filename>${libdir}</filename> is "/usr/lib".
  1489. </para></listitem>
  1490. <listitem><para><emphasis><filename>libexec:</filename></emphasis>
  1491. Checks if a package contains files in
  1492. <filename>/usr/libexec</filename>.
  1493. This check is not performed if the
  1494. <filename>libexecdir</filename> variable has been set
  1495. explicitly to <filename>/usr/libexec</filename>.
  1496. </para></listitem>
  1497. <listitem><para><emphasis><filename>packages-list:</filename></emphasis>
  1498. Checks for the same package being listed multiple times through
  1499. the <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
  1500. variable value.
  1501. Installing the package in this manner can cause errors during
  1502. packaging.
  1503. </para></listitem>
  1504. <listitem><para><emphasis><filename>perm-config:</filename></emphasis>
  1505. Reports lines in <filename>fs-perms.txt</filename> that have
  1506. an invalid format.
  1507. </para></listitem>
  1508. <listitem><para><emphasis><filename>perm-line:</filename></emphasis>
  1509. Reports lines in <filename>fs-perms.txt</filename> that have
  1510. an invalid format.
  1511. </para></listitem>
  1512. <listitem><para><emphasis><filename>perm-link:</filename></emphasis>
  1513. Reports lines in <filename>fs-perms.txt</filename> that
  1514. specify 'link' where the specified target already exists.
  1515. </para></listitem>
  1516. <listitem><para><emphasis><filename>perms:</filename></emphasis>
  1517. Currently, this check is unused but reserved.
  1518. </para></listitem>
  1519. <listitem><para><emphasis><filename>pkgconfig:</filename></emphasis>
  1520. Checks <filename>.pc</filename> files for any
  1521. <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>/<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
  1522. paths.
  1523. Any <filename>.pc</filename> file containing these paths is incorrect
  1524. since <filename>pkg-config</filename> itself adds the correct sysroot prefix
  1525. when the files are accessed.</para></listitem>
  1526. <listitem><para><emphasis><filename>pkgname:</filename></emphasis>
  1527. Checks that all packages in
  1528. <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
  1529. have names that do not contain invalid characters (i.e.
  1530. characters other than 0-9, a-z, ., +, and -).
  1531. </para></listitem>
  1532. <listitem><para><emphasis><filename>pkgv-undefined:</filename></emphasis>
  1533. Checks to see if the <filename>PKGV</filename> variable
  1534. is undefined during
  1535. <link linkend='ref-tasks-package'><filename>do_package</filename></link>.
  1536. </para></listitem>
  1537. <listitem><para><emphasis><filename>pkgvarcheck:</filename></emphasis>
  1538. Checks through the variables
  1539. <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
  1540. <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
  1541. <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
  1542. <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
  1543. <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
  1544. <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
  1545. <link linkend='var-FILES'><filename>FILES</filename></link>,
  1546. <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>,
  1547. <filename>pkg_preinst</filename>,
  1548. <filename>pkg_postinst</filename>,
  1549. <filename>pkg_prerm</filename>
  1550. and <filename>pkg_postrm</filename>, and reports if there are
  1551. variable sets that are not package-specific.
  1552. Using these variables without a package suffix is bad practice,
  1553. and might unnecessarily complicate dependencies of other packages
  1554. within the same recipe or have other unintended consequences.
  1555. </para></listitem>
  1556. <listitem><para><emphasis><filename>pn-overrides:</filename></emphasis>
  1557. Checks that a recipe does not have a name
  1558. (<link linkend='var-PN'><filename>PN</filename></link>) value
  1559. that appears in
  1560. <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
  1561. If a recipe is named such that its <filename>PN</filename>
  1562. value matches something already in
  1563. <filename>OVERRIDES</filename> (e.g. <filename>PN</filename>
  1564. happens to be the same as
  1565. <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
  1566. or
  1567. <link linkend='var-DISTRO'><filename>DISTRO</filename></link>),
  1568. it can have unexpected consequences.
  1569. For example, assignments such as
  1570. <filename>FILES_${PN} = "xyz"</filename> effectively turn into
  1571. <filename>FILES = "xyz"</filename>.
  1572. </para></listitem>
  1573. <listitem><para><emphasis><filename>rpaths:</filename></emphasis>
  1574. Checks for rpaths in the binaries that contain build system paths such
  1575. as <filename>TMPDIR</filename>.
  1576. If this test fails, bad <filename>-rpath</filename> options are being
  1577. passed to the linker commands and your binaries have potential security
  1578. issues.</para></listitem>
  1579. <listitem><para><emphasis><filename>split-strip:</filename></emphasis>
  1580. Reports that splitting or stripping debug symbols from binaries
  1581. has failed.
  1582. </para></listitem>
  1583. <listitem><para><emphasis><filename>staticdev:</filename></emphasis>
  1584. Checks for static library files (<filename>*.a</filename>) in
  1585. non-<filename>staticdev</filename> packages.
  1586. </para></listitem>
  1587. <listitem><para><emphasis><filename>symlink-to-sysroot:</filename></emphasis>
  1588. Checks for symlinks in packages that point into
  1589. <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
  1590. on the host.
  1591. Such symlinks will work on the host, but are clearly invalid
  1592. when running on the target.
  1593. </para></listitem>
  1594. <listitem><para><emphasis><filename>textrel:</filename></emphasis>
  1595. Checks for ELF binaries that contain relocations in their
  1596. <filename>.text</filename> sections, which can result in a
  1597. performance impact at runtime.
  1598. See the explanation for the
  1599. <link linkend='qa-issue-textrel'><filename>ELF binary</filename></link>
  1600. message for more information regarding runtime performance issues.
  1601. </para></listitem>
  1602. <!--
  1603. This check was removed for YP 2.3 release
  1604. <listitem><para><emphasis><filename>unsafe-references-in-binaries:</filename></emphasis>
  1605. Reports when a binary installed in
  1606. <filename>${base_libdir}</filename>,
  1607. <filename>${base_bindir}</filename>, or
  1608. <filename>${base_sbindir}</filename>, depends on another
  1609. binary installed under <filename>${exec_prefix}</filename>.
  1610. This dependency is a concern if you want the system to remain
  1611. basically operable if <filename>/usr</filename> is mounted
  1612. separately and is not mounted.
  1613. <note>
  1614. Defaults for binaries installed in
  1615. <filename>${base_libdir}</filename>,
  1616. <filename>${base_bindir}</filename>, and
  1617. <filename>${base_sbindir}</filename> are
  1618. <filename>/lib</filename>, <filename>/bin</filename>, and
  1619. <filename>/sbin</filename>, respectively.
  1620. The default for a binary installed
  1621. under <filename>${exec_prefix}</filename> is
  1622. <filename>/usr</filename>.
  1623. </note>
  1624. </para></listitem>
  1625. -->
  1626. <listitem><para><emphasis><filename>unsafe-references-in-scripts:</filename></emphasis>
  1627. Reports when a script file installed in
  1628. <filename>${base_libdir}</filename>,
  1629. <filename>${base_bindir}</filename>, or
  1630. <filename>${base_sbindir}</filename>, depends on files
  1631. installed under <filename>${exec_prefix}</filename>.
  1632. This dependency is a concern if you want the system to remain
  1633. basically operable if <filename>/usr</filename> is mounted
  1634. separately and is not mounted.
  1635. <note>
  1636. Defaults for binaries installed in
  1637. <filename>${base_libdir}</filename>,
  1638. <filename>${base_bindir}</filename>, and
  1639. <filename>${base_sbindir}</filename> are
  1640. <filename>/lib</filename>, <filename>/bin</filename>, and
  1641. <filename>/sbin</filename>, respectively.
  1642. The default for a binary installed
  1643. under <filename>${exec_prefix}</filename> is
  1644. <filename>/usr</filename>.
  1645. </note>
  1646. </para></listitem>
  1647. <listitem><para><emphasis><filename>useless-rpaths:</filename></emphasis>
  1648. Checks for dynamic library load paths (rpaths) in the binaries that
  1649. by default on a standard system are searched by the linker (e.g.
  1650. <filename>/lib</filename> and <filename>/usr/lib</filename>).
  1651. While these paths will not cause any breakage, they do waste space and
  1652. are unnecessary.</para></listitem>
  1653. <listitem><para><emphasis><filename>var-undefined:</filename></emphasis>
  1654. Reports when variables fundamental to packaging (i.e.
  1655. <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
  1656. <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>,
  1657. <link linkend='var-D'><filename>D</filename></link>,
  1658. <link linkend='var-PN'><filename>PN</filename></link>, and
  1659. <link linkend='var-PKGD'><filename>PKGD</filename></link>) are
  1660. undefined during
  1661. <link linkend='ref-tasks-package'><filename>do_package</filename></link>.
  1662. </para></listitem>
  1663. <listitem><para><emphasis><filename>version-going-backwards:</filename></emphasis>
  1664. If Build History is enabled, reports when a package
  1665. being written out has a lower version than the previously
  1666. written package under the same name.
  1667. If you are placing output packages into a feed and
  1668. upgrading packages on a target system using that feed, the
  1669. version of a package going backwards can result in the target
  1670. system not correctly upgrading to the "new" version of the
  1671. package.
  1672. <note>
  1673. If you are not using runtime package management on your
  1674. target system, then you do not need to worry about
  1675. this situation.
  1676. </note>
  1677. </para></listitem>
  1678. <listitem><para><emphasis><filename>xorg-driver-abi:</filename></emphasis>
  1679. Checks that all packages containing Xorg drivers have ABI
  1680. dependencies.
  1681. The <filename>xserver-xorg</filename> recipe provides driver
  1682. ABI names.
  1683. All drivers should depend on the ABI versions that they have
  1684. been built against.
  1685. Driver recipes that include
  1686. <filename>xorg-driver-input.inc</filename>
  1687. or <filename>xorg-driver-video.inc</filename> will
  1688. automatically get these versions.
  1689. Consequently, you should only need to explicitly add
  1690. dependencies to binary driver recipes.
  1691. </para></listitem>
  1692. </itemizedlist>
  1693. </para>
  1694. </section>
  1695. <section id='ref-classes-insserv'>
  1696. <title><filename>insserv.bbclass</filename></title>
  1697. <para>
  1698. The <filename>insserv</filename> class
  1699. uses the <filename>insserv</filename> utility to update the order of
  1700. symbolic links in <filename>/etc/rc?.d/</filename> within an image
  1701. based on dependencies specified by LSB headers in the
  1702. <filename>init.d</filename> scripts themselves.
  1703. </para>
  1704. </section>
  1705. <section id='ref-classes-kernel'>
  1706. <title><filename>kernel.bbclass</filename></title>
  1707. <para>
  1708. The <filename>kernel</filename> class handles building Linux kernels.
  1709. The class contains code to build all kernel trees.
  1710. All needed headers are staged into the
  1711. <filename><link linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></filename>
  1712. directory to allow out-of-tree module builds using
  1713. the
  1714. <link linkend='ref-classes-module'><filename>module</filename></link>
  1715. class.
  1716. </para>
  1717. <para>
  1718. This means that each built kernel module is packaged separately and
  1719. inter-module dependencies are created by parsing the
  1720. <filename>modinfo</filename> output.
  1721. If all modules are required, then installing the
  1722. <filename>kernel-modules</filename> package installs all packages with
  1723. modules and various other kernel packages such as
  1724. <filename>kernel-vmlinux</filename>.
  1725. </para>
  1726. <para>
  1727. The <filename>kernel</filename> class contains logic that allows
  1728. you to embed an initial RAM filesystem (initramfs) image when
  1729. you build the kernel image.
  1730. For information on how to build an initramfs, see the
  1731. "<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
  1732. section in the Yocto Project Development Manual.
  1733. </para>
  1734. <para>
  1735. Various other classes are used by the <filename>kernel</filename>
  1736. and <filename>module</filename> classes internally including the
  1737. <link linkend='ref-classes-kernel-arch'><filename>kernel-arch</filename></link>,
  1738. <link linkend='ref-classes-module-base'><filename>module-base</filename></link>,
  1739. and
  1740. <link linkend='ref-classes-linux-kernel-base'><filename>linux-kernel-base</filename></link>
  1741. classes.
  1742. </para>
  1743. </section>
  1744. <section id='ref-classes-kernel-arch'>
  1745. <title><filename>kernel-arch.bbclass</filename></title>
  1746. <para>
  1747. The <filename>kernel-arch</filename> class
  1748. sets the <filename>ARCH</filename> environment variable for Linux
  1749. kernel compilation (including modules).
  1750. </para>
  1751. </section>
  1752. <section id='ref-classes-kernel-fitimage'>
  1753. <title><filename>kernel-fitimage.bbclass</filename></title>
  1754. <para>
  1755. The <filename>kernel-fitimage</filename> class provides support to
  1756. pack zImages.
  1757. </para>
  1758. </section>
  1759. <section id='ref-classes-kernel-grub'>
  1760. <title><filename>kernel-grub.bbclass</filename></title>
  1761. <para>
  1762. The <filename>kernel-grub</filename> class updates the boot area and
  1763. the boot menu with the kernel as the priority boot mechanism while
  1764. installing a RPM to update the kernel on a deployed target.
  1765. </para>
  1766. </section>
  1767. <section id='ref-classes-kernel-module-split'>
  1768. <title><filename>kernel-module-split.bbclass</filename></title>
  1769. <para>
  1770. The <filename>kernel-module-split</filename> class
  1771. provides common functionality for splitting Linux kernel modules into
  1772. separate packages.
  1773. </para>
  1774. </section>
  1775. <section id='ref-classes-kernel-uboot'>
  1776. <title><filename>kernel-uboot.bbclass</filename></title>
  1777. <para>
  1778. The <filename>kernel-uboot</filename> class provides support for
  1779. building from vmlinux-style kernel sources.
  1780. </para>
  1781. </section>
  1782. <section id='ref-classes-kernel-uimage'>
  1783. <title><filename>kernel-uimage.bbclass</filename></title>
  1784. <para>
  1785. The <filename>kernel-uimage</filename> class provides support to
  1786. pack uImage.
  1787. </para>
  1788. </section>
  1789. <section id='ref-classes-kernel-yocto'>
  1790. <title><filename>kernel-yocto.bbclass</filename></title>
  1791. <para>
  1792. The <filename>kernel-yocto</filename> class
  1793. provides common functionality for building from linux-yocto style
  1794. kernel source repositories.
  1795. </para>
  1796. </section>
  1797. <section id='ref-classes-kernelsrc'>
  1798. <title><filename>kernelsrc.bbclass</filename></title>
  1799. <para>
  1800. The <filename>kernelsrc</filename> class sets the Linux kernel
  1801. source and version.
  1802. </para>
  1803. </section>
  1804. <section id='ref-classes-lib_package'>
  1805. <title><filename>lib_package.bbclass</filename></title>
  1806. <para>
  1807. The <filename>lib_package</filename> class
  1808. supports recipes that build libraries and produce executable
  1809. binaries, where those binaries should not be installed by default
  1810. along with the library.
  1811. Instead, the binaries are added to a separate
  1812. <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-bin</filename>
  1813. package to make their installation optional.
  1814. </para>
  1815. </section>
  1816. <section id='ref-classes-libc*'>
  1817. <title><filename>libc*.bbclass</filename></title>
  1818. <para>
  1819. The <filename>libc*</filename> classes support recipes that build
  1820. packages with <filename>libc</filename>:
  1821. <itemizedlist>
  1822. <listitem><para>The <filename>libc-common</filename> class
  1823. provides common support for building with
  1824. <filename>libc</filename>.
  1825. </para></listitem>
  1826. <listitem><para>The <filename>libc-package</filename> class
  1827. supports packaging up <filename>glibc</filename> and
  1828. <filename>eglibc</filename>.
  1829. </para></listitem>
  1830. </itemizedlist>
  1831. </para>
  1832. </section>
  1833. <section id='ref-classes-license'>
  1834. <title><filename>license.bbclass</filename></title>
  1835. <para>
  1836. The <filename>license</filename> class provides license
  1837. manifest creation and license exclusion.
  1838. This class is enabled by default using the default value for the
  1839. <link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link>
  1840. variable.
  1841. </para>
  1842. </section>
  1843. <section id='ref-classes-linux-kernel-base'>
  1844. <title><filename>linux-kernel-base.bbclass</filename></title>
  1845. <para>
  1846. The <filename>linux-kernel-base</filename> class
  1847. provides common functionality for recipes that build out of the Linux
  1848. kernel source tree.
  1849. These builds goes beyond the kernel itself.
  1850. For example, the Perf recipe also inherits this class.
  1851. </para>
  1852. </section>
  1853. <section id='ref-classes-linuxloader'>
  1854. <title><filename>linuxloader.bbclass</filename></title>
  1855. <para>
  1856. Provides the function <filename>linuxloader()</filename>, which gives
  1857. the value of the dynamic loader/linker provided on the platform.
  1858. This value is used by a number of other classes.
  1859. </para>
  1860. </section>
  1861. <section id='ref-classes-logging'>
  1862. <title><filename>logging.bbclass</filename></title>
  1863. <para>
  1864. The <filename>logging</filename> class provides the standard
  1865. shell functions used to log messages for various BitBake severity levels
  1866. (i.e. <filename>bbplain</filename>, <filename>bbnote</filename>,
  1867. <filename>bbwarn</filename>, <filename>bberror</filename>,
  1868. <filename>bbfatal</filename>, and <filename>bbdebug</filename>).
  1869. </para>
  1870. <para>
  1871. This class is enabled by default since it is inherited by
  1872. the <filename>base</filename> class.
  1873. </para>
  1874. </section>
  1875. <section id='ref-classes-meta'>
  1876. <title><filename>meta.bbclass</filename></title>
  1877. <para>
  1878. The <filename>meta</filename> class is inherited by recipes
  1879. that do not build any output packages themselves, but act as a "meta"
  1880. target for building other recipes.
  1881. </para>
  1882. </section>
  1883. <section id='ref-classes-metadata_scm'>
  1884. <title><filename>metadata_scm.bbclass</filename></title>
  1885. <para>
  1886. The <filename>metadata_scm</filename> class provides functionality for
  1887. querying the branch and revision of a Source Code Manager (SCM)
  1888. repository.
  1889. </para>
  1890. <para>
  1891. The <link linkend='ref-classes-base'><filename>base</filename></link>
  1892. class uses this class to print the revisions of each layer before
  1893. starting every build.
  1894. The <filename>metadata_scm</filename> class is enabled by default
  1895. because it is inherited by the <filename>base</filename> class.
  1896. </para>
  1897. </section>
  1898. <section id='ref-classes-migrate_localcount'>
  1899. <title><filename>migrate_localcount.bbclass</filename></title>
  1900. <para>
  1901. The <filename>migrate_localcount</filename> class verifies a recipe's
  1902. localcount data and increments it appropriately.
  1903. </para>
  1904. </section>
  1905. <section id='ref-classes-mime'>
  1906. <title><filename>mime.bbclass</filename></title>
  1907. <para>
  1908. The <filename>mime</filename> class generates the proper
  1909. post-install and post-remove (postinst/postrm) scriptlets for packages
  1910. that install MIME type files.
  1911. These scriptlets call <filename>update-mime-database</filename> to add
  1912. the MIME types to the shared database.
  1913. </para>
  1914. </section>
  1915. <section id='ref-classes-mirrors'>
  1916. <title><filename>mirrors.bbclass</filename></title>
  1917. <para>
  1918. The <filename>mirrors</filename> class sets up some standard
  1919. <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link> entries
  1920. for source code mirrors.
  1921. These mirrors provide a fall-back path in case the upstream source
  1922. specified in
  1923. <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
  1924. within recipes is unavailable.
  1925. </para>
  1926. <para>
  1927. This class is enabled by default since it is inherited by the
  1928. <link linkend='ref-classes-base'><filename>base</filename></link> class.
  1929. </para>
  1930. </section>
  1931. <section id='ref-classes-module'>
  1932. <title><filename>module.bbclass</filename></title>
  1933. <para>
  1934. The <filename>module</filename> class provides support for building
  1935. out-of-tree Linux kernel modules.
  1936. The class inherits the
  1937. <link linkend='ref-classes-module-base'><filename>module-base</filename></link>
  1938. and
  1939. <link linkend='ref-classes-kernel-module-split'><filename>kernel-module-split</filename></link>
  1940. classes, and implements the
  1941. <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
  1942. and
  1943. <link linkend='ref-tasks-install'><filename>do_install</filename></link>
  1944. tasks.
  1945. The class provides everything needed to build and package a kernel
  1946. module.
  1947. </para>
  1948. <para>
  1949. For general information on out-of-tree Linux kernel modules, see the
  1950. "<ulink url='&YOCTO_DOCS_KERNEL_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
  1951. section in the Yocto Project Linux Kernel Development Manual.
  1952. </para>
  1953. </section>
  1954. <section id='ref-classes-module-base'>
  1955. <title><filename>module-base.bbclass</filename></title>
  1956. <para>
  1957. The <filename>module-base</filename> class provides the base
  1958. functionality for building Linux kernel modules.
  1959. Typically, a recipe that builds software that includes one or
  1960. more kernel modules and has its own means of building
  1961. the module inherits this class as opposed to inheriting the
  1962. <link linkend='ref-classes-module'><filename>module</filename></link>
  1963. class.
  1964. </para>
  1965. </section>
  1966. <section id='ref-classes-multilib*'>
  1967. <title><filename>multilib*.bbclass</filename></title>
  1968. <para>
  1969. The <filename>multilib*</filename> classes provide support
  1970. for building libraries with different target optimizations or target
  1971. architectures and installing them side-by-side in the same image.
  1972. </para>
  1973. <para>
  1974. For more information on using the Multilib feature, see the
  1975. "<ulink url='&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image'>Combining Multiple Versions of Library Files into One Image</ulink>"
  1976. section in the Yocto Project Development Manual.
  1977. </para>
  1978. </section>
  1979. <section id='ref-classes-native'>
  1980. <title><filename>native.bbclass</filename></title>
  1981. <para>
  1982. The <filename>native</filename> class provides common
  1983. functionality for recipes that wish to build tools to run on the build
  1984. host (i.e. tools that use the compiler or other tools from the
  1985. build host).
  1986. </para>
  1987. <para>
  1988. You can create a recipe that builds tools that run natively on the
  1989. host a couple different ways:
  1990. <itemizedlist>
  1991. <listitem><para>Create a <replaceable>myrecipe</replaceable><filename>-native.bb</filename>
  1992. that inherits the <filename>native</filename> class.
  1993. If you use this method, you must order the inherit statement
  1994. in the recipe after all other inherit statements so that the
  1995. <filename>native</filename> class is inherited last.
  1996. </para></listitem>
  1997. <listitem><para>Create or modify a target recipe that contains
  1998. the following:
  1999. <literallayout class='monospaced'>
  2000. <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "native"
  2001. </literallayout>
  2002. Inside the recipe, use <filename>_class-native</filename> and
  2003. <filename>_class-target</filename> overrides to specify any
  2004. functionality specific to the respective native or target
  2005. case.</para></listitem>
  2006. </itemizedlist>
  2007. <note><title>Warning</title>
  2008. When creating a recipe, you must follow this naming convention:
  2009. <literallayout class='monospaced'>
  2010. native-<replaceable>myrecipe</replaceable>.bb
  2011. </literallayout>
  2012. Not doing so can lead to subtle problems because code exists
  2013. that depends on the naming convention.
  2014. </note>
  2015. </para>
  2016. <para>
  2017. Although applied differently, the <filename>native</filename> class is
  2018. used with both methods.
  2019. The advantage of the second method is that you do not need to have two
  2020. separate recipes (assuming you need both) for native and target.
  2021. All common parts of the recipe are automatically shared.
  2022. </para>
  2023. </section>
  2024. <section id='ref-classes-nativesdk'>
  2025. <title><filename>nativesdk.bbclass</filename></title>
  2026. <para>
  2027. The <filename>nativesdk</filename> class provides common
  2028. functionality for recipes that wish to build tools to run as part of
  2029. an SDK (i.e. tools that run on
  2030. <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>).
  2031. </para>
  2032. <para>
  2033. You can create a recipe that builds tools that run on the SDK machine
  2034. a couple different ways:
  2035. <itemizedlist>
  2036. <listitem><para>Create a
  2037. <filename>nativesdk-</filename><replaceable>myrecipe</replaceable><filename>.bb</filename>
  2038. recipe that inherits the <filename>nativesdk</filename> class.
  2039. If you use this method, you must order the inherit statement
  2040. in the recipe after all other inherit statements so that the
  2041. <filename>nativesdk</filename> class is inherited last.
  2042. </para></listitem>
  2043. <listitem><para>Create a <filename>nativesdk</filename> variant
  2044. of any recipe by adding the following:
  2045. <literallayout class='monospaced'>
  2046. <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "nativesdk"
  2047. </literallayout>
  2048. Inside the recipe, use <filename>_class-nativesdk</filename> and
  2049. <filename>_class-target</filename> overrides to specify any
  2050. functionality specific to the respective SDK machine or target
  2051. case.</para></listitem>
  2052. </itemizedlist>
  2053. <note><title>Warning</title>
  2054. When creating a recipe, you must follow this naming convention:
  2055. <literallayout class='monospaced'>
  2056. nativesdk-<replaceable>myrecipe</replaceable>.bb
  2057. </literallayout>
  2058. Not doing so can lead to subtle problems because code exists
  2059. that depends on the naming convention.
  2060. </note>
  2061. </para>
  2062. <para>
  2063. Although applied differently, the <filename>nativesdk</filename> class
  2064. is used with both methods.
  2065. The advantage of the second method is that you do not need to have two
  2066. separate recipes (assuming you need both) for the SDK machine and the
  2067. target.
  2068. All common parts of the recipe are automatically shared.
  2069. </para>
  2070. </section>
  2071. <section id='ref-classes-nopackages'>
  2072. <title><filename>nopackages.bbclass</filename></title>
  2073. <para>
  2074. Disables packaging tasks for those recipes and classes where
  2075. packaging is not needed.
  2076. </para>
  2077. </section>
  2078. <section id='ref-classes-npm'>
  2079. <title><filename>npm.bbclass</filename></title>
  2080. <para>
  2081. Provides support for building Node.js software fetched using the npm
  2082. package manager.
  2083. <note>
  2084. Currently, recipes inheriting this class must use the
  2085. <filename>npm://</filename> fetcher to have dependencies fetched
  2086. and packaged automatically.
  2087. </note>
  2088. </para>
  2089. </section>
  2090. <section id='ref-classes-oelint'>
  2091. <title><filename>oelint.bbclass</filename></title>
  2092. <para>
  2093. The <filename>oelint</filename> class is an
  2094. obsolete lint checking tool that exists in
  2095. <filename>meta/classes</filename> in the
  2096. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
  2097. </para>
  2098. <para>
  2099. A number of classes exist that could be generally useful in
  2100. OE-Core but are never actually used within OE-Core itself.
  2101. The <filename>oelint</filename> class is one such example.
  2102. However, being aware of this class can reduce the proliferation of
  2103. different versions of similar classes across multiple layers.
  2104. </para>
  2105. </section>
  2106. <section id='ref-classes-own-mirrors'>
  2107. <title><filename>own-mirrors.bbclass</filename></title>
  2108. <para>
  2109. The <filename>own-mirrors</filename> class makes it
  2110. easier to set up your own
  2111. <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
  2112. from which to first fetch source before attempting to fetch it from the
  2113. upstream specified in
  2114. <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
  2115. within each recipe.
  2116. </para>
  2117. <para>
  2118. To use this class, inherit it globally and specify
  2119. <link linkend='var-SOURCE_MIRROR_URL'><filename>SOURCE_MIRROR_URL</filename></link>.
  2120. Here is an example:
  2121. <literallayout class='monospaced'>
  2122. INHERIT += "own-mirrors"
  2123. SOURCE_MIRROR_URL = "http://example.com/my-source-mirror"
  2124. </literallayout>
  2125. You can specify only a single URL in
  2126. <filename>SOURCE_MIRROR_URL</filename>.
  2127. </para>
  2128. </section>
  2129. <section id='ref-classes-package'>
  2130. <title><filename>package.bbclass</filename></title>
  2131. <para>
  2132. The <filename>package</filename> class supports generating
  2133. packages from a build's output.
  2134. The core generic functionality is in
  2135. <filename>package.bbclass</filename>.
  2136. The code specific to particular package types resides in these
  2137. package-specific classes:
  2138. <link linkend='ref-classes-package_deb'><filename>package_deb</filename></link>,
  2139. <link linkend='ref-classes-package_rpm'><filename>package_rpm</filename></link>,
  2140. <link linkend='ref-classes-package_ipk'><filename>package_ipk</filename></link>,
  2141. and
  2142. <link linkend='ref-classes-package_tar'><filename>package_tar</filename></link>.
  2143. <note><title>Warning</title>
  2144. The <filename>package_tar</filename> class is broken and not
  2145. supported.
  2146. It is recommended that you do not use this class.
  2147. </note>
  2148. </para>
  2149. <para>
  2150. You can control the list of resulting package formats by using the
  2151. <filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></filename>
  2152. variable defined in your <filename>conf/local.conf</filename>
  2153. configuration file, which is located in the
  2154. <link linkend='build-directory'>Build Directory</link>.
  2155. When defining the variable, you can specify one or more package types.
  2156. Since images are generated from packages, a packaging class is
  2157. needed to enable image generation.
  2158. The first class listed in this variable is used for image generation.
  2159. </para>
  2160. <para>
  2161. If you take the optional step to set up a repository (package feed)
  2162. on the development host that can be used by DNF, you can
  2163. install packages from the feed while you are running the image
  2164. on the target (i.e. runtime installation of packages).
  2165. For more information, see the
  2166. "<ulink url='&YOCTO_DOCS_DEV_URL;#using-runtime-package-management'>Using Runtime Package Management</ulink>"
  2167. section in the Yocto Project Development Manual.
  2168. </para>
  2169. <para>
  2170. The package-specific class you choose can affect build-time performance
  2171. and has space ramifications.
  2172. In general, building a package with IPK takes about thirty percent less
  2173. time as compared to using RPM to build the same or similar package.
  2174. This comparison takes into account a complete build of the package with
  2175. all dependencies previously built.
  2176. The reason for this discrepancy is because the RPM package manager
  2177. creates and processes more
  2178. <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink> than the
  2179. IPK package manager.
  2180. Consequently, you might consider setting
  2181. <filename>PACKAGE_CLASSES</filename> to "package_ipk" if you are
  2182. building smaller systems.
  2183. </para>
  2184. <para>
  2185. Before making your package manager decision, however, you should
  2186. consider some further things about using RPM:
  2187. <itemizedlist>
  2188. <listitem><para>
  2189. RPM starts to provide more abilities than IPK due to
  2190. the fact that it processes more Metadata.
  2191. For example, this information includes individual file types,
  2192. file checksum generation and evaluation on install, sparse file
  2193. support, conflict detection and resolution for Multilib systems,
  2194. ACID style upgrade, and repackaging abilities for rollbacks.
  2195. </para></listitem>
  2196. <listitem><para>
  2197. For smaller systems, the extra space used for the Berkeley
  2198. Database and the amount of metadata when using RPM can affect
  2199. your ability to perform on-device upgrades.
  2200. </para></listitem>
  2201. </itemizedlist>
  2202. </para>
  2203. <para>
  2204. You can find additional information on the effects of the package
  2205. class at these two Yocto Project mailing list links:
  2206. <itemizedlist>
  2207. <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html'>
  2208. https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html</ulink></para></listitem>
  2209. <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006363.html'>
  2210. https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html</ulink></para></listitem>
  2211. </itemizedlist>
  2212. </para>
  2213. </section>
  2214. <section id='ref-classes-package_deb'>
  2215. <title><filename>package_deb.bbclass</filename></title>
  2216. <para>
  2217. The <filename>package_deb</filename> class
  2218. provides support for creating packages that use the Debian
  2219. (i.e. <filename>.deb</filename>) file format.
  2220. The class ensures the packages are written out in a
  2221. <filename>.deb</filename> file format to the
  2222. <filename>${</filename><link linkend='var-DEPLOY_DIR_DEB'><filename>DEPLOY_DIR_DEB</filename></link><filename>}</filename>
  2223. directory.
  2224. </para>
  2225. <para>
  2226. This class inherits the
  2227. <link linkend='ref-classes-package'><filename>package</filename></link>
  2228. class and is enabled through the
  2229. <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
  2230. variable in the <filename>local.conf</filename> file.
  2231. </para>
  2232. </section>
  2233. <section id='ref-classes-package_ipk'>
  2234. <title><filename>package_ipk.bbclass</filename></title>
  2235. <para>
  2236. The <filename>package_ipk</filename> class
  2237. provides support for creating packages that use the IPK
  2238. (i.e. <filename>.ipk</filename>) file format.
  2239. The class ensures the packages are written out in a
  2240. <filename>.ipk</filename> file format to the
  2241. <filename>${</filename><link linkend='var-DEPLOY_DIR_IPK'><filename>DEPLOY_DIR_IPK</filename></link><filename>}</filename>
  2242. directory.
  2243. </para>
  2244. <para>
  2245. This class inherits the
  2246. <link linkend='ref-classes-package'><filename>package</filename></link>
  2247. class and is enabled through the
  2248. <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
  2249. variable in the <filename>local.conf</filename> file.
  2250. </para>
  2251. </section>
  2252. <section id='ref-classes-package_rpm'>
  2253. <title><filename>package_rpm.bbclass</filename></title>
  2254. <para>
  2255. The <filename>package_rpm</filename> class
  2256. provides support for creating packages that use the RPM
  2257. (i.e. <filename>.rpm</filename>) file format.
  2258. The class ensures the packages are written out in a
  2259. <filename>.rpm</filename> file format to the
  2260. <filename>${</filename><link linkend='var-DEPLOY_DIR_RPM'><filename>DEPLOY_DIR_RPM</filename></link><filename>}</filename>
  2261. directory.
  2262. </para>
  2263. <para>
  2264. This class inherits the
  2265. <link linkend='ref-classes-package'><filename>package</filename></link>
  2266. class and is enabled through the
  2267. <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
  2268. variable in the <filename>local.conf</filename> file.
  2269. </para>
  2270. </section>
  2271. <section id='ref-classes-package_tar'>
  2272. <title><filename>package_tar.bbclass</filename></title>
  2273. <para>
  2274. The <filename>package_tar</filename> class
  2275. provides support for creating tarballs.
  2276. The class ensures the packages are written out in a
  2277. tarball format to the
  2278. <filename>${</filename><link linkend='var-DEPLOY_DIR_TAR'><filename>DEPLOY_DIR_TAR</filename></link><filename>}</filename>
  2279. directory.
  2280. </para>
  2281. <para>
  2282. This class inherits the
  2283. <link linkend='ref-classes-package'><filename>package</filename></link>
  2284. class and is enabled through the
  2285. <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
  2286. variable in the <filename>local.conf</filename> file.
  2287. <note>
  2288. You cannot specify the <filename>package_tar</filename> class
  2289. first using the <filename>PACKAGE_CLASSES</filename> variable.
  2290. You must use <filename>.deb</filename>,
  2291. <filename>.ipk</filename>, or <filename>.rpm</filename> file
  2292. formats for your image or SDK.
  2293. </note>
  2294. </para>
  2295. </section>
  2296. <section id='ref-classes-packagedata'>
  2297. <title><filename>packagedata.bbclass</filename></title>
  2298. <para>
  2299. The <filename>packagedata</filename> class provides
  2300. common functionality for reading <filename>pkgdata</filename> files
  2301. found in
  2302. <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>.
  2303. These files contain information about each output package produced by
  2304. the OpenEmbedded build system.
  2305. </para>
  2306. <para>
  2307. This class is enabled by default because it is inherited by the
  2308. <link linkend='ref-classes-package'><filename>package</filename></link>
  2309. class.
  2310. </para>
  2311. </section>
  2312. <section id='ref-classes-packagegroup'>
  2313. <title><filename>packagegroup.bbclass</filename></title>
  2314. <para>
  2315. The <filename>packagegroup</filename> class sets default values
  2316. appropriate for package group recipes (e.g.
  2317. <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>,
  2318. <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>,
  2319. <filename><link linkend='var-ALLOW_EMPTY'>ALLOW_EMPTY</link></filename>,
  2320. and so forth).
  2321. It is highly recommended that all package group recipes inherit this class.
  2322. </para>
  2323. <para>
  2324. For information on how to use this class, see the
  2325. "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks'>Customizing Images Using Custom Package Groups</ulink>"
  2326. section in the Yocto Project Development Manual.
  2327. </para>
  2328. <para>
  2329. Previously, this class was called the <filename>task</filename> class.
  2330. </para>
  2331. </section>
  2332. <section id='ref-classes-patch'>
  2333. <title><filename>patch.bbclass</filename></title>
  2334. <para>
  2335. The <filename>patch</filename> class provides all functionality for
  2336. applying patches during the
  2337. <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
  2338. task.
  2339. </para>
  2340. <para>
  2341. This class is enabled by default because it is inherited by the
  2342. <link linkend='ref-classes-base'><filename>base</filename></link>
  2343. class.
  2344. </para>
  2345. </section>
  2346. <section id='ref-classes-perlnative'>
  2347. <title><filename>perlnative.bbclass</filename></title>
  2348. <para>
  2349. When inherited by a recipe, the <filename>perlnative</filename> class
  2350. supports using the native version of Perl built by the build system
  2351. rather than using the version provided by the build host.
  2352. </para>
  2353. </section>
  2354. <section id='ref-classes-pixbufcache'>
  2355. <title><filename>pixbufcache.bbclass</filename></title>
  2356. <para>
  2357. The <filename>pixbufcache</filename> class generates the proper
  2358. post-install and post-remove (postinst/postrm) scriptlets for packages
  2359. that install pixbuf loaders, which are used with
  2360. <filename>gdk-pixbuf</filename>.
  2361. These scriptlets call <filename>update_pixbuf_cache</filename>
  2362. to add the pixbuf loaders to the cache.
  2363. Since the cache files are architecture-specific,
  2364. <filename>update_pixbuf_cache</filename> is run using QEMU if the
  2365. postinst scriptlets need to be run on the build host during image
  2366. creation.
  2367. </para>
  2368. <para>
  2369. If the pixbuf loaders being installed are in packages other
  2370. than the recipe's main package, set
  2371. <link linkend='var-PIXBUF_PACKAGES'><filename>PIXBUF_PACKAGES</filename></link>
  2372. to specify the packages containing the loaders.
  2373. </para>
  2374. </section>
  2375. <section id='ref-classes-pkgconfig'>
  2376. <title><filename>pkgconfig.bbclass</filename></title>
  2377. <para>
  2378. The <filename>pkgconfig</filename> class provides a standard way to get
  2379. header and library information by using <filename>pkg-config</filename>.
  2380. This class aims to smooth integration of
  2381. <filename>pkg-config</filename> into libraries that use it.
  2382. </para>
  2383. <para>
  2384. During staging, BitBake installs <filename>pkg-config</filename>
  2385. data into the <filename>sysroots/</filename> directory.
  2386. By making use of sysroot functionality within
  2387. <filename>pkg-config</filename>, the <filename>pkgconfig</filename>
  2388. class no longer has to manipulate the files.
  2389. </para>
  2390. </section>
  2391. <section id='ref-classes-populate-sdk'>
  2392. <title><filename>populate_sdk.bbclass</filename></title>
  2393. <para>
  2394. The <filename>populate_sdk</filename> class provides support for
  2395. SDK-only recipes.
  2396. For information on advantages gained when building a cross-development
  2397. toolchain using the
  2398. <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
  2399. task, see the
  2400. "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
  2401. section in the Yocto Project Software Development Kit (SDK) Developer's Guide.
  2402. </para>
  2403. </section>
  2404. <section id='ref-classes-populate-sdk-*'>
  2405. <title><filename>populate_sdk_*.bbclass</filename></title>
  2406. <para>
  2407. The <filename>populate_sdk_*</filename> classes support SDK creation
  2408. and consist of the following classes:
  2409. <itemizedlist>
  2410. <listitem><para><emphasis><filename>populate_sdk_base</filename>:</emphasis>
  2411. The base class supporting SDK creation under all package
  2412. managers (i.e. DEB, RPM, and opkg).</para></listitem>
  2413. <listitem><para><emphasis><filename>populate_sdk_deb</filename>:</emphasis>
  2414. Supports creation of the SDK given the Debian package manager.
  2415. </para></listitem>
  2416. <listitem><para><emphasis><filename>populate_sdk_rpm</filename>:</emphasis>
  2417. Supports creation of the SDK given the RPM package manager.
  2418. </para></listitem>
  2419. <listitem><para><emphasis><filename>populate_sdk_ipk</filename>:</emphasis>
  2420. Supports creation of the SDK given the opkg (IPK format)
  2421. package manager.
  2422. </para></listitem>
  2423. <listitem><para><emphasis><filename>populate_sdk_ext</filename>:</emphasis>
  2424. Supports extensible SDK creation under all package managers.
  2425. </para></listitem>
  2426. </itemizedlist>
  2427. </para>
  2428. <para>
  2429. The <filename>populate_sdk_base</filename> class inherits the
  2430. appropriate <filename>populate_sdk_*</filename> (i.e.
  2431. <filename>deb</filename>, <filename>rpm</filename>, and
  2432. <filename>ipk</filename>) based on
  2433. <link linkend='var-IMAGE_PKGTYPE'><filename>IMAGE_PKGTYPE</filename></link>.
  2434. </para>
  2435. <para>
  2436. The base class ensures all source and destination directories are
  2437. established and then populates the SDK.
  2438. After populating the SDK, the <filename>populate_sdk_base</filename>
  2439. class constructs two sysroots:
  2440. <filename>${</filename><link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link><filename>}-nativesdk</filename>,
  2441. which contains the cross-compiler and associated tooling, and the
  2442. target, which contains a target root filesystem that is configured for
  2443. the SDK usage.
  2444. These two images reside in
  2445. <link linkend='var-SDK_OUTPUT'><filename>SDK_OUTPUT</filename></link>,
  2446. which consists of the following:
  2447. <literallayout class='monospaced'>
  2448. ${SDK_OUTPUT}/${SDK_ARCH}<replaceable>-nativesdk-pkgs</replaceable>
  2449. ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/<replaceable>target-pkgs</replaceable>
  2450. </literallayout>
  2451. </para>
  2452. <para>
  2453. Finally, the base populate SDK class creates the toolchain
  2454. environment setup script, the tarball of the SDK, and the installer.
  2455. </para>
  2456. <para>
  2457. The respective <filename>populate_sdk_deb</filename>,
  2458. <filename>populate_sdk_rpm</filename>, and
  2459. <filename>populate_sdk_ipk</filename> classes each support the
  2460. specific type of SDK.
  2461. These classes are inherited by and used with the
  2462. <filename>populate_sdk_base</filename> class.
  2463. </para>
  2464. <para>
  2465. For more information on the cross-development toolchain
  2466. generation, see the
  2467. "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
  2468. section.
  2469. For information on advantages gained when building a
  2470. cross-development toolchain using the
  2471. <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
  2472. task, see the
  2473. "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
  2474. section in the Yocto Project Software Development Kit (SDK) Developer's
  2475. Guide.
  2476. </para>
  2477. </section>
  2478. <section id='ref-classes-prexport'>
  2479. <title><filename>prexport.bbclass</filename></title>
  2480. <para>
  2481. The <filename>prexport</filename> class provides functionality for
  2482. exporting
  2483. <link linkend='var-PR'><filename>PR</filename></link> values.
  2484. <note>
  2485. This class is not intended to be used directly.
  2486. Rather, it is enabled when using
  2487. "<filename>bitbake-prserv-tool export</filename>".
  2488. </note>
  2489. </para>
  2490. </section>
  2491. <section id='ref-classes-primport'>
  2492. <title><filename>primport.bbclass</filename></title>
  2493. <para>
  2494. The <filename>primport</filename> class provides functionality for
  2495. importing
  2496. <link linkend='var-PR'><filename>PR</filename></link> values.
  2497. <note>
  2498. This class is not intended to be used directly.
  2499. Rather, it is enabled when using
  2500. "<filename>bitbake-prserv-tool import</filename>".
  2501. </note>
  2502. </para>
  2503. </section>
  2504. <section id='ref-classes-prserv'>
  2505. <title><filename>prserv.bbclass</filename></title>
  2506. <para>
  2507. The <filename>prserv</filename> class provides functionality for
  2508. using a
  2509. <ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>PR service</ulink>
  2510. in order to automatically manage the incrementing of the
  2511. <link linkend='var-PR'><filename>PR</filename></link> variable for
  2512. each recipe.
  2513. </para>
  2514. <para>
  2515. This class is enabled by default because it is inherited by the
  2516. <link linkend='ref-classes-package'><filename>package</filename></link>
  2517. class.
  2518. However, the OpenEmbedded build system will not enable the
  2519. functionality of this class unless
  2520. <link linkend='var-PRSERV_HOST'><filename>PRSERV_HOST</filename></link>
  2521. has been set.
  2522. </para>
  2523. </section>
  2524. <section id='ref-classes-ptest'>
  2525. <title><filename>ptest.bbclass</filename></title>
  2526. <para>
  2527. The <filename>ptest</filename> class provides functionality for
  2528. packaging and installing runtime tests for recipes that build software
  2529. that provides these tests.
  2530. </para>
  2531. <para>
  2532. This class is intended to be inherited by individual recipes.
  2533. However, the class' functionality is largely disabled unless "ptest"
  2534. appears in
  2535. <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
  2536. See the
  2537. "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
  2538. section in the Yocto Project Development Manual for more information
  2539. on ptest.
  2540. </para>
  2541. </section>
  2542. <section id='ref-classes-ptest-gnome'>
  2543. <title><filename>ptest-gnome.bbclass</filename></title>
  2544. <para>
  2545. Enables package tests (ptests) specifically for GNOME packages,
  2546. which have tests intended to be executed with
  2547. <filename>gnome-desktop-testing</filename>.
  2548. </para>
  2549. <para>
  2550. For information on setting up and running ptests, see the
  2551. "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
  2552. section in the Yocto Project Development Manual.
  2553. </para>
  2554. </section>
  2555. <section id='ref-classes-python-dir'>
  2556. <title><filename>python-dir.bbclass</filename></title>
  2557. <para>
  2558. The <filename>python-dir</filename> class provides the base version,
  2559. location, and site package location for Python.
  2560. </para>
  2561. </section>
  2562. <section id='ref-classes-python3native'>
  2563. <title><filename>python3native.bbclass</filename></title>
  2564. <para>
  2565. The <filename>python3native</filename> class supports using the
  2566. native version of Python 3 built by the build system rather than
  2567. support of the version provided by the build host.
  2568. </para>
  2569. </section>
  2570. <section id='ref-classes-pythonnative'>
  2571. <title><filename>pythonnative.bbclass</filename></title>
  2572. <para>
  2573. When inherited by a recipe, the <filename>pythonnative</filename> class
  2574. supports using the native version of Python built by the build system
  2575. rather than using the version provided by the build host.
  2576. </para>
  2577. </section>
  2578. <section id='ref-classes-qemu'>
  2579. <title><filename>qemu.bbclass</filename></title>
  2580. <para>
  2581. The <filename>qemu</filename> class provides functionality for recipes
  2582. that either need QEMU or test for the existence of QEMU.
  2583. Typically, this class is used to run programs for a target system on
  2584. the build host using QEMU's application emulation mode.
  2585. </para>
  2586. </section>
  2587. <section id='ref-classes-recipe_sanity'>
  2588. <title><filename>recipe_sanity.bbclass</filename></title>
  2589. <para>
  2590. The <filename>recipe_sanity</filename> class checks for the presence
  2591. of any host system recipe prerequisites that might affect the
  2592. build (e.g. variables that are set or software that is present).
  2593. </para>
  2594. </section>
  2595. <section id='ref-classes-relocatable'>
  2596. <title><filename>relocatable.bbclass</filename></title>
  2597. <para>
  2598. The <filename>relocatable</filename> class enables relocation of
  2599. binaries when they are installed into the sysroot.
  2600. </para>
  2601. <para>
  2602. This class makes use of the
  2603. <link linkend='ref-classes-chrpath'><filename>chrpath</filename></link>
  2604. class and is used by both the
  2605. <link linkend='ref-classes-cross'><filename>cross</filename></link>
  2606. and
  2607. <link linkend='ref-classes-native'><filename>native</filename></link>
  2608. classes.
  2609. </para>
  2610. </section>
  2611. <section id='ref-classes-remove-libtool'>
  2612. <title><filename>remove-libtool.bbclass</filename></title>
  2613. <para>
  2614. The <filename>remove-libtool</filename> class adds a post function
  2615. to the
  2616. <link linkend='ref-tasks-install'><filename>do_install</filename></link>
  2617. task to remove all <filename>.la</filename> files installed by
  2618. <filename>libtool</filename>.
  2619. Removing these files results in them being absent from both the
  2620. sysroot and target packages.
  2621. </para>
  2622. <para>
  2623. If a recipe needs the <filename>.la</filename> files to be installed,
  2624. then the recipe can override the removal by setting
  2625. <filename>REMOVE_LIBTOOL_LA</filename> to "0" as follows:
  2626. <literallayout class='monospaced'>
  2627. REMOVE_LIBTOOL_LA = "0"
  2628. </literallayout>
  2629. <note>
  2630. The <filename>remove-libtool</filename> class is not enabled by
  2631. default.
  2632. </note>
  2633. </para>
  2634. </section>
  2635. <section id='ref-classes-report-error'>
  2636. <title><filename>report-error.bbclass</filename></title>
  2637. <para>
  2638. The <filename>report-error</filename> class supports enabling the
  2639. <ulink url='&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool'>error reporting tool</ulink>,
  2640. which allows you to submit build error information to a central
  2641. database.
  2642. </para>
  2643. <para>
  2644. The class collects debug information for recipe, recipe version, task,
  2645. machine, distro, build system, target system, host distro, branch,
  2646. commit, and log.
  2647. From the information, report files using a JSON format are created and
  2648. stored in
  2649. <filename>${</filename><link linkend='var-LOG_DIR'><filename>LOG_DIR</filename></link><filename>}/error-report</filename>.
  2650. </para>
  2651. </section>
  2652. <section id='ref-classes-rm-work'>
  2653. <title><filename>rm_work.bbclass</filename></title>
  2654. <para>
  2655. The <filename>rm_work</filename> class supports deletion of temporary
  2656. workspace, which can ease your hard drive demands during builds.
  2657. </para>
  2658. <para>
  2659. The OpenEmbedded build system can use a substantial amount of disk
  2660. space during the build process.
  2661. A portion of this space is the work files under the
  2662. <filename>${TMPDIR}/work</filename> directory for each recipe.
  2663. Once the build system generates the packages for a recipe, the work
  2664. files for that recipe are no longer needed.
  2665. However, by default, the build system preserves these files
  2666. for inspection and possible debugging purposes.
  2667. If you would rather have these files deleted to save disk space
  2668. as the build progresses, you can enable <filename>rm_work</filename>
  2669. by adding the following to your <filename>local.conf</filename> file,
  2670. which is found in the
  2671. <link linkend='build-directory'>Build Directory</link>.
  2672. <literallayout class='monospaced'>
  2673. INHERIT += "rm_work"
  2674. </literallayout>
  2675. If you are modifying and building source code out of the work directory
  2676. for a recipe, enabling <filename>rm_work</filename> will potentially
  2677. result in your changes to the source being lost.
  2678. To exclude some recipes from having their work directories deleted by
  2679. <filename>rm_work</filename>, you can add the names of the recipe or
  2680. recipes you are working on to the <filename>RM_WORK_EXCLUDE</filename>
  2681. variable, which can also be set in your <filename>local.conf</filename>
  2682. file.
  2683. Here is an example:
  2684. <literallayout class='monospaced'>
  2685. RM_WORK_EXCLUDE += "busybox glibc"
  2686. </literallayout>
  2687. </para>
  2688. </section>
  2689. <section id='ref-classes-rootfs*'>
  2690. <title><filename>rootfs*.bbclass</filename></title>
  2691. <para>
  2692. The <filename>rootfs*</filename> classes support creating
  2693. the root filesystem for an image and consist of the following classes:
  2694. <itemizedlist>
  2695. <listitem><para>
  2696. The <filename>rootfs-postcommands</filename> class, which
  2697. defines filesystem post-processing functions for image recipes.
  2698. </para></listitem>
  2699. <listitem><para>
  2700. The <filename>rootfs_deb</filename> class, which supports
  2701. creation of root filesystems for images built using
  2702. <filename>.deb</filename> packages.</para></listitem>
  2703. <listitem><para>
  2704. The <filename>rootfs_rpm</filename> class, which supports
  2705. creation of root filesystems for images built using
  2706. <filename>.rpm</filename> packages.</para></listitem>
  2707. <listitem><para>
  2708. The <filename>rootfs_ipk</filename> class, which supports
  2709. creation of root filesystems for images built using
  2710. <filename>.ipk</filename> packages.</para></listitem>
  2711. <listitem><para>
  2712. The <filename>rootfsdebugfiles</filename> class, which installs
  2713. additional files found on the build host directly into the
  2714. root filesystem.
  2715. </para></listitem>
  2716. </itemizedlist>
  2717. </para>
  2718. <para>
  2719. The root filesystem is created from packages using one of the
  2720. <filename>rootfs*.bbclass</filename> files as determined by the
  2721. <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
  2722. variable.
  2723. </para>
  2724. <para>
  2725. For information on how root filesystem images are created, see the
  2726. "<link linkend='image-generation-dev-environment'>Image Generation</link>"
  2727. section.
  2728. </para>
  2729. </section>
  2730. <section id='ref-classes-sanity'>
  2731. <title><filename>sanity.bbclass</filename></title>
  2732. <para>
  2733. The <filename>sanity</filename> class checks to see if prerequisite
  2734. software is present on the host system so that users can be notified
  2735. of potential problems that might affect their build.
  2736. The class also performs basic user configuration checks from
  2737. the <filename>local.conf</filename> configuration file to
  2738. prevent common mistakes that cause build failures.
  2739. Distribution policy usually determines whether to include this class.
  2740. </para>
  2741. </section>
  2742. <section id='ref-classes-scons'>
  2743. <title><filename>scons.bbclass</filename></title>
  2744. <para>
  2745. The <filename>scons</filename> class supports recipes that need to
  2746. build software that uses the SCons build system.
  2747. You can use the
  2748. <link linkend='var-EXTRA_OESCONS'><filename>EXTRA_OESCONS</filename></link>
  2749. variable to specify additional configuration options you want to pass
  2750. SCons command line.
  2751. </para>
  2752. </section>
  2753. <section id='ref-classes-sdl'>
  2754. <title><filename>sdl.bbclass</filename></title>
  2755. <para>
  2756. The <filename>sdl</filename> class supports recipes that need to build
  2757. software that uses the Simple DirectMedia Layer (SDL) library.
  2758. </para>
  2759. </section>
  2760. <section id='ref-classes-setuptools'>
  2761. <title><filename>setuptools.bbclass</filename></title>
  2762. <para>
  2763. The <filename>setuptools</filename> class supports Python
  2764. version 2.x extensions that use build systems based on
  2765. <filename>setuptools</filename>.
  2766. If your recipe uses these build systems, the recipe needs to
  2767. inherit the <filename>setuptools</filename> class.
  2768. </para>
  2769. </section>
  2770. <section id='ref-classes-setuptools3'>
  2771. <title><filename>setuptools3.bbclass</filename></title>
  2772. <para>
  2773. The <filename>setuptools3</filename> class supports Python
  2774. version 3.x extensions that use build systems based on
  2775. <filename>setuptools3</filename>.
  2776. If your recipe uses these build systems, the recipe needs to
  2777. inherit the <filename>setuptools3</filename> class.
  2778. </para>
  2779. </section>
  2780. <section id='ref-classes-sign_rpm'>
  2781. <title><filename>sign_rpm.bbclass</filename></title>
  2782. <para>
  2783. The <filename>sign_rpm</filename> class supports generating signed
  2784. RPM packages.
  2785. </para>
  2786. </section>
  2787. <section id='ref-classes-sip'>
  2788. <title><filename>sip.bbclass</filename></title>
  2789. <para>
  2790. The <filename>sip</filename> class
  2791. supports recipes that build or package SIP-based Python bindings.
  2792. </para>
  2793. </section>
  2794. <section id='ref-classes-siteconfig'>
  2795. <title><filename>siteconfig.bbclass</filename></title>
  2796. <para>
  2797. The <filename>siteconfig</filename> class
  2798. provides functionality for handling site configuration.
  2799. The class is used by the
  2800. <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
  2801. class to accelerate the
  2802. <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
  2803. task.
  2804. </para>
  2805. </section>
  2806. <section id='ref-classes-siteinfo'>
  2807. <title><filename>siteinfo.bbclass</filename></title>
  2808. <para>
  2809. The <filename>siteinfo</filename> class provides information about
  2810. the targets that might be needed by other classes or recipes.
  2811. </para>
  2812. <para>
  2813. As an example, consider Autotools, which can require tests that must
  2814. execute on the target hardware.
  2815. Since this is not possible in general when cross compiling, site
  2816. information is used to provide cached test results so these tests can
  2817. be skipped over but still make the correct values available.
  2818. The
  2819. <filename><link linkend='structure-meta-site'>meta/site directory</link></filename>
  2820. contains test results sorted into different categories such as
  2821. architecture, endianness, and the <filename>libc</filename> used.
  2822. Site information provides a list of files containing data relevant to
  2823. the current build in the
  2824. <filename><link linkend='var-CONFIG_SITE'>CONFIG_SITE</link></filename> variable
  2825. that Autotools automatically picks up.
  2826. </para>
  2827. <para>
  2828. The class also provides variables like
  2829. <filename><link linkend='var-SITEINFO_ENDIANNESS'>SITEINFO_ENDIANNESS</link></filename>
  2830. and <filename><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link></filename>
  2831. that can be used elsewhere in the metadata.
  2832. </para>
  2833. <para>
  2834. Because the
  2835. <link linkend='ref-classes-base'><filename>base</filename></link> class
  2836. includes the <filename>siteinfo</filename> class, it is always active.
  2837. </para>
  2838. </section>
  2839. <section id='ref-classes-spdx'>
  2840. <title><filename>spdx.bbclass</filename></title>
  2841. <para>
  2842. The <filename>spdx</filename> class integrates real-time license
  2843. scanning, generation of SPDX standard output, and verification
  2844. of license information during the build.
  2845. <note>
  2846. This class is currently at the prototype stage in the 1.6
  2847. release.
  2848. </note>
  2849. </para>
  2850. </section>
  2851. <section id='ref-classes-sstate'>
  2852. <title><filename>sstate.bbclass</filename></title>
  2853. <para>
  2854. The <filename>sstate</filename> class provides support for Shared
  2855. State (sstate).
  2856. By default, the class is enabled through the
  2857. <link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link>
  2858. variable's default value.
  2859. </para>
  2860. <para>
  2861. For more information on sstate, see the
  2862. "<link linkend='shared-state-cache'>Shared State Cache</link>"
  2863. section.
  2864. </para>
  2865. </section>
  2866. <section id='ref-classes-staging'>
  2867. <title><filename>staging.bbclass</filename></title>
  2868. <para>
  2869. The <filename>staging</filename> class installs files into individual
  2870. recipe work directories for sysroots.
  2871. The class contains the following key tasks:
  2872. <itemizedlist>
  2873. <listitem><para>
  2874. The
  2875. <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
  2876. task, which is responsible for handing the files that end up
  2877. in the recipe sysroots.
  2878. </para></listitem>
  2879. <listitem><para>
  2880. The
  2881. <link linkend='ref-tasks-prepare_recipe_sysroot'><filename>do_prepare_recipe_sysroot</filename></link>
  2882. task (a "partner" task to the
  2883. <filename>populate_sysroot</filename> task), which installs
  2884. the files into the individual recipe work directories (i.e.
  2885. <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>).
  2886. </para></listitem>
  2887. </itemizedlist>
  2888. </para>
  2889. <para>
  2890. The code in the <filename>staging</filename> class is complex and
  2891. basically works in two stages:
  2892. <itemizedlist>
  2893. <listitem><para>
  2894. <emphasis>Stage One:</emphasis>
  2895. The first stage addresses recipes that have files they want
  2896. to share with other recipes that have dependencies on the
  2897. originating recipe.
  2898. Normally these dependencies are installed through the
  2899. <link linkend='ref-tasks-install'><filename>do_install</filename></link>
  2900. task into
  2901. <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>.
  2902. The <filename>do_populate_sysroot</filename> task copies
  2903. a subset of these files into
  2904. <filename>${SYSROOT_DESTDIR}</filename>.
  2905. This subset of files is controlled by the
  2906. <link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS</filename></link>,
  2907. <link linkend='var-SYSROOT_DIRS_NATIVE'><filename>SYSROOT_DIRS_NATIVE</filename></link>,
  2908. and
  2909. <link linkend='var-SYSROOT_DIRS_BLACKLIST'><filename>SYSROOT_DIRS_BLACKLIST</filename></link>
  2910. variables.
  2911. <note>
  2912. Additionally, a recipe can customize the files further by
  2913. declaring a processing function in the
  2914. <link linkend='var-SYSROOT_PREPROCESS_FUNCS'><filename>SYSROOT_PREPROCESS_FUNCS</filename></link>
  2915. variable.
  2916. </note>
  2917. </para>
  2918. <para>
  2919. A shared state (sstate) object is built from these files
  2920. and the files are placed into a subdirectory of
  2921. <filename>tmp/sysroot-components/</filename>.
  2922. The files are scanned for hardcoded paths to the original
  2923. installation location.
  2924. If the location is found in text files, the hardcoded
  2925. locations are replaced by tokens and a list of the files
  2926. needing such replacements is created.
  2927. These adjustments are referred to as "FIXMEs".
  2928. The list of files that are scanned for paths is controlled by
  2929. the
  2930. <link linkend='var-SSTATE_SCAN_FILES'><filename>SSTATE_SCAN_FILES</filename></link>
  2931. variable.
  2932. </para></listitem>
  2933. <listitem><para>
  2934. <emphasis>Stage Two:</emphasis>
  2935. The second stage addresses recipes that want to use something
  2936. from another recipe and declare a dependency on that recipe
  2937. through the
  2938. <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
  2939. variable.
  2940. The recipe will have a
  2941. <link linkend='ref-tasks-prepare_recipe_sysroot'><filename>do_prepare_recipe_sysroot</filename></link>
  2942. task and when
  2943. this task executes, it creates the
  2944. <filename>recipe-sysroot</filename> and
  2945. <filename>recipe-sysroot-native</filename> in the recipe
  2946. work directory (i.e.
  2947. <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
  2948. The OpenEmbedded build system creates hard links to copies of the
  2949. relevant files from <filename>sysroot-components</filename>
  2950. into the recipe work directory.
  2951. <note>
  2952. If hard links are not possible, the build system uses
  2953. actual copies.
  2954. </note>
  2955. The build system then addresses any "FIXMEs" to paths as
  2956. defined from the list created in the first stage.
  2957. </para>
  2958. <para>
  2959. Finally, any files in <filename>${bindir}</filename>
  2960. within the sysroot that have the prefix
  2961. "<filename>postinst-</filename>" are executed.
  2962. <note>
  2963. Although these files are not recommended for general use,
  2964. the files do allow some issues such as user creation
  2965. and module indexes to be addressed.
  2966. </note>
  2967. </para>
  2968. <para>
  2969. Because recipes can have other dependencies outside of
  2970. <filename>DEPENDS</filename> (e.g.
  2971. <filename>do_unpack[depends] += "tar-native:do_populate_sysroot"</filename>),
  2972. the sysroot creation function
  2973. <filename>extend_recipe_sysroot</filename> is also added as
  2974. a pre-function for those tasks whose dependencies are not
  2975. through <filename>DEPENDS</filename> but operate similarly.
  2976. </para>
  2977. <para>
  2978. When installing dependencies into the sysroot, the code
  2979. traverses the dependency graph and processes dependencies
  2980. in exactly the same way as the dependencies would or would not
  2981. be when installed from sstate.
  2982. This processing means, for example, a native tool would have
  2983. its native dependencies added but a target library would not
  2984. have its dependencies traversed or installed.
  2985. The same sstate dependency code is used so that
  2986. builds should be identical regardless of whether sstate
  2987. was used or not.
  2988. For a closer look, see the
  2989. <filename>setscene_depvalid()</filename> function in the
  2990. <link linkend='ref-classes-sstate'><filename>sstate</filename></link>
  2991. class.
  2992. </para>
  2993. <para>
  2994. The build system is careful to maintain manifests of the files
  2995. it installs so that any given dependency can be installed as
  2996. needed.
  2997. The sstate hash of the installed item is also stored so that
  2998. if it changes, the build system can reinstall it.
  2999. </para></listitem>
  3000. </itemizedlist>
  3001. </para>
  3002. </section>
  3003. <section id='ref-classes-syslinux'>
  3004. <title><filename>syslinux.bbclass</filename></title>
  3005. <para>
  3006. The <filename>syslinux</filename> class provides syslinux-specific
  3007. functions for building bootable images.
  3008. </para>
  3009. <para>
  3010. The class supports the following variables:
  3011. <itemizedlist>
  3012. <listitem><para><link linkend='var-INITRD'><filename>INITRD</filename></link>:
  3013. Indicates list of filesystem images to concatenate and use as
  3014. an initial RAM disk (initrd).
  3015. This variable is optional.</para></listitem>
  3016. <listitem><para><link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:
  3017. Indicates a filesystem image to include as the root filesystem.
  3018. This variable is optional.</para></listitem>
  3019. <listitem><para><link linkend='var-AUTO_SYSLINUXMENU'><filename>AUTO_SYSLINUXMENU</filename></link>:
  3020. Enables creating an automatic menu when set to "1".
  3021. </para></listitem>
  3022. <listitem><para><link linkend='var-LABELS'><filename>LABELS</filename></link>:
  3023. Lists targets for automatic configuration.
  3024. </para></listitem>
  3025. <listitem><para><link linkend='var-APPEND'><filename>APPEND</filename></link>:
  3026. Lists append string overrides for each label.
  3027. </para></listitem>
  3028. <listitem><para><link linkend='var-SYSLINUX_OPTS'><filename>SYSLINUX_OPTS</filename></link>:
  3029. Lists additional options to add to the syslinux file.
  3030. Semicolon characters separate multiple options.
  3031. </para></listitem>
  3032. <listitem><para><link linkend='var-SYSLINUX_SPLASH'><filename>SYSLINUX_SPLASH</filename></link>:
  3033. Lists a background for the VGA boot menu when you are using the
  3034. boot menu.</para></listitem>
  3035. <listitem><para><link linkend='var-SYSLINUX_DEFAULT_CONSOLE'><filename>SYSLINUX_DEFAULT_CONSOLE</filename></link>:
  3036. Set to "console=ttyX" to change kernel boot default console.
  3037. </para></listitem>
  3038. <listitem><para><link linkend='var-SYSLINUX_SERIAL'><filename>SYSLINUX_SERIAL</filename></link>:
  3039. Sets an alternate serial port.
  3040. Or, turns off serial when the variable is set with an
  3041. empty string.</para></listitem>
  3042. <listitem><para><link linkend='var-SYSLINUX_SERIAL_TTY'><filename>SYSLINUX_SERIAL_TTY</filename></link>:
  3043. Sets an alternate "console=tty..." kernel boot argument.
  3044. </para></listitem>
  3045. </itemizedlist>
  3046. </para>
  3047. </section>
  3048. <section id='ref-classes-systemd'>
  3049. <title><filename>systemd.bbclass</filename></title>
  3050. <para>
  3051. The <filename>systemd</filename> class provides support for recipes
  3052. that install systemd unit files.
  3053. </para>
  3054. <para>
  3055. The functionality for this class is disabled unless you have "systemd"
  3056. in
  3057. <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
  3058. </para>
  3059. <para>
  3060. Under this class, the recipe or Makefile (i.e. whatever the recipe is
  3061. calling during the
  3062. <link linkend='ref-tasks-install'><filename>do_install</filename></link>
  3063. task) installs unit files into
  3064. <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}${systemd_unitdir}/system</filename>.
  3065. If the unit files being installed go into packages other than the
  3066. main package, you need to set
  3067. <link linkend='var-SYSTEMD_PACKAGES'><filename>SYSTEMD_PACKAGES</filename></link>
  3068. in your recipe to identify the packages in which the files will be
  3069. installed.
  3070. </para>
  3071. <para>
  3072. You should set
  3073. <link linkend='var-SYSTEMD_SERVICE'><filename>SYSTEMD_SERVICE</filename></link>
  3074. to the name of the service file.
  3075. You should also use a package name override to indicate the package
  3076. to which the value applies.
  3077. If the value applies to the recipe's main package, use
  3078. <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>.
  3079. Here is an example from the connman recipe:
  3080. <literallayout class='monospaced'>
  3081. SYSTEMD_SERVICE_${PN} = "connman.service"
  3082. </literallayout>
  3083. Services are set up to start on boot automatically unless
  3084. you have set
  3085. <link linkend='var-SYSTEMD_AUTO_ENABLE'><filename>SYSTEMD_AUTO_ENABLE</filename></link>
  3086. to "disable".
  3087. </para>
  3088. <para>
  3089. For more information on <filename>systemd</filename>, see the
  3090. "<ulink url='&YOCTO_DOCS_DEV_URL;#selecting-an-initialization-manager'>Selecting an Initialization Manager</ulink>"
  3091. section in the Yocto Project Development Manual.
  3092. </para>
  3093. </section>
  3094. <section id='ref-classes-systemd-boot'>
  3095. <title><filename>systemd-boot.bbclass</filename></title>
  3096. <para>
  3097. The <filename>systemd-boot</filename> class provides functions specific
  3098. to the systemd-boot bootloader for building bootable images.
  3099. This is an internal class and is not intended to be used directly.
  3100. <note>
  3101. The <filename>systemd-boot</filename> class is a result from
  3102. merging the <filename>gummiboot</filename> class used in previous
  3103. Yocto Project releases with the <filename>systemd</filename>
  3104. project.
  3105. </note>
  3106. Set the
  3107. <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
  3108. variable to "systemd-boot" to use this class.
  3109. Doing so creates a standalone EFI bootloader that is not dependent
  3110. on systemd.
  3111. </para>
  3112. <para>
  3113. For information on more variables used and supported in this class,
  3114. see the
  3115. <link linkend='var-SYSTEMD_BOOT_CFG'><filename>SYSTEMD_BOOT_CFG</filename></link>,
  3116. <link linkend='var-SYSTEMD_BOOT_ENTRIES'><filename>SYSTEMD_BOOT_ENTRIES</filename></link>,
  3117. and
  3118. <link linkend='var-SYSTEMD_BOOT_TIMEOUT'><filename>SYSTEMD_BOOT_TIMEOUT</filename></link>
  3119. variables.
  3120. </para>
  3121. <para>
  3122. You can also see the
  3123. <ulink url='http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/'>Systemd-boot documentation</ulink>
  3124. for more information.
  3125. </para>
  3126. </section>
  3127. <section id='ref-classes-terminal'>
  3128. <title><filename>terminal.bbclass</filename></title>
  3129. <para>
  3130. The <filename>terminal</filename> class provides support for starting
  3131. a terminal session.
  3132. The
  3133. <link linkend='var-OE_TERMINAL'><filename>OE_TERMINAL</filename></link>
  3134. variable controls which terminal emulator is used for the session.
  3135. </para>
  3136. <para>
  3137. Other classes use the <filename>terminal</filename> class anywhere a
  3138. separate terminal session needs to be started.
  3139. For example, the
  3140. <link linkend='ref-classes-patch'><filename>patch</filename></link>
  3141. class assuming
  3142. <link linkend='var-PATCHRESOLVE'><filename>PATCHRESOLVE</filename></link>
  3143. is set to "user", the
  3144. <link linkend='ref-classes-cml1'><filename>cml1</filename></link>
  3145. class, and the
  3146. <link linkend='ref-classes-devshell'><filename>devshell</filename></link>
  3147. class all use the <filename>terminal</filename> class.
  3148. </para>
  3149. </section>
  3150. <section id='ref-classes-testimage*'>
  3151. <title><filename>testimage*.bbclass</filename></title>
  3152. <para>
  3153. The <filename>testimage*</filename> classes support running
  3154. automated tests against images using QEMU and on actual hardware.
  3155. The classes handle loading the tests and starting the image.
  3156. To use the classes, you need to perform steps to set up the
  3157. environment.
  3158. </para>
  3159. <para>
  3160. The tests are commands that run on the target system over
  3161. <filename>ssh</filename>.
  3162. Each test is written in Python and makes use of the
  3163. <filename>unittest</filename> module.
  3164. </para>
  3165. <para>
  3166. The <filename>testimage.bbclass</filename> runs tests on an image
  3167. when called using the following:
  3168. <literallayout class='monospaced'>
  3169. $ bitbake -c testimage <replaceable>image</replaceable>
  3170. </literallayout>
  3171. The <filename>testimage-auto</filename> class runs tests on an image
  3172. after the image is constructed (i.e.
  3173. <link linkend='var-TEST_IMAGE'><filename>TEST_IMAGE</filename></link>
  3174. must be set to "1").
  3175. </para>
  3176. <para>
  3177. For information on how to enable, run, and create new tests, see the
  3178. "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
  3179. section in the Yocto Project Development Manual.
  3180. </para>
  3181. </section>
  3182. <section id='ref-classes-testsdk'>
  3183. <title><filename>testsdk.bbclass</filename></title>
  3184. <para>
  3185. This class supports running automated tests against
  3186. software development kits (SDKs).
  3187. The <filename>testsdk</filename> class runs tests on an SDK when
  3188. called using the following:
  3189. <literallayout class='monospaced'>
  3190. $ bitbake -c testsdk image
  3191. </literallayout>
  3192. </para>
  3193. </section>
  3194. <section id='ref-classes-texinfo'>
  3195. <title><filename>texinfo.bbclass</filename></title>
  3196. <para>
  3197. This class should be inherited by recipes whose upstream packages
  3198. invoke the <filename>texinfo</filename> utilities at build-time.
  3199. Native and cross recipes are made to use the dummy scripts provided
  3200. by <filename>texinfo-dummy-native</filename>, for improved performance.
  3201. Target architecture recipes use the genuine
  3202. Texinfo utilities.
  3203. By default, they use the Texinfo utilities on the host system.
  3204. <note>
  3205. If you want to use the Texinfo recipe shipped with the build
  3206. system, you can remove "texinfo-native" from
  3207. <link linkend='var-ASSUME_PROVIDED'><filename>ASSUME_PROVIDED</filename></link>
  3208. and makeinfo from
  3209. <link linkend='var-SANITY_REQUIRED_UTILITIES'><filename>SANITY_REQUIRED_UTILITIES</filename></link>.
  3210. </note>
  3211. </para>
  3212. </section>
  3213. <section id='ref-classes-tinderclient'>
  3214. <title><filename>tinderclient.bbclass</filename></title>
  3215. <para>
  3216. The <filename>tinderclient</filename> class submits build results to
  3217. an external Tinderbox instance.
  3218. <note>
  3219. This class is currently unmaintained.
  3220. </note>
  3221. </para>
  3222. </section>
  3223. <section id='ref-classes-toaster'>
  3224. <title><filename>toaster.bbclass</filename></title>
  3225. <para>
  3226. The <filename>toaster</filename> class collects information about
  3227. packages and images and sends them as events that the BitBake
  3228. user interface can receive.
  3229. The class is enabled when the Toaster user interface is running.
  3230. </para>
  3231. <para>
  3232. This class is not intended to be used directly.
  3233. </para>
  3234. </section>
  3235. <section id='ref-classes-toolchain-scripts'>
  3236. <title><filename>toolchain-scripts.bbclass</filename></title>
  3237. <para>
  3238. The <filename>toolchain-scripts</filename> class provides the scripts
  3239. used for setting up the environment for installed SDKs.
  3240. </para>
  3241. </section>
  3242. <section id='ref-classes-typecheck'>
  3243. <title><filename>typecheck.bbclass</filename></title>
  3244. <para>
  3245. The <filename>typecheck</filename> class provides support for
  3246. validating the values of variables set at the configuration level
  3247. against their defined types.
  3248. The OpenEmbedded build system allows you to define the type of a
  3249. variable using the "type" varflag.
  3250. Here is an example:
  3251. <literallayout class='monospaced'>
  3252. IMAGE_FEATURES[type] = "list"
  3253. </literallayout>
  3254. </para>
  3255. </section>
  3256. <section id='ref-classes-uboot-config'>
  3257. <title><filename>uboot-config.bbclass</filename></title>
  3258. <para>
  3259. The <filename>uboot-config</filename> class provides support for
  3260. U-Boot configuration for a machine.
  3261. Specify the machine in your recipe as follows:
  3262. <literallayout class='monospaced'>
  3263. UBOOT_CONFIG ??= &lt;default&gt;
  3264. UBOOT_CONFIG[foo] = "config,images"
  3265. </literallayout>
  3266. You can also specify the machine using this method:
  3267. <literallayout class='monospaced'>
  3268. UBOOT_MACHINE = "config"
  3269. </literallayout>
  3270. See the
  3271. <link linkend='var-UBOOT_CONFIG'><filename>UBOOT_CONFIG</filename></link>
  3272. and
  3273. <link linkend='var-UBOOT_MACHINE'><filename>UBOOT_MACHINE</filename></link>
  3274. variables for additional information.
  3275. </para>
  3276. </section>
  3277. <section id='ref-classes-uninative'>
  3278. <title><filename>uninative.bbclass</filename></title>
  3279. <para>
  3280. Attempts to isolate the build system from the host
  3281. distribution's C library in order to make re-use of native shared state
  3282. artifacts across different host distributions practical.
  3283. With this class enabled, a tarball containing a pre-built C library
  3284. is downloaded at the start of the build.
  3285. In the Poky reference distribution this is enabled by default
  3286. through
  3287. <filename>meta/conf/distro/include/yocto-uninative.inc</filename>.
  3288. Other distributions that do not derive from poky can also
  3289. "<filename>require conf/distro/include/yocto-uninative.inc</filename>"
  3290. to use this.
  3291. Alternatively if you prefer, you can build the uninative-tarball recipe
  3292. yourself, publish the resulting tarball (e.g. via HTTP) and set
  3293. <filename>UNINATIVE_URL</filename> and
  3294. <filename>UNINATIVE_CHECKSUM</filename> appropriately.
  3295. For an example, see the
  3296. <filename>meta/conf/distro/include/yocto-uninative.inc</filename>.
  3297. </para>
  3298. <para>
  3299. The <filename>uninative</filename> class is also used unconditionally
  3300. by the extensible SDK.
  3301. When building the extensible SDK,
  3302. <filename>uninative-tarball</filename> is built and the resulting
  3303. tarball is included within the SDK.
  3304. </para>
  3305. </section>
  3306. <section id='ref-classes-update-alternatives'>
  3307. <title><filename>update-alternatives.bbclass</filename></title>
  3308. <para>
  3309. The <filename>update-alternatives</filename> class helps the
  3310. alternatives system when multiple sources provide the same command.
  3311. This situation occurs when several programs that have the same or
  3312. similar function are installed with the same name.
  3313. For example, the <filename>ar</filename> command is available from the
  3314. <filename>busybox</filename>, <filename>binutils</filename> and
  3315. <filename>elfutils</filename> packages.
  3316. The <filename>update-alternatives</filename> class handles
  3317. renaming the binaries so that multiple packages can be installed
  3318. without conflicts.
  3319. The <filename>ar</filename> command still works regardless of which
  3320. packages are installed or subsequently removed.
  3321. The class renames the conflicting binary in each package and symlinks
  3322. the highest priority binary during installation or removal of packages.
  3323. </para>
  3324. <para>
  3325. To use this class, you need to define a number of variables:
  3326. <itemizedlist>
  3327. <listitem><para><link linkend='var-ALTERNATIVE'><filename>ALTERNATIVE</filename></link>
  3328. </para></listitem>
  3329. <listitem><para><link linkend='var-ALTERNATIVE_LINK_NAME'><filename>ALTERNATIVE_LINK_NAME</filename></link>
  3330. </para></listitem>
  3331. <listitem><para><link linkend='var-ALTERNATIVE_TARGET'><filename>ALTERNATIVE_TARGET</filename></link>
  3332. </para></listitem>
  3333. <listitem><para><link linkend='var-ALTERNATIVE_PRIORITY'><filename>ALTERNATIVE_PRIORITY</filename></link>
  3334. </para></listitem>
  3335. </itemizedlist>
  3336. These variables list alternative commands needed by a package,
  3337. provide pathnames for links, default links for targets, and
  3338. so forth.
  3339. For details on how to use this class, see the comments in the
  3340. <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/update-alternatives.bbclass'><filename>update-alternatives.bbclass</filename></ulink>.
  3341. </para>
  3342. <note>
  3343. You can use the <filename>update-alternatives</filename> command
  3344. directly in your recipes.
  3345. However, this class simplifies things in most cases.
  3346. </note>
  3347. </section>
  3348. <section id='ref-classes-update-rc.d'>
  3349. <title><filename>update-rc.d.bbclass</filename></title>
  3350. <para>
  3351. The <filename>update-rc.d</filename> class uses
  3352. <filename>update-rc.d</filename> to safely install an
  3353. initialization script on behalf of the package.
  3354. The OpenEmbedded build system takes care of details such as making
  3355. sure the script is stopped before a package is removed and started when
  3356. the package is installed.
  3357. </para>
  3358. <para>
  3359. Three variables control this class:
  3360. <filename><link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link></filename>,
  3361. <filename><link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link></filename> and
  3362. <filename><link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link></filename>.
  3363. See the variable links for details.
  3364. </para>
  3365. </section>
  3366. <section id='ref-classes-useradd'>
  3367. <title><filename>useradd*.bbclass</filename></title>
  3368. <para>
  3369. The <filename>useradd*</filename> classes support the addition of users
  3370. or groups for usage by the package on the target.
  3371. For example, if you have packages that contain system services that
  3372. should be run under their own user or group, you can use these classes
  3373. to enable creation of the user or group.
  3374. The <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename>
  3375. recipe in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
  3376. provides a simple example that shows how to add three
  3377. users and groups to two packages.
  3378. See the <filename>useradd-example.bb</filename> recipe for more
  3379. information on how to use these classes.
  3380. </para>
  3381. <para>
  3382. The <filename>useradd_base</filename> class provides basic
  3383. functionality for user or groups settings.
  3384. </para>
  3385. <para>
  3386. The <filename>useradd*</filename> classes support the
  3387. <link linkend='var-USERADD_PACKAGES'><filename>USERADD_PACKAGES</filename></link>,
  3388. <link linkend='var-USERADD_PARAM'><filename>USERADD_PARAM</filename></link>,
  3389. <link linkend='var-GROUPADD_PARAM'><filename>GROUPADD_PARAM</filename></link>,
  3390. and
  3391. <link linkend='var-GROUPMEMS_PARAM'><filename>GROUPMEMS_PARAM</filename></link>
  3392. variables.
  3393. </para>
  3394. <para>
  3395. The <filename>useradd-staticids</filename> class supports the addition
  3396. of users or groups that have static user identification
  3397. (<filename>uid</filename>) and group identification
  3398. (<filename>gid</filename>) values.
  3399. </para>
  3400. <para>
  3401. The default behavior of the OpenEmbedded build system for assigning
  3402. <filename>uid</filename> and <filename>gid</filename> values when
  3403. packages add users and groups during package install time is to
  3404. add them dynamically.
  3405. This works fine for programs that do not care what the values of the
  3406. resulting users and groups become.
  3407. In these cases, the order of the installation determines the final
  3408. <filename>uid</filename> and <filename>gid</filename> values.
  3409. However, if non-deterministic
  3410. <filename>uid</filename> and <filename>gid</filename> values are a
  3411. problem, you can override the default, dynamic application of these
  3412. values by setting static values.
  3413. When you set static values, the OpenEmbedded build system looks in
  3414. <link linkend='var-BBPATH'><filename>BBPATH</filename></link> for
  3415. <filename>files/passwd</filename> and <filename>files/group</filename>
  3416. files for the values.
  3417. </para>
  3418. <para>
  3419. To use static <filename>uid</filename> and <filename>gid</filename>
  3420. values, you need to set some variables.
  3421. See the
  3422. <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>,
  3423. <link linkend='var-USERADD_UID_TABLES'><filename>USERADD_UID_TABLES</filename></link>,
  3424. <link linkend='var-USERADD_GID_TABLES'><filename>USERADD_GID_TABLES</filename></link>,
  3425. and
  3426. <link linkend='var-USERADD_ERROR_DYNAMIC'><filename>USERADD_ERROR_DYNAMIC</filename></link>
  3427. variables.
  3428. You can also see the
  3429. <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
  3430. class for additional information.
  3431. </para>
  3432. <note><title>Notes</title>
  3433. You do not use the <filename>useradd-staticids</filename>
  3434. class directly.
  3435. You either enable or disable the class by setting the
  3436. <filename>USERADDEXTENSION</filename> variable.
  3437. If you enable or disable the class in a configured system,
  3438. <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
  3439. might contain incorrect <filename>uid</filename> and
  3440. <filename>gid</filename> values.
  3441. Deleting the <filename>TMPDIR</filename> directory
  3442. will correct this condition.
  3443. </note>
  3444. </section>
  3445. <section id='ref-classes-utility-tasks'>
  3446. <title><filename>utility-tasks.bbclass</filename></title>
  3447. <para>
  3448. The <filename>utility-tasks</filename> class provides support for
  3449. various "utility" type tasks that are applicable to all recipes,
  3450. such as
  3451. <link linkend='ref-tasks-clean'><filename>do_clean</filename></link> and
  3452. <link linkend='ref-tasks-listtasks'><filename>do_listtasks</filename></link>.
  3453. </para>
  3454. <para>
  3455. This class is enabled by default because it is inherited by
  3456. the
  3457. <link linkend='ref-classes-base'><filename>base</filename></link>
  3458. class.
  3459. </para>
  3460. </section>
  3461. <section id='ref-classes-utils'>
  3462. <title><filename>utils.bbclass</filename></title>
  3463. <para>
  3464. The <filename>utils</filename> class provides some useful Python
  3465. functions that are typically used in inline Python expressions
  3466. (e.g. <filename>${@...}</filename>).
  3467. One example use is for <filename>bb.utils.contains()</filename>.
  3468. </para>
  3469. <para>
  3470. This class is enabled by default because it is inherited by the
  3471. <link linkend='ref-classes-base'><filename>base</filename></link>
  3472. class.
  3473. </para>
  3474. </section>
  3475. <section id='ref-classes-vala'>
  3476. <title><filename>vala.bbclass</filename></title>
  3477. <para>
  3478. The <filename>vala</filename> class supports recipes that need to
  3479. build software written using the Vala programming language.
  3480. </para>
  3481. </section>
  3482. <section id='ref-classes-waf'>
  3483. <title><filename>waf.bbclass</filename></title>
  3484. <para>
  3485. The <filename>waf</filename> class supports recipes that need to build
  3486. software that uses the Waf build system.
  3487. You can use the
  3488. <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
  3489. or
  3490. <link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>
  3491. variables to specify additional configuration options to be passed on
  3492. the Waf command line.
  3493. </para>
  3494. </section>
  3495. <!-- Undocumented classes are:
  3496. image-empty.bbclass (possibly being dropped)
  3497. migrate_localcount.bbclass (still need a description)
  3498. -->
  3499. </chapter>
  3500. <!--
  3501. vim: expandtab tw=80 ts=4
  3502. -->