1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

bsp-guide: Updated the section on developing a BSP

This section had several out-of-date items.  They are all up
to date now.

(From yocto-docs rev: 247f3eceeccc645a1b556aea433d4cf66399e962)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark
2018-03-08 11:15:51 -08:00
committed by Richard Purdie
parent dff40ea5cc
commit c8b2ba7523
+117 -88
View File
@@ -944,18 +944,18 @@
<title>Developing a Board Support Package (BSP)</title> <title>Developing a Board Support Package (BSP)</title>
<para> <para>
This section contains the high-level procedure you can follow This section contains the high-level procedure you can
to create a BSP using the Yocto Project's follow to create a BSP using the Yocto Project's
<link linkend='using-the-yocto-projects-bsp-tools'>BSP Tools</link>. <link linkend='using-the-yocto-projects-bsp-tools'>BSP Tools</link>.
Although not required for BSP creation, the Although not required for BSP creation, the
<filename>meta-intel</filename> repository, which contains <filename>meta-intel</filename> repository, which
many BSPs supported by the Yocto Project, is part of the contains many BSPs supported by the Yocto Project,
example. is part of the example.
</para> </para>
<para> <para>
For an example that shows how to create a new layer using For an example that shows how to create a new
the tools, see the layer using the tools, see the
"<link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</link>" "<link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</link>"
section. section.
</para> </para>
@@ -972,37 +972,40 @@
<para> <para>
<orderedlist> <orderedlist>
<listitem><para> <listitem><para>
<emphasis>Set up Your Host Development System to Support <emphasis>Set up Your Host Development System
Development Using the Yocto Project</emphasis>: to Support Development Using the Yocto
Project</emphasis>:
See the See the
"<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>" "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Setting Up the Development Host to Use the Yocto Project</ulink>"
section in the Yocto Project Quick Start for options on how section in the Yocto Project Development Tasks
to get a build host ready to use the Yocto Project. Manual for options on how to get a system ready
to use the Yocto Project.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<emphasis>Establish the <filename>meta-intel</filename> <emphasis>Establish the
<filename>meta-intel</filename>
Repository on Your System:</emphasis> Repository on Your System:</emphasis>
Having local copies of these supported BSP layers on Having local copies of these supported BSP layers
your system gives you access to layers you might be able on your system gives you access to layers you
to build on or modify to create your BSP. might be able to leverage when creating your BSP.
For information on how to get these files, see the For information on how to get these files, see the
"<link linkend='preparing-your-build-host-to-work-with-bsp-layers'>Preparing Your Build Host to Work with BSP Layers</link>" "<link linkend='preparing-your-build-host-to-work-with-bsp-layers'>Preparing Your Build Host to Work with BSP Layers</link>"
section. section.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<emphasis>Create Your Own BSP Layer Using the <emphasis>Create Your Own BSP Layer Using the
<link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'><filename>yocto-bsp</filename></link> <filename>bitbake-layers</filename>
script:</emphasis> Script:</emphasis>
Layers are ideal for isolating and storing work for a Layers are ideal for isolating and storing work
given piece of hardware. for a given piece of hardware.
A layer is really just a location or area in which you A layer is really just a location or area in which you
place the recipes and configurations for your BSP. place the recipes and configurations for your BSP.
In fact, a BSP is, in itself, a special type of layer. In fact, a BSP is, in itself, a special type of layer.
The simplest way to create a new BSP layer that is The simplest way to create a new BSP layer that is
compliant with the Yocto Project is to use the compliant with the Yocto Project is to use the
<filename>yocto-bsp</filename> script. <filename>bitbake-layers</filename> script.
For information about that script, see the For information about that script, see the
"<link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the yocto-bsp Script</link>" "<link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</link>"
section.</para> section.</para>
<para>Another example that illustrates a layer <para>Another example that illustrates a layer
@@ -1012,91 +1015,123 @@
compile and run. compile and run.
The layer, in this case, would be where all the The layer, in this case, would be where all the
recipes that define those dependencies are kept. recipes that define those dependencies are kept.
The key point for a layer is that it is an isolated The key point for a layer is that it is an
area that contains all the relevant information for isolated area that contains all the relevant
the project that the OpenEmbedded build system knows information for the project that the
about. OpenEmbedded build system knows about.
For more information on layers, see the For more information on layers, see the
"<ulink url='&YOCTO_DOCS_GS_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>"
section in the Getting Started With Yocto Project
Manual.
You can also reference the
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>" "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
section in the Yocto Project Development Tasks Manual. section in the Yocto Project Development Tasks
Manual.
For more information on BSP layers, see the For more information on BSP layers, see the
"<link linkend='bsp-layers'>BSP Layers</link>" "<link linkend='bsp-layers'>BSP Layers</link>"
section. section.
<note><title>Notes</title> <note><title>Notes</title>
<para>Five BSPs exist that are part of the Yocto
Project release:
<filename>beaglebone</filename> (ARM),
<filename>mpc8315e</filename> (PowerPC),
and <filename>edgerouter</filename> (MIPS).
The recipes and configurations for these five BSPs
are located and dispersed within the
<ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
</para>
<para>Three core Intel BSPs exist as part of the Yocto
Project release in the
<filename>meta-intel</filename> layer:
<itemizedlist> <itemizedlist>
<listitem><para> <listitem><para>
<filename>intel-core2-32</filename>, Five hardware reference BSPs exist
which is a BSP optimized for the Core2 family of CPUs that are part of the Yocto Project release
as well as all CPUs prior to the Silvermont core. and are located in the
<filename>poky/meta-yocto-bsp</filename> BSP
layer:
<itemizedlist>
<listitem><para>
Texas Instruments Beaglebone
(<filename>beaglebone-yocto</filename>
</para></listitem>
<listitem><para>
Freescale MPC8315E-RDB
(<filename>mpc8315e-rdb</filename>)
</para></listitem>
<listitem><para>
Ubiquiti Networks EdgeRouter Lite
(<filename>edgerouter</filename>)
</para></listitem>
<listitem><para>
Two general IA platforms
(<filename>genericx86</filename> and
<filename>genericx86-64</filename>)
</para></listitem>
</itemizedlist>
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<filename>intel-corei7-64</filename>, Three core Intel BSPs exist as part of
which is a BSP optimized for Nehalem and later the Yocto Project release in the
Core and Xeon CPUs as well as Silvermont and later <filename>meta-intel</filename> layer:
Atom CPUs, such as the Baytrail SoCs. <itemizedlist>
<listitem><para>
<filename>intel-core2-32</filename>,
which is a BSP optimized for the Core2
family of CPUs as well as all CPUs
prior to the Silvermont core.
</para></listitem>
<listitem><para>
<filename>intel-corei7-64</filename>,
which is a BSP optimized for Nehalem
and later Core and Xeon CPUs as well
as Silvermont and later Atom CPUs,
such as the Baytrail SoCs.
</para></listitem>
<listitem><para>
<filename>intel-quark</filename>,
which is a BSP optimized for the
Intel Galileo gen1 &amp; gen2
development boards.
</para></listitem>
</itemizedlist>
</para></listitem> </para></listitem>
<listitem><para> </itemizedlist>
<filename>intel-quark</filename>,
which is a BSP optimized for the Intel Galileo
gen1 &amp; gen2 development boards.
</para></listitem>
</itemizedlist></para>
</note></para> </note></para>
<para>When you set up a layer for a new BSP, you should <para>When you set up a layer for a new BSP,
follow a standard layout. you should follow a standard layout.
This layout is described in the This layout is described in the
"<link linkend='bsp-filelayout'>Example Filesystem Layout</link>" "<link linkend='bsp-filelayout'>Example Filesystem Layout</link>"
section. section.
In the standard layout, you will notice a suggested In the standard layout, notice the suggested
structure for recipes and configuration information. structure for recipes and configuration
You can see the standard layout for a BSP by examining information.
any supported BSP found in the You can see the standard layout for a BSP
<filename>meta-intel</filename> layer inside the Source by examining any supported BSP found in the
Directory. <filename>meta-intel</filename> layer inside
the Source Directory.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<emphasis>Make Configuration Changes to Your New BSP <emphasis>Make Configuration Changes to Your New
Layer:</emphasis> BSP Layer:</emphasis>
The standard BSP layer structure organizes the files The standard BSP layer structure organizes the
you need to edit in <filename>conf</filename> and files you need to edit in
several <filename>recipes-*</filename> <filename>conf</filename> and several
directories within the BSP layer. <filename>recipes-*</filename> directories
Configuration changes identify where your new layer within the BSP layer.
is on the local system and identify which kernel you Configuration changes identify where your new
are going to use. layer is on the local system and identifies the
When you run the <filename>yocto-bsp</filename> script, kernel you are going to use.
you are able to interactively configure many things for When you run the
the BSP (e.g. keyboard, touchscreen, and so forth). <filename>bitbake-layers</filename> script,
you are able to interactively configure many
things for the BSP (e.g. keyboard, touchscreen,
and so forth).
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<emphasis>Make Recipe Changes to Your New BSP <emphasis>Make Recipe Changes to Your New BSP
Layer:</emphasis> Layer:</emphasis>
Recipe changes include altering recipes Recipe changes include altering recipes
(<filename>.bb</filename> files), removing recipes you (<filename>*.bb</filename> files), removing
do not use, and adding new recipes or append files recipes you do not use, and adding new recipes
(<filename>.bbappend</filename>) that you need to or append files (<filename>.bbappend</filename>)
support your hardware. that support your hardware.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<emphasis>Prepare for the Build:</emphasis> <emphasis>Prepare for the Build:</emphasis>
Once you have made all the changes to your BSP layer, Once you have made all the changes to your BSP
there remains a few things you need to do for the layer, there remains a few things you need to
OpenEmbedded build system in order for it to create do for the OpenEmbedded build system in order
your image. for it to create your image.
You need to get the build environment ready by You need to get the build environment ready by
sourcing an environment setup script sourcing an environment setup script
(i.e. <filename>oe-init-build-env</filename>) (i.e. <filename>oe-init-build-env</filename>)
@@ -1110,13 +1145,7 @@
"<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>" "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
section in the Yocto Project Development Tasks Manual section in the Yocto Project Development Tasks Manual
for information on how to let the build system for information on how to let the build system
know about your new layer.</para> know about your new layer.
<para>The entire process for building an image is
overviewed in the section
"<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>" section
of the Yocto Project Quick Start.
You might want to reference this information.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<emphasis>Build the Image:</emphasis> <emphasis>Build the Image:</emphasis>