kernel-dev-concepts-appx.xml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  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. <!--SPDX-License-Identifier: CC-BY-2.0-UK-->
  5. <appendix id='kernel-dev-concepts-appx'>
  6. <title>Advanced Kernel Concepts</title>
  7. <section id='kernel-big-picture'>
  8. <title>Yocto Project Kernel Development and Maintenance</title>
  9. <para>
  10. Kernels available through the Yocto Project (Yocto Linux kernels),
  11. like other kernels, are based off the Linux kernel releases from
  12. <ulink url='http://www.kernel.org'></ulink>.
  13. At the beginning of a major Linux kernel development cycle, the
  14. Yocto Project team chooses a Linux kernel based on factors such as
  15. release timing, the anticipated release timing of final upstream
  16. <filename>kernel.org</filename> versions, and Yocto Project
  17. feature requirements.
  18. Typically, the Linux kernel chosen is in the final stages of
  19. development by the Linux community.
  20. In other words, the Linux kernel is in the release candidate
  21. or "rc" phase and has yet to reach final release.
  22. But, by being in the final stages of external development, the
  23. team knows that the <filename>kernel.org</filename> final release
  24. will clearly be within the early stages of the Yocto Project
  25. development window.
  26. </para>
  27. <para>
  28. This balance allows the Yocto Project team to deliver the most
  29. up-to-date Yocto Linux kernel possible, while still ensuring that
  30. the team has a stable official release for the baseline Linux
  31. kernel version.
  32. </para>
  33. <para>
  34. As implied earlier, the ultimate source for Yocto Linux kernels
  35. are released kernels from <filename>kernel.org</filename>.
  36. In addition to a foundational kernel from
  37. <filename>kernel.org</filename>, the available Yocto Linux kernels
  38. contain a mix of important new mainline developments, non-mainline
  39. developments (when no alternative exists), Board Support Package
  40. (BSP) developments, and custom features.
  41. These additions result in a commercially released Yocto
  42. Project Linux kernel that caters to specific embedded designer
  43. needs for targeted hardware.
  44. </para>
  45. <para>
  46. You can find a web interface to the Yocto Linux kernels in the
  47. <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
  48. at
  49. <ulink url='&YOCTO_GIT_URL;'></ulink>.
  50. If you look at the interface, you will see to the left a
  51. grouping of Git repositories titled "Yocto Linux Kernel".
  52. Within this group, you will find several Linux Yocto kernels
  53. developed and included with Yocto Project releases:
  54. <itemizedlist>
  55. <listitem><para>
  56. <emphasis><filename>linux-yocto-4.1</filename>:</emphasis>
  57. The stable Yocto Project kernel to use with the Yocto
  58. Project Release 2.0.
  59. This kernel is based on the Linux 4.1 released kernel.
  60. </para></listitem>
  61. <listitem><para>
  62. <emphasis><filename>linux-yocto-4.4</filename>:</emphasis>
  63. The stable Yocto Project kernel to use with the Yocto
  64. Project Release 2.1.
  65. This kernel is based on the Linux 4.4 released kernel.
  66. </para></listitem>
  67. <listitem><para>
  68. <emphasis><filename>linux-yocto-4.6</filename>:</emphasis>
  69. A temporary kernel that is not tied to any Yocto Project
  70. release.
  71. </para></listitem>
  72. <listitem><para>
  73. <emphasis><filename>linux-yocto-4.8</filename>:</emphasis>
  74. The stable yocto Project kernel to use with the Yocto
  75. Project Release 2.2.
  76. </para></listitem>
  77. <listitem><para>
  78. <emphasis><filename>linux-yocto-4.9</filename>:</emphasis>
  79. The stable Yocto Project kernel to use with the Yocto
  80. Project Release 2.3.
  81. This kernel is based on the Linux 4.9 released kernel.
  82. </para></listitem>
  83. <listitem><para>
  84. <emphasis><filename>linux-yocto-4.10</filename>:</emphasis>
  85. The default stable Yocto Project kernel to use with the
  86. Yocto Project Release 2.3.
  87. This kernel is based on the Linux 4.10 released kernel.
  88. </para></listitem>
  89. <listitem><para>
  90. <emphasis><filename>linux-yocto-4.12</filename>:</emphasis>
  91. The default stable Yocto Project kernel to use with the
  92. Yocto Project Release 2.4.
  93. This kernel is based on the Linux 4.12 released kernel.
  94. </para></listitem>
  95. <listitem><para>
  96. <emphasis><filename>yocto-kernel-cache</filename>:</emphasis>
  97. The <filename>linux-yocto-cache</filename> contains
  98. patches and configurations for the linux-yocto kernel
  99. tree.
  100. This repository is useful when working on the linux-yocto
  101. kernel.
  102. For more information on this "Advanced Kernel Metadata",
  103. see the
  104. "<link linkend='kernel-dev-advanced'>Working With Advanced Metadata (<filename>yocto-kernel-cache</filename>)</link>"
  105. Chapter.
  106. </para></listitem>
  107. <listitem><para>
  108. <emphasis><filename>linux-yocto-dev</filename>:</emphasis>
  109. A development kernel based on the latest upstream release
  110. candidate available.
  111. </para></listitem>
  112. </itemizedlist>
  113. <note><title>Notes</title>
  114. Long Term Support Initiative (LTSI) for Yocto Linux
  115. kernels is as follows:
  116. <itemizedlist>
  117. <listitem><para>
  118. For Yocto Project releases 1.7, 1.8, and 2.0,
  119. the LTSI kernel is
  120. <filename>linux-yocto-3.14</filename>.
  121. </para></listitem>
  122. <listitem><para>
  123. For Yocto Project releases 2.1, 2.2, and 2.3,
  124. the LTSI kernel is <filename>linux-yocto-4.1</filename>.
  125. </para></listitem>
  126. <listitem><para>
  127. For Yocto Project release 2.4, the LTSI kernel is
  128. <filename>linux-yocto-4.9</filename>
  129. </para></listitem>
  130. <listitem><para>
  131. <filename>linux-yocto-4.4</filename> is an LTS
  132. kernel.
  133. </para></listitem>
  134. </itemizedlist>
  135. </note>
  136. </para>
  137. <para>
  138. Once a Yocto Linux kernel is officially released, the Yocto
  139. Project team goes into their next development cycle, or upward
  140. revision (uprev) cycle, while still continuing maintenance on the
  141. released kernel.
  142. It is important to note that the most sustainable and stable way
  143. to include feature development upstream is through a kernel uprev
  144. process.
  145. Back-porting hundreds of individual fixes and minor features from
  146. various kernel versions is not sustainable and can easily
  147. compromise quality.
  148. </para>
  149. <para>
  150. During the uprev cycle, the Yocto Project team uses an ongoing
  151. analysis of Linux kernel development, BSP support, and release
  152. timing to select the best possible <filename>kernel.org</filename>
  153. Linux kernel version on which to base subsequent Yocto Linux
  154. kernel development.
  155. The team continually monitors Linux community kernel development
  156. to look for significant features of interest.
  157. The team does consider back-porting large features if they have a
  158. significant advantage.
  159. User or community demand can also trigger a back-port or creation
  160. of new functionality in the Yocto Project baseline kernel during
  161. the uprev cycle.
  162. </para>
  163. <para>
  164. Generally speaking, every new Linux kernel both adds features and
  165. introduces new bugs.
  166. These consequences are the basic properties of upstream
  167. Linux kernel development and are managed by the Yocto Project
  168. team's Yocto Linux kernel development strategy.
  169. It is the Yocto Project team's policy to not back-port minor
  170. features to the released Yocto Linux kernel.
  171. They only consider back-porting significant technological
  172. jumps &dash; and, that is done after a complete gap analysis.
  173. The reason for this policy is that back-porting any small to
  174. medium sized change from an evolving Linux kernel can easily
  175. create mismatches, incompatibilities and very subtle errors.
  176. </para>
  177. <para>
  178. The policies described in this section result in both a stable
  179. and a cutting edge Yocto Linux kernel that mixes forward ports of
  180. existing Linux kernel features and significant and critical new
  181. functionality.
  182. Forward porting Linux kernel functionality into the Yocto Linux
  183. kernels available through the Yocto Project can be thought of as
  184. a "micro uprev."
  185. The many "micro uprevs" produce a Yocto Linux kernel version with
  186. a mix of important new mainline, non-mainline, BSP developments
  187. and feature integrations.
  188. This Yocto Linux kernel gives insight into new features and
  189. allows focused amounts of testing to be done on the kernel,
  190. which prevents surprises when selecting the next major uprev.
  191. The quality of these cutting edge Yocto Linux kernels is evolving
  192. and the kernels are used in leading edge feature and BSP
  193. development.
  194. </para>
  195. </section>
  196. <section id='yocto-linux-kernel-architecture-and-branching-strategies'>
  197. <title>Yocto Linux Kernel Architecture and Branching Strategies</title>
  198. <para>
  199. As mentioned earlier, a key goal of the Yocto Project is
  200. to present the developer with a kernel that has a clear and
  201. continuous history that is visible to the user.
  202. The architecture and mechanisms, in particular the branching
  203. strategies, used achieve that goal in a manner similar to
  204. upstream Linux kernel development in
  205. <filename>kernel.org</filename>.
  206. </para>
  207. <para>
  208. You can think of a Yocto Linux kernel as consisting of a
  209. baseline Linux kernel with added features logically structured
  210. on top of the baseline.
  211. The features are tagged and organized by way of a branching
  212. strategy implemented by the Yocto Project team using the
  213. Source Code Manager (SCM) Git.
  214. <note><title>Notes</title>
  215. <itemizedlist>
  216. <listitem><para>
  217. Git is the obvious SCM for meeting the Yocto Linux
  218. kernel organizational and structural goals described
  219. in this section.
  220. Not only is Git the SCM for Linux kernel development in
  221. <filename>kernel.org</filename> but, Git continues to
  222. grow in popularity and supports many different work
  223. flows, front-ends and management techniques.
  224. </para></listitem>
  225. <listitem><para>
  226. You can find documentation on Git at
  227. <ulink url='http://git-scm.com/documentation'></ulink>.
  228. You can also get an introduction to Git as it
  229. applies to the Yocto Project in the
  230. "<ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>"
  231. section in the Yocto Project Overview and Concepts
  232. Manual.
  233. The latter reference provides an overview of
  234. Git and presents a minimal set of Git commands
  235. that allows you to be functional using Git.
  236. You can use as much, or as little, of what Git
  237. has to offer to accomplish what you need for your
  238. project.
  239. You do not have to be a "Git Expert" in order to
  240. use it with the Yocto Project.
  241. </para></listitem>
  242. </itemizedlist>
  243. </note>
  244. </para>
  245. <para>
  246. Using Git's tagging and branching features, the Yocto Project
  247. team creates kernel branches at points where functionality is
  248. no longer shared and thus, needs to be isolated.
  249. For example, board-specific incompatibilities would require
  250. different functionality and would require a branch to
  251. separate the features.
  252. Likewise, for specific kernel features, the same branching
  253. strategy is used.
  254. </para>
  255. <para>
  256. This "tree-like" architecture results in a structure that has
  257. features organized to be specific for particular functionality,
  258. single kernel types, or a subset of kernel types.
  259. Thus, the user has the ability to see the added features and the
  260. commits that make up those features.
  261. In addition to being able to see added features, the user
  262. can also view the history of what made up the baseline
  263. Linux kernel.
  264. </para>
  265. <para>
  266. Another consequence of this strategy results in not having to
  267. store the same feature twice internally in the tree.
  268. Rather, the kernel team stores the unique differences required
  269. to apply the feature onto the kernel type in question.
  270. <note>
  271. The Yocto Project team strives to place features in the tree
  272. such that features can be shared by all boards and kernel
  273. types where possible.
  274. However, during development cycles or when large features
  275. are merged, the team cannot always follow this practice.
  276. In those cases, the team uses isolated branches to merge
  277. features.
  278. </note>
  279. </para>
  280. <para>
  281. BSP-specific code additions are handled in a similar manner to
  282. kernel-specific additions.
  283. Some BSPs only make sense given certain kernel types.
  284. So, for these types, the team creates branches off the end
  285. of that kernel type for all of the BSPs that are supported on
  286. that kernel type.
  287. From the perspective of the tools that create the BSP branch,
  288. the BSP is really no different than a feature.
  289. Consequently, the same branching strategy applies to BSPs as
  290. it does to kernel features.
  291. So again, rather than store the BSP twice, the team only
  292. stores the unique differences for the BSP across the supported
  293. multiple kernels.
  294. </para>
  295. <para>
  296. While this strategy can result in a tree with a significant number
  297. of branches, it is important to realize that from the developer's
  298. point of view, there is a linear path that travels from the
  299. baseline <filename>kernel.org</filename>, through a select
  300. group of features and ends with their BSP-specific commits.
  301. In other words, the divisions of the kernel are transparent and
  302. are not relevant to the developer on a day-to-day basis.
  303. From the developer's perspective, this path is the "master" branch
  304. in Git terms.
  305. The developer does not need to be aware of the existence of any
  306. other branches at all.
  307. Of course, value exists in the having these branches in the tree,
  308. should a person decide to explore them.
  309. For example, a comparison between two BSPs at either the commit
  310. level or at the line-by-line code <filename>diff</filename> level
  311. is now a trivial operation.
  312. </para>
  313. <para>
  314. The following illustration shows the conceptual Yocto
  315. Linux kernel.
  316. <imagedata fileref="figures/kernel-architecture-overview.png" width="6in" depth="7in" align="center" scale="100" />
  317. </para>
  318. <para>
  319. In the illustration, the "Kernel.org Branch Point" marks the
  320. specific spot (or Linux kernel release) from which the
  321. Yocto Linux kernel is created.
  322. From this point forward in the tree, features and differences
  323. are organized and tagged.
  324. </para>
  325. <para>
  326. The "Yocto Project Baseline Kernel" contains functionality that
  327. is common to every kernel type and BSP that is organized
  328. further along in the tree.
  329. Placing these common features in the tree this way means
  330. features do not have to be duplicated along individual
  331. branches of the tree structure.
  332. </para>
  333. <para>
  334. From the "Yocto Project Baseline Kernel", branch points represent
  335. specific functionality for individual Board Support Packages
  336. (BSPs) as well as real-time kernels.
  337. The illustration represents this through three BSP-specific
  338. branches and a real-time kernel branch.
  339. Each branch represents some unique functionality for the BSP
  340. or for a real-time Yocto Linux kernel.
  341. </para>
  342. <para>
  343. In this example structure, the "Real-time (rt) Kernel" branch has
  344. common features for all real-time Yocto Linux kernels and
  345. contains more branches for individual BSP-specific real-time
  346. kernels.
  347. The illustration shows three branches as an example.
  348. Each branch points the way to specific, unique features for a
  349. respective real-time kernel as they apply to a given BSP.
  350. </para>
  351. <para>
  352. The resulting tree structure presents a clear path of markers
  353. (or branches) to the developer that, for all practical
  354. purposes, is the Yocto Linux kernel needed for any given set of
  355. requirements.
  356. <note>
  357. Keep in mind the figure does not take into account all the
  358. supported Yocto Linux kernels, but rather shows a single
  359. generic kernel just for conceptual purposes.
  360. Also keep in mind that this structure represents the Yocto
  361. Project
  362. <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
  363. that are either pulled from during the build or established
  364. on the host development system prior to the build by either
  365. cloning a particular kernel's Git repository or by
  366. downloading and unpacking a tarball.
  367. </note>
  368. </para>
  369. <para>
  370. Working with the kernel as a structured tree follows recognized
  371. community best practices.
  372. In particular, the kernel as shipped with the product, should be
  373. considered an "upstream source" and viewed as a series of
  374. historical and documented modifications (commits).
  375. These modifications represent the development and stabilization
  376. done by the Yocto Project kernel development team.
  377. </para>
  378. <para>
  379. Because commits only change at significant release points in the
  380. product life cycle, developers can work on a branch created
  381. from the last relevant commit in the shipped Yocto Project Linux
  382. kernel.
  383. As mentioned previously, the structure is transparent to the
  384. developer because the kernel tree is left in this state after
  385. cloning and building the kernel.
  386. </para>
  387. </section>
  388. <section id='kernel-build-file-hierarchy'>
  389. <title>Kernel Build File Hierarchy</title>
  390. <para>
  391. Upstream storage of all the available kernel source code is
  392. one thing, while representing and using the code on your host
  393. development system is another.
  394. Conceptually, you can think of the kernel source repositories
  395. as all the source files necessary for all the supported
  396. Yocto Linux kernels.
  397. As a developer, you are just interested in the source files
  398. for the kernel on which you are working.
  399. And, furthermore, you need them available on your host system.
  400. </para>
  401. <para>
  402. Kernel source code is available on your host system several
  403. different ways:
  404. <itemizedlist>
  405. <listitem><para>
  406. <emphasis>Files Accessed While using <filename>devtool</filename>:</emphasis>
  407. <filename>devtool</filename>, which is available with the
  408. Yocto Project, is the preferred method by which to
  409. modify the kernel.
  410. See the
  411. "<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>"
  412. section.
  413. </para></listitem>
  414. <listitem><para>
  415. <emphasis>Cloned Repository:</emphasis>
  416. If you are working in the kernel all the time, you probably
  417. would want to set up your own local Git repository of the
  418. Yocto Linux kernel tree.
  419. For information on how to clone a Yocto Linux kernel
  420. Git repository, see the
  421. "<link linkend='preparing-the-build-host-to-work-on-the-kernel'>Preparing the Build Host to Work on the Kernel</link>"
  422. section.
  423. </para></listitem>
  424. <listitem><para>
  425. <emphasis>Temporary Source Files from a Build:</emphasis>
  426. If you just need to make some patches to the kernel using
  427. a traditional BitBake workflow (i.e. not using the
  428. <filename>devtool</filename>), you can access temporary
  429. kernel source files that were extracted and used during
  430. a kernel build.
  431. </para></listitem>
  432. </itemizedlist>
  433. </para>
  434. <para>
  435. The temporary kernel source files resulting from a build using
  436. BitBake have a particular hierarchy.
  437. When you build the kernel on your development system, all files
  438. needed for the build are taken from the source repositories
  439. pointed to by the
  440. <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
  441. variable and gathered in a temporary work area where they are
  442. subsequently used to create the unique kernel.
  443. Thus, in a sense, the process constructs a local source tree
  444. specific to your kernel from which to generate the new kernel
  445. image.
  446. </para>
  447. <para>
  448. The following figure shows the temporary file structure
  449. created on your host system when you build the kernel using
  450. Bitbake.
  451. This
  452. <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
  453. contains all the source files used during the build.
  454. <imagedata fileref="figures/kernel-overview-2-generic.png"
  455. width="6in" depth="5in" align="center" scale="100" />
  456. </para>
  457. <para>
  458. Again, for additional information on the Yocto Project kernel's
  459. architecture and its branching strategy, see the
  460. "<link linkend='yocto-linux-kernel-architecture-and-branching-strategies'>Yocto Linux Kernel Architecture and Branching Strategies</link>"
  461. section.
  462. You can also reference the
  463. "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
  464. and
  465. "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
  466. sections for detailed example that modifies the kernel.
  467. </para>
  468. </section>
  469. <section id='determining-hardware-and-non-hardware-features-for-the-kernel-configuration-audit-phase'>
  470. <title>Determining Hardware and Non-Hardware Features for the Kernel Configuration Audit Phase</title>
  471. <para>
  472. This section describes part of the kernel configuration audit
  473. phase that most developers can ignore.
  474. For general information on kernel configuration including
  475. <filename>menuconfig</filename>, <filename>defconfig</filename>
  476. files, and configuration fragments, see the
  477. "<link linkend='configuring-the-kernel'>Configuring the Kernel</link>"
  478. section.
  479. </para>
  480. <para>
  481. During this part of the audit phase, the contents of the final
  482. <filename>.config</filename> file are compared against the
  483. fragments specified by the system.
  484. These fragments can be system fragments, distro fragments,
  485. or user-specified configuration elements.
  486. Regardless of their origin, the OpenEmbedded build system
  487. warns the user if a specific option is not included in the
  488. final kernel configuration.
  489. </para>
  490. <para>
  491. By default, in order to not overwhelm the user with
  492. configuration warnings, the system only reports missing
  493. "hardware" options as they could result in a boot
  494. failure or indicate that important hardware is not available.
  495. </para>
  496. <para>
  497. To determine whether or not a given option is "hardware" or
  498. "non-hardware", the kernel Metadata in
  499. <filename>yocto-kernel-cache</filename> contains files that
  500. classify individual or groups of options as either hardware
  501. or non-hardware.
  502. To better show this, consider a situation where the
  503. <filename>yocto-kernel-cache</filename> contains the following
  504. files:
  505. <literallayout class='monospaced'>
  506. yocto-kernel-cache/features/drm-psb/hardware.cfg
  507. yocto-kernel-cache/features/kgdb/hardware.cfg
  508. yocto-kernel-cache/ktypes/base/hardware.cfg
  509. yocto-kernel-cache/bsp/mti-malta32/hardware.cfg
  510. yocto-kernel-cache/bsp/qemu-ppc32/hardware.cfg
  511. yocto-kernel-cache/bsp/qemuarma9/hardware.cfg
  512. yocto-kernel-cache/bsp/mti-malta64/hardware.cfg
  513. yocto-kernel-cache/bsp/arm-versatile-926ejs/hardware.cfg
  514. yocto-kernel-cache/bsp/common-pc/hardware.cfg
  515. yocto-kernel-cache/bsp/common-pc-64/hardware.cfg
  516. yocto-kernel-cache/features/rfkill/non-hardware.cfg
  517. yocto-kernel-cache/ktypes/base/non-hardware.cfg
  518. yocto-kernel-cache/features/aufs/non-hardware.kcf
  519. yocto-kernel-cache/features/ocf/non-hardware.kcf
  520. yocto-kernel-cache/ktypes/base/non-hardware.kcf
  521. yocto-kernel-cache/ktypes/base/hardware.kcf
  522. yocto-kernel-cache/bsp/qemu-ppc32/hardware.kcf
  523. </literallayout>
  524. The following list provides explanations for the various
  525. files:
  526. <itemizedlist>
  527. <listitem><para>
  528. <filename>hardware.kcf</filename>:
  529. Specifies a list of kernel Kconfig files that contain
  530. hardware options only.
  531. </para></listitem>
  532. <listitem><para>
  533. <filename>non-hardware.kcf</filename>:
  534. Specifies a list of kernel Kconfig files that contain
  535. non-hardware options only.
  536. </para></listitem>
  537. <listitem><para>
  538. <filename>hardware.cfg</filename>:
  539. Specifies a list of kernel <filename>CONFIG_</filename>
  540. options that are hardware, regardless of whether or not
  541. they are within a Kconfig file specified by a hardware
  542. or non-hardware Kconfig file (i.e.
  543. <filename>hardware.kcf</filename> or
  544. <filename>non-hardware.kcf</filename>).
  545. </para></listitem>
  546. <listitem><para>
  547. <filename>non-hardware.cfg</filename>:
  548. Specifies a list of kernel <filename>CONFIG_</filename>
  549. options that are not hardware, regardless of whether or
  550. not they are within a Kconfig file specified by a
  551. hardware or non-hardware Kconfig file (i.e.
  552. <filename>hardware.kcf</filename> or
  553. <filename>non-hardware.kcf</filename>).
  554. </para></listitem>
  555. </itemizedlist>
  556. Here is a specific example using the
  557. <filename>kernel-cache/bsp/mti-malta32/hardware.cfg</filename>:
  558. <literallayout class='monospaced'>
  559. CONFIG_SERIAL_8250
  560. CONFIG_SERIAL_8250_CONSOLE
  561. CONFIG_SERIAL_8250_NR_UARTS
  562. CONFIG_SERIAL_8250_PCI
  563. CONFIG_SERIAL_CORE
  564. CONFIG_SERIAL_CORE_CONSOLE
  565. CONFIG_VGA_ARB
  566. </literallayout>
  567. The kernel configuration audit automatically detects these
  568. files (hence the names must be exactly the ones discussed here),
  569. and uses them as inputs when generating warnings about the
  570. final <filename>.config</filename> file.
  571. </para>
  572. <para>
  573. A user-specified kernel Metadata repository, or recipe space
  574. feature, can use these same files to classify options that are
  575. found within its <filename>.cfg</filename> files as hardware
  576. or non-hardware, to prevent the OpenEmbedded build system from
  577. producing an error or warning when an option is not in the
  578. final <filename>.config</filename> file.
  579. </para>
  580. </section>
  581. </appendix>
  582. <!--
  583. vim: expandtab tw=80 ts=4
  584. -->