summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2011-07-14 06:51:37 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-21 10:59:19 +0100
commitfb71e5092af10f7be6d622a48efd63c873a3895c (patch)
tree5d256b60ed8a3a57ce925cf5888cf6e717eead84
parent3120247447cc230e87e578cf3a5dc8ee9bbdf873 (diff)
downloadpoky-fb71e5092af10f7be6d622a48efd63c873a3895c.tar.gz
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>
-rw-r--r--documentation/kernel-manual/kernel-how-to.xml66
1 files changed, 41 insertions, 25 deletions
diff --git a/documentation/kernel-manual/kernel-how-to.xml b/documentation/kernel-manual/kernel-how-to.xml
index e21d1137dd..711291326b 100644
--- a/documentation/kernel-manual/kernel-how-to.xml
+++ b/documentation/kernel-manual/kernel-how-to.xml
@@ -1008,12 +1008,19 @@ That's it. Configure and build.
1008 <title>Creating a BSP Based on an Existing Similar BSP</title> 1008 <title>Creating a BSP Based on an Existing Similar BSP</title>
1009 1009
1010 <para> 1010 <para>
1011 This section provides an example for creating a BSP 1011 This section provides an example for creating a BSP that is based on an existing, and hopefully,
1012 that is based on an existing, and hopefully, similar 1012 similar one.
1013 one. It assumes you will be using a local kernel 1013 The example assumes you will be using a local kernel repository and you will be pointing the
1014 repository and will be pointing the kernel recipe at 1014 kernel recipes at that repository.
1015 that. Follow these steps and keep in mind your 1015 Follow the steps in this section and keep in mind your particular situation and differences.
1016 particular situation and differences: 1016 </para>
1017
1018
1019 <para>
1020 If you are interested in a more detailed example with complete transcripts showing how to
1021 create a BSP that is based on an existing similar BSP, see the information on the wiki
1022 page at <ulink url='https://wiki.yoctoproject.org/wiki/BKM:_starting_a_new_BSP'></ulink>.
1023 </para>
1017 1024
1018 <orderedlist> 1025 <orderedlist>
1019 <listitem><para> 1026 <listitem><para>
@@ -1058,27 +1065,37 @@ That's it. Configure and build.
1058 <listitem><para>Copy the "emenlow" BSP layer to a new BSP layer named 1065 <listitem><para>Copy the "emenlow" BSP layer to a new BSP layer named
1059 <filename>meta-mymachine</filename>. 1066 <filename>meta-mymachine</filename>.
1060 Now you have two identical BSP layers &dash; but with different names.</para></listitem> 1067 Now you have two identical BSP layers &dash; but with different names.</para></listitem>
1061 <listitem><para>This example assumes you only need to change some machine 1068 <listitem><para>This example assumes the hardware for your new BSP is very similar to
1062 configurations and inform the Yocto Project build process of the new layer. 1069 the hardware used for <filename>meta-emenlow</filename>.
1063 Consequently, modify the new layer's structure so that all it contains 1070 And, you only need to change some machine configurations and inform the Yocto Project build
1064 is the <filename>linux-yocto_git.bbappend</filename> file in the 1071 process of the new layer.
1065 <filename>meta-mymachine/recipes-kernel/linux</filename> directory 1072 Consequently, you just need to modify some files in the the new layer so that the Yocto Project
1066 and the <filename>emenlow.conf</filename> configuration file in the 1073 build process uses the recipes and configurations in the new layer.
1067 <filename>meta-mymachine/conf/machine</filename> directory as well as the 1074 Since you are basing your new layer on a copied existing layer you need to be sure to rename
1068 <filename>layer.conf</filename> file in the parent <filename>conf</filename> directory. 1075 any directories named "emenlow" to "mymachine".
1069 </para></listitem>. 1076 There is one in the <filename>recipes-bsp</filename> directory and one in the
1077 <filename>recipes-graphics</filename> directory.</para></listitem>.
1078 <listitem><para>In the <filename>recipes-graphics</filename> directory make sure you locate and
1079 change all occurences of "emenlow" to "mymachine".
1080 Several instances exist.</para></listitem>
1070 <listitem><para>Rename the <filename>emenlow.conf</filename> file to <filename>mymachine.conf</filename> 1081 <listitem><para>Rename the <filename>emenlow.conf</filename> file to <filename>mymachine.conf</filename>
1071 and fix or remove any configurations. 1082 and fix or remove any configurations.
1072 You need to be sure that "mymachine" replaces "emenlow". 1083 You need to be sure that "mymachine" replaces "emenlow".
1073 Note also that "linux-yocto" is the kernel specified in the configuration file.</para></listitem> 1084 Note also that "linux-yocto" is the kernel specified in the configuration file.</para></listitem>
1074 <listitem><para>Make sure the Yocto Project build process knows about the new BSP 1085 <listitem><para>Make sure the Yocto Project build process knows about the new BSP
1075 layer by adding the layer to the <filename>bblayers.conf</filename> configuration 1086 layer by adding the pathname to the new layer to the <filename>bblayers.conf</filename> configuration
1076 file located in the Yocto Project build tree at <filename>build/conf/bblayers.conf</filename>. 1087 file located in the Yocto Project build tree at <filename>build/conf/bblayers.conf</filename>.
1077 Adding the layer allows Bitbake to find the new layer. 1088 Adding the layer allows Bitbake to find the new layer.
1078 </para></listitem> 1089
1090 <note>
1091 The above example creates a BSP layer named <filename>meta-mymachine</filename> that is
1092 functionally identical to the BSP layer on which it was based - <filename>meta-emenlow</filename>.
1093 In a real-world scenario you would need to differentiate features and configurations to enable
1094 your "similar" BSP layer to work on your target hardware.
1095 </note></para></listitem>
1079 </orderedlist> 1096 </orderedlist>
1080 </para></listitem> 1097 </para></listitem>
1081 1098
1082 <listitem><para> 1099 <listitem><para>
1083 Create a machine branch for your machine in a the Yocto Project git repository. 1100 Create a machine branch for your machine in a the Yocto Project git repository.
1084 </para> 1101 </para>
@@ -1090,7 +1107,7 @@ That's it. Configure and build.
1090 Then, create a local clone of that bare clone. 1107 Then, create a local clone of that bare clone.
1091 Here are the commands: 1108 Here are the commands:
1092 <literallayout class='monospaced'> 1109 <literallayout class='monospaced'>
1093 $ git clone --bare git://git.yoctoproject.org/linux-yocto-2.6.37.git linux-yocto-2.6.37.git 1110 $ git clone &dash;&dash;bare git://git.yoctoproject.org/linux-yocto-2.6.37.git linux-yocto-2.6.37.git
1094 $ git clone linux-yocto-2.6.37.git linux-yocto-2.6.37 1111 $ git clone linux-yocto-2.6.37.git linux-yocto-2.6.37
1095 </literallayout> 1112 </literallayout>
1096 </para> 1113 </para>
@@ -1106,7 +1123,7 @@ That's it. Configure and build.
1106 <listitem><para> 1123 <listitem><para>
1107 In your new layer you need to edit the <filename>linux-yocto_git.bbappend</filename> 1124 In your new layer you need to edit the <filename>linux-yocto_git.bbappend</filename>
1108 file so that the compatible machine is "mymachine". 1125 file so that the compatible machine is "mymachine".
1109 It is also convenient point to a cloned Yocto Project git repository that is local 1126 It is also convenient to point to a cloned Yocto Project git repository that is local
1110 to your system for development purposes. 1127 to your system for development purposes.
1111 Thus, change the <filename>linux-yocto_git.bbappend</filename> file in your 1128 Thus, change the <filename>linux-yocto_git.bbappend</filename> file in your
1112 <filename>meta-mymachine</filename> layer to the following: 1129 <filename>meta-mymachine</filename> layer to the following:
@@ -1148,7 +1165,7 @@ That's it. Configure and build.
1148 <para> 1165 <para>
1149 You should now be able to build and boot an image with the new kernel: 1166 You should now be able to build and boot an image with the new kernel:
1150 <literallayout class='monospaced'> 1167 <literallayout class='monospaced'>
1151 $ bitbake core-image-sato-live 1168 $ bitbake -k core-image-sato-live
1152 </literallayout> 1169 </literallayout>
1153 </para></listitem> 1170 </para></listitem>
1154 1171
@@ -1173,12 +1190,11 @@ That's it. Configure and build.
1173 <literallayout class='monospaced'> 1190 <literallayout class='monospaced'>
1174 CONFIG_LOG_BUF_SHIFT=18 1191 CONFIG_LOG_BUF_SHIFT=18
1175 </literallayout> 1192 </literallayout>
1193 </para>
1176 1194
1177 <para> 1195 <para>
1178 These configuration fragments could then be picked up and 1196 These configuration fragments could then be picked up and
1179 applied to the kernel .config by appending them to the kernel SRC_URI: 1197 applied to the kernel .config by appending them to the kernel SRC_URI:
1180 </para>
1181
1182 <literallayout class='monospaced'> 1198 <literallayout class='monospaced'>
1183 SRC_URI_append_mymachine = " file://some.cfg \ 1199 SRC_URI_append_mymachine = " file://some.cfg \
1184 file://other.cfg \ 1200 file://other.cfg \
@@ -1222,10 +1238,10 @@ That's it. Configure and build.
1222 For example, in this case, commit the patch to the "yocto/standard/mymachine" branch, and during the 1238 For example, in this case, commit the patch to the "yocto/standard/mymachine" branch, and during the
1223 next build it is applied from there. 1239 next build it is applied from there.
1224 </para></listitem> 1240 </para></listitem>
1225 </orderedlist> 1241 </orderedlist>
1226 </para>
1227 </section> 1242 </section>
1228 1243
1244
1229 <section id='bsp-creating-bsp-without-a-local-kernel-repo'> 1245 <section id='bsp-creating-bsp-without-a-local-kernel-repo'>
1230 <title>Creating a BSP Based on an Existing Similar BSP Without a Local Kernel Repository</title> 1246 <title>Creating a BSP Based on an Existing Similar BSP Without a Local Kernel Repository</title>
1231 1247