<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Best practices for customizing Yocto BSP in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/1997463#M230998</link>
    <description>&lt;P&gt;Hello, Tim!&lt;/P&gt;
&lt;P&gt;Both links are now very outdated, with the second one having been decommissioned as information is obsolete for the current Yocto Project.&lt;/P&gt;
&lt;P&gt;I would recommend going to the Yocto Project documentation for reference, which has improved a little since when this question was originally posted.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.yoctoproject.org/next/dev-manual/layers.html" target="_blank"&gt;https://docs.yoctoproject.org/next/dev-manual/layers.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Gustavo&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2024 21:01:58 GMT</pubDate>
    <dc:creator>gusarambula</dc:creator>
    <dc:date>2024-11-19T21:01:58Z</dc:date>
    <item>
      <title>Best practices for customizing Yocto BSP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/652867#M99942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm new to Yocto, and would appreciate some pointers to best practices, as well as corrections of possible misconceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a custom carrier board, which uses the Variscite VAR-SOM-MX6 module which contains an iMX6, DDR, NAND, eMMC, WiFi, BT, touch screen interfaces and so on. Variscite provides a BSP which supports these units together with a carrier board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, we need to change at least the following aspects:&lt;BR /&gt;- Base the distribution on a minimal image, with added packages as necessary (e.g. shell and standard Linux utilities, but no graphical software, web server etc)&lt;BR /&gt;- No screen/keyboard&lt;BR /&gt;- Custom device tree (GPIO mux setup etc)&lt;BR /&gt;- Custom kernel configuration (enable drivers for devices on the carrier board)&lt;BR /&gt;- Custom script configuration (e.g. network setup)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The goal is to be able to efficiently maintain and update these changes, as well as get updates from Variscite when necessary, and finally being able to create images for distribution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I imagine there are several ways to achieve this, and would like opinions on which ones are more feasible (or even possible), and of course other ways if I have missed some.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Use Variscite's BSP, make all changes in local build directory (local.conf)&lt;BR /&gt;2. Copy Varisiscite's BSP and modify to our needs. This one seems to be the most straight-forward, but seems less elegant, and makes it hard to track updates from Variscite&lt;BR /&gt;3. Create a new BSP which refers to Variscite's. I am not sure if a BSP layer can be "on top of" another BSP layer?&lt;BR /&gt;4. Use Variscite's BSP and perform manual modifications (e.g. build kernel out of tree, or modify config settings on deployed image). During my few days of experiments, I have done this, which has been fine for prototyping. However, this is no good solution with regards to efficiency, version control and distribution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 09:25:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/652867#M99942</guid>
      <dc:creator>stian</dc:creator>
      <dc:date>2016-11-11T09:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Best practices for customizing Yocto BSP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/652868#M99943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first option may work for testing, although as you mention it’s not as elegant not as appropriate if you wish to be able to distribute your modified BSP. The fourth option is fine for development but again, not meant for distribution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yocto is indeed not focused on development (in that regard it may be better to work on a local BSP and perform the changes and compile manually until it’s been debugged) but rather on distribution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yocto is meant to be used exactly as you mentioned on the third option, through layers that allow to customize and reuse a lot of code, packages and configurations. You should be able to create a new layer to add patches and packages unique to your customized BSP. There is some information on how to create a new layer on the following community document:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-331917"&gt;https://community.nxp.com/docs/DOC-331917&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should also go through the following training which is simple but very informative and well structured. I’m sure it will help:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-94849"&gt;https://community.nxp.com/docs/DOC-94849&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 15:34:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/652868#M99943</guid>
      <dc:creator>gusarambula</dc:creator>
      <dc:date>2016-11-11T15:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Best practices for customizing Yocto BSP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/1247161#M170982</link>
      <description>&lt;P&gt;The training doesn't seem to be available anymore, is this correct?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 10:54:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/1247161#M170982</guid>
      <dc:creator>lex</dc:creator>
      <dc:date>2021-03-17T10:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Best practices for customizing Yocto BSP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/1997460#M230997</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/184350"&gt;@lex&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/40799"&gt;@gusarambula&lt;/a&gt;&amp;nbsp;it appears the training link is good but requires auth. I am signed into my nxp account, and get the attached error screen.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/139421"&gt;@stian&lt;/a&gt;&amp;nbsp;I am working on a distribution layer to customize variscite-bsp-platform for some new products based on their var-som-iMX8mp, and would love to compare notes and discuss strategies.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 20:44:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/1997460#M230997</guid>
      <dc:creator>timblaktu</dc:creator>
      <dc:date>2024-11-19T20:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Best practices for customizing Yocto BSP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/1997463#M230998</link>
      <description>&lt;P&gt;Hello, Tim!&lt;/P&gt;
&lt;P&gt;Both links are now very outdated, with the second one having been decommissioned as information is obsolete for the current Yocto Project.&lt;/P&gt;
&lt;P&gt;I would recommend going to the Yocto Project documentation for reference, which has improved a little since when this question was originally posted.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.yoctoproject.org/next/dev-manual/layers.html" target="_blank"&gt;https://docs.yoctoproject.org/next/dev-manual/layers.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Gustavo&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 21:01:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/1997463#M230998</guid>
      <dc:creator>gusarambula</dc:creator>
      <dc:date>2024-11-19T21:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Best practices for customizing Yocto BSP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/1997520#M231003</link>
      <description>&lt;P&gt;Man, you are on it! Thanks for the fast response, Gustavo.&lt;/P&gt;&lt;P&gt;The real question here isn't "how to create a layer" or "how to append a recipe" which the documentation explains well, but a higher-level practical question of &lt;STRONG&gt;what is the best way of working with, customizing, and architecting around the existing yocto-based solutions provided by SoC/SoM vendors.&amp;nbsp;&lt;/STRONG&gt;It's nice that they provide yocto solutions for free, but IME they sometimes create confusion by fuzzing the lines between "bsp" and "distribution", and not following the Yocto Project's best practices in their documentation and reference platforms, e.g. using the yocto antipattern of modifying local.conf for customizations.&lt;/P&gt;&lt;P&gt;As I mentioned, I'm using the var-som-imx8mp "machine", with&amp;nbsp;&lt;A href="https://github.com/varigit/variscite-bsp-platform/tree/mickledore" target="_blank"&gt;varigit/variscite-bsp-platform at mickledore&lt;/A&gt;&amp;nbsp;as the "distribution". I was befuddled by their terminology and documentation, and the cognitive dissonance between it and the YP docs, until I forced myself to draw the diagram below, requiring me to dive deep.&amp;nbsp;&lt;/P&gt;&lt;P&gt;variscite-bsp-platform is actually not a BSP. It "has a" BSP, defined in the depths of its `meta-{imx,var}-*-bsp` layers, but it is not a BSP.&amp;nbsp;variscite-bsp-platform is a distribution. Even after understanding this distinction, it is confusing how to move forward with creating one's own distribution layer (per YP best-practices) which "uses" and modifies the variscite-bsp-platform&amp;nbsp;distribution. The canonical "how-to" solution in the variscite documentation is "&lt;SPAN&gt;Add the following line to YOCTO_DIR/BUILD_DIR/conf/local.conf."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;On top of these, the tooling used in these vendor BSPs is heterogenous and IMO a bit archaic:, e.g. using git-repo tool manifests instead of standard git submodules (yes, submodules are standard, folks, get used to it), and not standardizing on modern container tooling like kas.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know the above are not your problem, nor your fault, Gustavo. &lt;LI-EMOJI id="lia_winking-face" title=":winking_face:"&gt;&lt;/LI-EMOJI&gt; I just wanted to provide some context around why I'm here, and perhaps what the OP found confusing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;..and to suggest and solicit feedback on a &lt;STRONG&gt;canonical solution&lt;/STRONG&gt; for future users that like me want to &lt;STRONG&gt;follow YP best practices&lt;/STRONG&gt; while &lt;STRONG&gt;using a vendor-provided yocto "distribution"&lt;/STRONG&gt; which includes the "bsp" layers for "machine"-specific configuration. The approach is defined by the below list of requirements.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;There is a top-level git super-project that refers to all yocto meta layers and other related software projects. This provides an omniscient single source of truth and logical place for e2e/system-level CI.&lt;/LI&gt;&lt;LI&gt;Yocto meta layers are contained in &lt;FONT face="andale mono,times"&gt;yocto/&lt;/FONT&gt; subfolder, and are referred to by git submodules.&lt;OL&gt;&lt;LI&gt;Where git-repo tool is used upstream, encapsulate its super-project in a &lt;FONT face="andale mono,times"&gt;yocto/&amp;lt;repo-tool-layer&amp;gt;/&lt;/FONT&gt; subdirectory. Note that tooling must be updated to install and invoke the repo tool in all the right places, instead of just `&lt;FONT face="andale mono,times"&gt;git clone --recurse-submodules&lt;/FONT&gt;`.&lt;/LI&gt;&lt;LI&gt;I have automation that will convert git-repo based yocto projects to use git submodules, but have yet to work out the entire workflow.&lt;/LI&gt;&lt;LI&gt;Having consistency in this kind of tooling removes much of the barrier to accepting upstream changes, and contributing.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;A new meta-custom-distro layer submodule is created under yocto which defines a new distro named &lt;FONT face="andale mono,times"&gt;custom-distro&lt;/FONT&gt; in the standard &lt;FONT face="andale mono,times"&gt;conf/distro/custom-distro.conf&lt;/FONT&gt; file.&lt;OL&gt;&lt;LI&gt;The distro conf also provides the variable modifications required to implement the desired changes, e.g. tweaking &lt;FONT face="andale mono,times"&gt;DISTRO_FEATURES&lt;/FONT&gt; or &lt;FONT face="andale mono,times"&gt;*IMAGE_INSTALL&lt;/FONT&gt; vars to include or exclude features or packages. Notably, this is the YP best-practice way of customizing a distribution, as opposed to modifying local.conf, or worse, modifying the upstream sources in place without forking.&lt;/LI&gt;&lt;LI&gt;recipes may be added here to refine changes made to variables above, and to add new features, configuration, or packages that are truly specific to the purpose of&amp;nbsp;&lt;FONT face="andale mono,times"&gt;custom-distro&lt;/FONT&gt;.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;That's it. Everything else is not distro-specific, i.e. you can add other meta layers to the project as normal, to add new recipes or append existing ones.&lt;/P&gt;&lt;P&gt;I'd love to hear your feedback on this approach,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/40799"&gt;@gusarambula&lt;/a&gt;&amp;nbsp; or anyone. It all seems pretty standard to me. It was just helpful for me to write this all out explicitly since it goes against the grain of my "bsp platform" vendor's documentation. Thanks for reading my brain dump. &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Visualization of variscite-bsp-platform, which I wish had been called a &amp;quot;variscite-reference-distro&amp;quot;" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/311329iBA603AFE9D9FBBB8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-11-19 151826.png" alt="Visualization of variscite-bsp-platform, which I wish had been called a &amp;quot;variscite-reference-distro&amp;quot;" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Visualization of variscite-bsp-platform, which I wish had been called a "variscite-reference-distro"&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 23:29:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Best-practices-for-customizing-Yocto-BSP/m-p/1997520#M231003</guid>
      <dc:creator>timblaktu</dc:creator>
      <dc:date>2024-11-19T23:29:00Z</dc:date>
    </item>
  </channel>
</rss>

