mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
documentation/kernel-manual/kernel-how-to.xml: Partial - more general edits (From yocto-docs rev: 60d084a5b17bf78fafd8a4d13b9055093fca708a)
Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
3120247447
commit
fb71e5092a
@@ -1008,12 +1008,19 @@ That's it. Configure and build.
|
|||||||
<title>Creating a BSP Based on an Existing Similar BSP</title>
|
<title>Creating a BSP Based on an Existing Similar BSP</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This section provides an example for creating a BSP
|
This section provides an example for creating a BSP that is based on an existing, and hopefully,
|
||||||
that is based on an existing, and hopefully, similar
|
similar one.
|
||||||
one. It assumes you will be using a local kernel
|
The example assumes you will be using a local kernel repository and you will be pointing the
|
||||||
repository and will be pointing the kernel recipe at
|
kernel recipes at that repository.
|
||||||
that. Follow these steps and keep in mind your
|
Follow the steps in this section and keep in mind your particular situation and differences.
|
||||||
particular situation and differences:
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you are interested in a more detailed example with complete transcripts showing how to
|
||||||
|
create a BSP that is based on an existing similar BSP, see the information on the wiki
|
||||||
|
page at <ulink url='https://wiki.yoctoproject.org/wiki/BKM:_starting_a_new_BSP'></ulink>.
|
||||||
|
</para>
|
||||||
|
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
@@ -1058,27 +1065,37 @@ That's it. Configure and build.
|
|||||||
<listitem><para>Copy the "emenlow" BSP layer to a new BSP layer named
|
<listitem><para>Copy the "emenlow" BSP layer to a new BSP layer named
|
||||||
<filename>meta-mymachine</filename>.
|
<filename>meta-mymachine</filename>.
|
||||||
Now you have two identical BSP layers ‐ but with different names.</para></listitem>
|
Now you have two identical BSP layers ‐ but with different names.</para></listitem>
|
||||||
<listitem><para>This example assumes you only need to change some machine
|
<listitem><para>This example assumes the hardware for your new BSP is very similar to
|
||||||
configurations and inform the Yocto Project build process of the new layer.
|
the hardware used for <filename>meta-emenlow</filename>.
|
||||||
Consequently, modify the new layer's structure so that all it contains
|
And, you only need to change some machine configurations and inform the Yocto Project build
|
||||||
is the <filename>linux-yocto_git.bbappend</filename> file in the
|
process of the new layer.
|
||||||
<filename>meta-mymachine/recipes-kernel/linux</filename> directory
|
Consequently, you just need to modify some files in the the new layer so that the Yocto Project
|
||||||
and the <filename>emenlow.conf</filename> configuration file in the
|
build process uses the recipes and configurations in the new layer.
|
||||||
<filename>meta-mymachine/conf/machine</filename> directory as well as the
|
Since you are basing your new layer on a copied existing layer you need to be sure to rename
|
||||||
<filename>layer.conf</filename> file in the parent <filename>conf</filename> directory.
|
any directories named "emenlow" to "mymachine".
|
||||||
</para></listitem>.
|
There is one in the <filename>recipes-bsp</filename> directory and one in the
|
||||||
|
<filename>recipes-graphics</filename> directory.</para></listitem>.
|
||||||
|
<listitem><para>In the <filename>recipes-graphics</filename> directory make sure you locate and
|
||||||
|
change all occurences of "emenlow" to "mymachine".
|
||||||
|
Several instances exist.</para></listitem>
|
||||||
<listitem><para>Rename the <filename>emenlow.conf</filename> file to <filename>mymachine.conf</filename>
|
<listitem><para>Rename the <filename>emenlow.conf</filename> file to <filename>mymachine.conf</filename>
|
||||||
and fix or remove any configurations.
|
and fix or remove any configurations.
|
||||||
You need to be sure that "mymachine" replaces "emenlow".
|
You need to be sure that "mymachine" replaces "emenlow".
|
||||||
Note also that "linux-yocto" is the kernel specified in the configuration file.</para></listitem>
|
Note also that "linux-yocto" is the kernel specified in the configuration file.</para></listitem>
|
||||||
<listitem><para>Make sure the Yocto Project build process knows about the new BSP
|
<listitem><para>Make sure the Yocto Project build process knows about the new BSP
|
||||||
layer by adding the layer to the <filename>bblayers.conf</filename> configuration
|
layer by adding the pathname to the new layer to the <filename>bblayers.conf</filename> configuration
|
||||||
file located in the Yocto Project build tree at <filename>build/conf/bblayers.conf</filename>.
|
file located in the Yocto Project build tree at <filename>build/conf/bblayers.conf</filename>.
|
||||||
Adding the layer allows Bitbake to find the new layer.
|
Adding the layer allows Bitbake to find the new layer.
|
||||||
</para></listitem>
|
|
||||||
|
<note>
|
||||||
|
The above example creates a BSP layer named <filename>meta-mymachine</filename> that is
|
||||||
|
functionally identical to the BSP layer on which it was based - <filename>meta-emenlow</filename>.
|
||||||
|
In a real-world scenario you would need to differentiate features and configurations to enable
|
||||||
|
your "similar" BSP layer to work on your target hardware.
|
||||||
|
</note></para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
|
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
Create a machine branch for your machine in a the Yocto Project git repository.
|
Create a machine branch for your machine in a the Yocto Project git repository.
|
||||||
</para>
|
</para>
|
||||||
@@ -1090,7 +1107,7 @@ That's it. Configure and build.
|
|||||||
Then, create a local clone of that bare clone.
|
Then, create a local clone of that bare clone.
|
||||||
Here are the commands:
|
Here are the commands:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git clone --bare git://git.yoctoproject.org/linux-yocto-2.6.37.git linux-yocto-2.6.37.git
|
$ git clone ‐‐bare git://git.yoctoproject.org/linux-yocto-2.6.37.git linux-yocto-2.6.37.git
|
||||||
$ git clone linux-yocto-2.6.37.git linux-yocto-2.6.37
|
$ git clone linux-yocto-2.6.37.git linux-yocto-2.6.37
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
@@ -1106,7 +1123,7 @@ That's it. Configure and build.
|
|||||||
<listitem><para>
|
<listitem><para>
|
||||||
In your new layer you need to edit the <filename>linux-yocto_git.bbappend</filename>
|
In your new layer you need to edit the <filename>linux-yocto_git.bbappend</filename>
|
||||||
file so that the compatible machine is "mymachine".
|
file so that the compatible machine is "mymachine".
|
||||||
It is also convenient point to a cloned Yocto Project git repository that is local
|
It is also convenient to point to a cloned Yocto Project git repository that is local
|
||||||
to your system for development purposes.
|
to your system for development purposes.
|
||||||
Thus, change the <filename>linux-yocto_git.bbappend</filename> file in your
|
Thus, change the <filename>linux-yocto_git.bbappend</filename> file in your
|
||||||
<filename>meta-mymachine</filename> layer to the following:
|
<filename>meta-mymachine</filename> layer to the following:
|
||||||
@@ -1148,7 +1165,7 @@ That's it. Configure and build.
|
|||||||
<para>
|
<para>
|
||||||
You should now be able to build and boot an image with the new kernel:
|
You should now be able to build and boot an image with the new kernel:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ bitbake core-image-sato-live
|
$ bitbake -k core-image-sato-live
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
|
|
||||||
@@ -1173,12 +1190,11 @@ That's it. Configure and build.
|
|||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
CONFIG_LOG_BUF_SHIFT=18
|
CONFIG_LOG_BUF_SHIFT=18
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
These configuration fragments could then be picked up and
|
These configuration fragments could then be picked up and
|
||||||
applied to the kernel .config by appending them to the kernel SRC_URI:
|
applied to the kernel .config by appending them to the kernel SRC_URI:
|
||||||
</para>
|
|
||||||
|
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
SRC_URI_append_mymachine = " file://some.cfg \
|
SRC_URI_append_mymachine = " file://some.cfg \
|
||||||
file://other.cfg \
|
file://other.cfg \
|
||||||
@@ -1222,10 +1238,10 @@ That's it. Configure and build.
|
|||||||
For example, in this case, commit the patch to the "yocto/standard/mymachine" branch, and during the
|
For example, in this case, commit the patch to the "yocto/standard/mymachine" branch, and during the
|
||||||
next build it is applied from there.
|
next build it is applied from there.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<section id='bsp-creating-bsp-without-a-local-kernel-repo'>
|
<section id='bsp-creating-bsp-without-a-local-kernel-repo'>
|
||||||
<title>Creating a BSP Based on an Existing Similar BSP Without a Local Kernel Repository</title>
|
<title>Creating a BSP Based on an Existing Similar BSP Without a Local Kernel Repository</title>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user