Difference between revisions of "How to create your own distribution"

[quality revision] [quality revision]
 
m
 

Template:ArticleMainWriter

Template:ArticleApprovedVersion

1 Article purpose[edit]

The purpose of this article is to describe the basic steps required to create your own distribution.

2 Prerequisites[edit]

OpenSTLinux distribution must be installed and into the board Flash memory(ies).

3 Creating your own distribution[edit]

As recommended in Yocto user manual [1], you may create your own distribution in order not to alter any original distribution Metadata, while gaining more control over package alternative selections, compile-time options, and other low-level configurations.


The basic steps for creating a distribution are detailed in the below chapter.

More details can be found in Yocto Mega manual/Creating your own distribution[1].

3.1 Creating a layer for a new distro[edit]

Please read the How to create a new open embedded layer article.

3.2 Creating the distribution configuration file[edit]

Some configuration examples are provided in ST distribution under: <path of OpenSTLinux distribution delivery>/meta-st/meta-st-openstlinux/conf/distro/*.conf

3.3 Providing miscellaneous variables[edit]

Some miscellaneous variable examples are provided under : <path of OpenSTLinux distribution delivery>/meta-st/meta-st-openstlinux/conf/distro/include/st-default-distro*.inc files


All meta-st-openstlinux distro layer configuration files presented above are located here:

distro            
├── include  
│   ├── exception-gplv3.inc
│   ├── openstlinux.inc
│   ├── Template:Highlight2st-default-distro-providers.inc
│   ├── Template:Highlight2st-default-distro-rules.inc
├── openstlinux-eglfs.conf
├── Template:Highlight2openstlinux-weston.conf
├── openstlinux-x11.conf
└── [...]

3.4 Adding more to the layer if necessary[edit]

More add-on component examples:

  • recipes for installing distro-specific configuration files
  • any image recipes specific to user distribution
  • a psplash append file for a branded splash screen
  • any other append files to make custom changes

Some examples of such add-on components can be found in <path of OpenSTLinux distribution delivery>/meta-st/meta-st-openstlinux, you will retrieve some examples of these addons.

ST has already added some recipes (*bbappend) in openstlinux-weston distribution for configuring, patching, ... (non-exhaustive list shown below):

  • recipes-benchmark for glmark2
  • recipes-connectivity for bluez5
  • recipes-core for busybox
  • recipes-graphics for weston-init

...

Some other added components (*bb) are more specific: images, system services, ... (non-exhaustive list shown below):

  • recipes-core for psplash screen, systemd services
  • recipes-samples for example images
  • recipes-security for OP-TEE userland part

...

3.5 Use of meta-st-stm32mp with a core image[edit]

If you want to use the meta-st-stm32mp layer with a core image (nodistro mode), please apply the following steps to manage the dependencies between layers:

PC $> source layers/openembedded-core/oe-init-build-env 
PC $> bitbake-layers add-layer ../layers/meta-openembedded/meta-oe
PC $> bitbake-layers add-layer ../layers/meta-openembedded/meta-python
PC $> bitbake-layers add-layer ../layers/meta-st/meta-st-stm32mp
PC $> bitbake core-image-base or bitbake core-image-minimal

4 Reference list[edit]



<noinclude>

{{ArticleMainWriter|ChristopheM}}

 {{ ArticleApprovedVersion|ChristopheM| NathalieS, BernardP, ChristopheP, Jean-ChristopheT, DenisH |No previous approved version| BrunoB - 21Sep'18 - 8445 | 21Sep'18 }} 

[[Category:How to customize software]]
</noinclude>

==Article purpose==
The purpose of this article is to describe the basic steps required to create your own distribution.<br>


==Prerequisites==
OpenSTLinux distribution must be installed and into the board Flash memory(ies).

==Creating your own distribution==
As recommended in Yocto user manual <ref name="Yocto mega manual"> [https://www.yoctoproject.org/docs/2.4/{{DocSource | domain=Yocto Project | path=mega-manual/mega-manual.html#creating-your-own-distribution | text=Yocto Megamanual Creating your own distribution]}}</ref>, you may create your own distribution in order not to alter any original distribution Metadata, while gaining more control over package alternative selections, compile-time options, and other low-level configurations.

The basic steps for creating a distribution are detailed in the below chapter. 

More details can be found in  ''Yocto Mega manual/Creating your own distribution''<ref name="Yocto mega manual"/>.  

===Creating a layer for a new distro===
Please read the [[How to create a new open embedded layer]] article.

===Creating the distribution configuration file===
Some configuration examples are provided in ST distribution under: '''<path of OpenSTLinux distribution delivery>/meta-st/meta-st-openstlinux/conf/distro/*.conf'''

===Providing miscellaneous variables===
Some miscellaneous variable examples are provided under : '''<path of OpenSTLinux distribution delivery>/meta-st/meta-st-openstlinux/conf/distro/include/st-default-distro*.inc files'''

All meta-st-openstlinux distro layer configuration files presented above are located here:
 {{Highlight|distro}}            
 ├── {{Highlight|include}}  
 │   ├── exception-gplv3.inc
 │   ├── openstlinux.inc
 │   ├── {{Highlight2HighlightParam|st-default-distro-providers.inc}}
 │   ├── {{Highlight2HighlightParam|st-default-distro-rules.inc}}
 ├── openstlinux-eglfs.conf
 ├── {{Highlight2HighlightParam|openstlinux-weston.conf}}
 ├── openstlinux-x11.conf
 └── [...]

===Adding more to the layer if necessary===
More add-on component examples: 
* recipes for installing distro-specific configuration files

* any image recipes specific to user distribution
* a ''psplash append file'' for a branded splash screen

* any other append files to make custom changes

Some examples of such add-on components can be found in '''<path of OpenSTLinux distribution delivery>/meta-st/meta-st-openstlinux, you will retrieve some examples of these addons.'''<br>


ST has already added some recipes (*bbappend) in openstlinux-weston distribution for configuring, patching, ... (non-exhaustive list shown below): 
* recipes-benchmark for ''glmark2''
* recipes-connectivity for ''bluez5''
* recipes-core for ''busybox''
* recipes-graphics for ''weston-init''
...<br>


Some other added components (*bb) are more specific: images, system services, ... (non-exhaustive list shown below):
* recipes-core for ''psplash screen'', ''systemd services''
* recipes-samples for example images
* recipes-security for ''OP-TEE userland part''
...<br>


==Reference list==<references />=Use of meta-st-stm32mp with a core image===

If you want to use the meta-st-stm32mp layer with a core image (nodistro mode), please apply the following steps to manage the dependencies between layers:

 {{PC$}} source layers/openembedded-core/oe-init-build-env 
 {{PC$}} bitbake-layers add-layer ../layers/meta-openembedded/meta-oe
 {{PC$}} bitbake-layers add-layer ../layers/meta-openembedded/meta-python
 {{PC$}} bitbake-layers add-layer ../layers/meta-st/meta-st-stm32mp
 {{PC$}} bitbake core-image-base or bitbake core-image-minimal

==Reference list==<references />

<noinclude>

{{PublicationRequestId | 8445 | 2018-09-21 | BrunoB}} 
[[Category:How to customize software]]</noinclude>
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>
 
{{ArticleMainWriter|ChristopheM}}
 
 
{{ ArticleApprovedVersion|ChristopheM| NathalieS, BernardP, ChristopheP, Jean-ChristopheT, DenisH |No previous approved version| BrunoB - 21Sep'18 - 8445 | 21Sep'18 }}
 
 
[[Category:How to customize software]]
 
 
</noinclude>
 
 
 
==Article purpose==
 
==Article purpose==
 
The purpose of this article is to describe the basic steps required to create your own distribution.<br>
 
The purpose of this article is to describe the basic steps required to create your own distribution.<br>
Line 15: Line 6:
   
 
==Creating your own distribution==
 
==Creating your own distribution==
As recommended in Yocto user manual <ref name="Yocto mega manual"> [https://www.yoctoproject.org/docs/2.4/mega-manual/mega-manual.html#creating-your-own-distribution Yocto Megamanual Creating your own distribution]</ref>, you may create your own distribution in order not to alter any original distribution Metadata, while gaining more control over package alternative selections, compile-time options, and other low-level configurations.
+
As recommended in Yocto user manual <ref name="Yocto mega manual">{{DocSource | domain=Yocto Project | path=mega-manual/mega-manual.html#creating-your-own-distribution | text=Yocto Megamanual Creating your own distribution}}</ref>, you may create your own distribution in order not to alter any original distribution Metadata, while gaining more control over package alternative selections, compile-time options, and other low-level configurations.
   
   
Line 37: Line 28:
 
  │  ├── exception-gplv3.inc
 
  │  ├── exception-gplv3.inc
 
  │  ├── openstlinux.inc
 
  │  ├── openstlinux.inc
  │  ├── {{Highlight2|st-default-distro-providers.inc}}
+
  │  ├── {{HighlightParam|st-default-distro-providers.inc}}
  │  ├── {{Highlight2|st-default-distro-rules.inc}}
+
  │  ├── {{HighlightParam|st-default-distro-rules.inc}}
 
  ├── openstlinux-eglfs.conf
 
  ├── openstlinux-eglfs.conf
  ├── {{Highlight2|openstlinux-weston.conf}}
+
  ├── {{HighlightParam|openstlinux-weston.conf}}
 
  ├── openstlinux-x11.conf
 
  ├── openstlinux-x11.conf
 
  └── [...]
 
  └── [...]
Line 67: Line 58:
 
* recipes-security for ''OP-TEE userland part''
 
* recipes-security for ''OP-TEE userland part''
 
...<br>
 
...<br>
  +
  +
===Use of meta-st-stm32mp with a core image===
  +
  +
If you want to use the meta-st-stm32mp layer with a core image (nodistro mode), please apply the following steps to manage the dependencies between layers:
  +
  +
{{PC$}} source layers/openembedded-core/oe-init-build-env
  +
{{PC$}} bitbake-layers add-layer ../layers/meta-openembedded/meta-oe
  +
{{PC$}} bitbake-layers add-layer ../layers/meta-openembedded/meta-python
  +
{{PC$}} bitbake-layers add-layer ../layers/meta-st/meta-st-stm32mp
  +
{{PC$}} bitbake core-image-base or bitbake core-image-minimal
   
 
==Reference list==
 
==Reference list==
 
<references />
 
<references />
  +
  +
<noinclude>
  +
{{PublicationRequestId | 8445 | 2018-09-21 | BrunoB}}
  +
[[Category:How to customize software]]
  +
</noinclude>