summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'documentation')
-rw-r--r--documentation/kernel-dev/kernel-dev-common.xml92
1 files changed, 51 insertions, 41 deletions
diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml
index 6179883c48..9f8ac2d715 100644
--- a/documentation/kernel-dev/kernel-dev-common.xml
+++ b/documentation/kernel-dev/kernel-dev-common.xml
@@ -284,12 +284,14 @@
284 Before you can do anything using BitBake, you need to 284 Before you can do anything using BitBake, you need to
285 initialize the BitBake build environment by sourcing a 285 initialize the BitBake build environment by sourcing a
286 build environment script 286 build environment script
287 (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink> 287 (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink>).
288 or
289 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>).
290 Also, for this example, be sure that the local branch 288 Also, for this example, be sure that the local branch
291 you have checked out for <filename>poky</filename> is 289 you have checked out for <filename>poky</filename> is
292 the Yocto Project &DISTRO_NAME; branch: 290 the Yocto Project &DISTRO_NAME; branch.
291 If you need to checkout out the &DISTRO_NAME; branch,
292 see the
293 "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking out by Branch in Poky</ulink>"
294 section in the Yocto Project Development Manual.
293 <literallayout class='monospaced'> 295 <literallayout class='monospaced'>
294 $ cd ~/poky 296 $ cd ~/poky
295 $ git branch 297 $ git branch
@@ -534,7 +536,7 @@
534 <filename>meta-mylayer/recipes-kernel/linux</filename> 536 <filename>meta-mylayer/recipes-kernel/linux</filename>
535 directory and create the kernel's append file. 537 directory and create the kernel's append file.
536 This example uses the 538 This example uses the
537 <filename>linux-yocto_4.12</filename> kernel. 539 <filename>linux-yocto-4.12</filename> kernel.
538 Thus, the name of the append file is 540 Thus, the name of the append file is
539 <filename>linux-yocto_4.12.bbappend</filename>: 541 <filename>linux-yocto_4.12.bbappend</filename>:
540 <literallayout class='monospaced'> 542 <literallayout class='monospaced'>
@@ -1240,12 +1242,6 @@
1240 "<link linkend='getting-ready-for-traditional-kernel-development'>Getting Ready for Traditional Kernel Development</link>" 1242 "<link linkend='getting-ready-for-traditional-kernel-development'>Getting Ready for Traditional Kernel Development</link>"
1241 Section. 1243 Section.
1242 </note> 1244 </note>
1243 </para>
1244
1245 <para>
1246 Also, for more information on patching the kernel, see the
1247 "<link linkend='applying-patches'>Applying Patches</link>"
1248 section.
1249 <orderedlist> 1245 <orderedlist>
1250 <listitem><para> 1246 <listitem><para>
1251 <emphasis>Edit the Source Files</emphasis> 1247 <emphasis>Edit the Source Files</emphasis>
@@ -1338,10 +1334,10 @@
1338 </para></listitem> 1334 </para></listitem>
1339 <listitem><para> 1335 <listitem><para>
1340 <emphasis>Build the Image:</emphasis> 1336 <emphasis>Build the Image:</emphasis>
1341 With the source modified, staged, and committed, and 1337 With the source modified, your changes staged and
1342 the <filename>local.conf</filename> file pointing to 1338 committed, and the <filename>local.conf</filename> file
1343 the kernel files, you can now use BitBake to build the 1339 pointing to the kernel files, you can now use BitBake to
1344 image: 1340 build the image:
1345 <literallayout class='monospaced'> 1341 <literallayout class='monospaced'>
1346 $ cd ~/poky/build 1342 $ cd ~/poky/build
1347 $ bitbake core-image-minimal 1343 $ bitbake core-image-minimal
@@ -1383,47 +1379,61 @@
1383 </literallayout> 1379 </literallayout>
1384 </para></listitem> 1380 </para></listitem>
1385 <listitem><para> 1381 <listitem><para>
1386 <emphasis>Make Changes to Use Patch Files During Subsequent Builds:</emphasis> 1382 <emphasis>Move the Patch File to Your Layer:</emphasis>
1387 In order for subsequent builds to pick up patches, you 1383 In order for subsequent builds to pick up patches, you
1388 need to make some changes in your layer. 1384 need to move the patch file you created in the previous
1389 This example created the layer 1385 step to your layer <filename>meta-mylayer</filename>.
1390 <filename>meta-mylayer</filename> earlier with basically 1386 For this example, the layer created earlier is located
1391 just a <filename>bblayers.conf</filename> file. 1387 in your home directory as <filename>meta-mylayer</filename>.
1392 To get it ready for subsequent builds that automatically 1388 When the layer was created using the
1393 apply patches, you need to create an kernel recipe append 1389 <filename>yocto-create</filename> script, no additional
1394 file.</para> 1390 hierarchy was created to support patches.
1395 1391 Before moving the patch file, you need to add additional
1396 <para>Move to the <filename>meta-mylayer</filename> 1392 structure to your layer using the following commands:
1397 directory and create some extra structure in your layer:
1398 <literallayout class='monospaced'> 1393 <literallayout class='monospaced'>
1399 $ cd ~/poky/meta-mylayer 1394 $ cd ~/meta-mylayer
1400 $ mkdir recipes-kernel 1395 $ mkdir recipes-kernel
1401 $ mkdir recipes-kernel/linux 1396 $ mkdir recipes-kernel/linux
1402 $ mkdir recipes-kernel/linux/linux-yocto 1397 $ mkdir recipes-kernel/linux/linux-yocto
1403 </literallayout></para> 1398 </literallayout>
1404 1399 Once you have created this hierarchy in your layer, you can
1405 <para>In the 1400 move the patch file using the following command:
1406 <filename>recipes-kernel/linux/linux-yocto</filename> 1401 <literallayout class='monospaced'>
1407 directory, create an append file named 1402 $ mv ~/linux-yocto-4.12/init/0001-calibrate.c-Added-some-printk-statements.patch ~/meta-mylayer/recipes-kernel/linux/linux-yocto
1408 <filename>linux-yocto_4.12.bbappend</filename> with the 1403 </literallayout>
1409 following contents: 1404 </para></listitem>
1405 <listitem><para>
1406 <emphasis>Create the Append File:</emphasis>
1407 Finally, you need to create the
1408 <filename>linux-yocto_4.12.bbappend</filename> file and
1409 insert statements that allow the OpenEmbedded build
1410 system to find the patch.
1411 The append file needs to be in your layer's
1412 <filename>recipes-kernel/linux</filename>
1413 directory and it must be named
1414 <filename>linux-yocto_4.12.bbappend</filename> and have
1415 the following contents:
1410 <literallayout class='monospaced'> 1416 <literallayout class='monospaced'>
1411 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" 1417 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
1412 1418
1413 SRC_URI += "file://0001-calibrate.c-Added-some-printk-statements.patch" 1419 SRC_URI_append = " file://0001-calibrate.c-Added-some-printk-statements.patch"
1414 </literallayout> 1420 </literallayout>
1415 The 1421 The
1416 <ulink url='&YOCTO_DOCS_REF_URL;var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink> 1422 <ulink url='&YOCTO_DOCS_REF_URL;var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
1417 and 1423 and
1418 <ulink url='&YOCTO_DOCS_REF_URL;var-SRC_URI'><filename>SRC_URI</filename></ulink> 1424 <ulink url='&YOCTO_DOCS_REF_URL;var-SRC_URI'><filename>SRC_URI</filename></ulink>
1419 statements enable the OpenEmbedded build system to find 1425 statements enable the OpenEmbedded build system to find
1420 the patch file. 1426 the patch file.</para>
1421 For more information on using append files, see the
1422 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer"</ulink>"
1423 section in the Yocto Project Development Manual.</para>
1424 1427
1425 <para>Move the patch file you created in the earlier step 1428 <para>For more information on append files and patches,
1426 to the TBD 1429 see the
1430 "<link linkend='creating-the-append-file'>Creating the Append File</link>"
1431 and
1432 "<link linkend='applying-patches'>Applying Patches</link>"
1433 sections.
1434 You can also see the
1435 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer"</ulink>"
1436 section in the Yocto Project Development Manual.
1427 </para></listitem> 1437 </para></listitem>
1428 </orderedlist> 1438 </orderedlist>
1429 </para> 1439 </para>