yocto-project-compatible.rst 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. ************************
  3. Yocto Project Compatible
  4. ************************
  5. ============
  6. Introduction
  7. ============
  8. After the introduction of layers to OpenEmbedded, it quickly became clear
  9. that while some layers were popular and worked well, others developed a
  10. reputation for being "problematic". Those were layers which didn't
  11. interoperate well with others and tended to assume they controlled all
  12. the aspects of the final output. This usually isn't intentional but happens
  13. because such layers are often created by developers with a particular focus
  14. (e.g. a company's :term:`BSP<Board Support Package (BSP)>`) whilst the end
  15. users have a different one (e.g. integrating that
  16. :term:`BSP<Board Support Package (BSP)>` into a product).
  17. As a result of noticing such patterns and friction between layers, the project
  18. developed the "Yocto Project Compatible" badge program, allowing layers
  19. following the best known practises to be marked as being widely compatible
  20. with other ones. This takes the form of a set of "yes/no" binary answer
  21. questions where layers can declare if they meet the appropriate criteria.
  22. In the second version of the program, a script was added to make validation
  23. easier and clearer, the script is called ``yocto-check-layer`` and is
  24. available in :term:`OpenEmbedded-Core (OE-Core)`.
  25. See :ref:`dev-manual/layers:making sure your layer is compatible with yocto project`
  26. for details.
  27. ========
  28. Benefits
  29. ========
  30. :ref:`overview-manual/yp-intro:the yocto project layer model` is powerful
  31. and flexible: it gives users the ultimate power to change pretty much any
  32. aspect of the system but as with most things, power comes with responsibility.
  33. The Yocto Project would like to see people able to mix and match BSPs with
  34. distro configs or software stacks and be able to merge succesfully.
  35. Over time, the project identified characteristics in layers that allow them
  36. to operate well together. "anti-patterns" were also found, preventing layers
  37. from working well together.
  38. The intent of the compatibility program is simple: if the layer passes the
  39. compatibility tests, it is considered "well behaved" and should operate
  40. and cooperate well with other compatible layers.
  41. The benefits of compatibility can be seen from multiple different user and
  42. member perspectives. From a hardware perspective
  43. (a :ref:`overview-manual/concepts:bsp layer`), compatibility means the
  44. hardware can be used in many different products and use cases without
  45. impacting the software stacks being run with it. For a company developing
  46. a product, compatibility gives you a specification / standard you can
  47. require in a contract and then know it will have certain desired
  48. characteristics for interoperability. It also puts constraints on how invasive
  49. the code bases are into the rest of the system, meaning that multiple
  50. different separate hardware support layers can coexist (e.g. for multiple
  51. product lines from different hardware manufacturers). This can also make it
  52. easier for one or more parties to upgrade those system components for security
  53. purposes during the lifecycle of a product.
  54. ==================
  55. Validating a layer
  56. ==================
  57. The badges are available to members of the Yocto Project (as member benefit)
  58. and to open source projects run on a non-commercial basis. However, anyone can
  59. answer the questions and run the script.
  60. The project encourages all layer maintainers to review the questions and the
  61. output from the script against their layer, as the way some layers are
  62. constructed often has unintended consequences. The questions and the script
  63. are designed to highlight known issues which are often easy to solve. This
  64. makes layers easier to use and therefore more popular.
  65. It is intended that over time, the tests will evolve as new best known
  66. practices are identified, and as new interoperability issues are found,
  67. unnecessarily restricting layer interoperability. If anyone becomes aware of
  68. either type, please let the project know through the
  69. :yocto_home:`technical calls </public-virtual-meetings/>`,
  70. the :yocto_home:`mailing lists </community/mailing-lists/>`
  71. or through the :oe_wiki:`Technical Steering Committee (TSC) </TSC>`.
  72. The TSC is responsible for the technical criteria used by the program.
  73. Layers are divided into three types:
  74. - :ref:`"BSP" or "hardware support"<overview-manual/concepts:bsp layer>`
  75. layers contain support for particular pieces of hardware. This includes
  76. kernel and boot loader configuration, and any recipes for firmware or
  77. kernel modules needed for the hardware. Such layers usually correspond
  78. to a :term:`MACHINE` setting.
  79. - :ref:`"distro" layers<overview-manual/concepts:distro layer>` defined
  80. as layers providing configuration options and settings such as the
  81. choice of init system, compiler and optimisation options, and
  82. configuration and choices of software components. This would usually
  83. correspond to a :term:`DISTRO` setting.
  84. - "software" layers are usually recipes. A layer might target a
  85. particular graphical UI or software stack component.
  86. Here are key best practices the program tries to encourage:
  87. - A layer should clearly show who maintains it, and who change
  88. submissions and bug reports should be sent to.
  89. - Where multiple types of functionality are present, the layer should
  90. be internally divided into sublayers to separate these components.
  91. That's because some users may only need one of them and separability
  92. is a key best practice.
  93. - Adding a layer to a build should not modify that build, unless the
  94. user changes a configuration setting to activate the layer, by selecting
  95. a :term:`MACHINE`, a :term:`DISTRO` or a :term:`DISTRO_FEATURES` setting.
  96. - Layers should be documenting where they don’t support normal "core"
  97. functionality such as where debug symbols are disabled or missing, where
  98. development headers and on-target library usage may not work or where
  99. functionality like the SDK/eSDK would not be expected to work.
  100. The project does test the compatibility status of the core project layers on
  101. its :doc:`Autobuilder </test-manual/understand-autobuilder>`.
  102. The official form to submit compatibility requests with is at
  103. :yocto_home:`/ecosystem/branding/compatible-registration/`.
  104. Applicants can display the badge they get when their application is successful.