summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/dev-manual-common-tasks.xml
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2014-03-18 15:53:55 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-25 12:29:42 +0000
commit43d93f3426c44413acdb2284e0362d0d9d06bf8a (patch)
treedbc0eb3d41361921e815c1922cfb20545c9db236 /documentation/dev-manual/dev-manual-common-tasks.xml
parent58a7688afb96a2b3ace1e4ea4bed673c6435dffd (diff)
downloadpoky-43d93f3426c44413acdb2284e0362d0d9d06bf8a.tar.gz
dev-manual: Read-thru edits to two sections - new machine and libs
Edits to "Adding a New Machine" and "Working With Libraries". Minor corrections. I did do a significant rewrite of the first two sections of the "Adding a New Machine" section as it was very poor. (From yocto-docs rev: 0a030e44f0f1bf2bb204f24b63b4ddfc0cde8252) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual/dev-manual-common-tasks.xml')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml103
1 files changed, 63 insertions, 40 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 63c915ccc8..1ba267a5cd 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -2461,34 +2461,47 @@
2461 <title>Adding a New Machine</title> 2461 <title>Adding a New Machine</title>
2462 2462
2463 <para> 2463 <para>
2464 Adding a new machine to the Yocto Project is a straightforward process. 2464 Adding a new machine to the Yocto Project is a straight forward
2465 This section provides information that gives you an idea of the changes you must make. 2465 process.
2466 The information covers adding machines similar to those the Yocto Project already supports. 2466 This section describes how to add machines that are similar
2467 Although well within the capabilities of the Yocto Project, adding a totally new architecture 2467 to those that the Yocto Project already supports.
2468 might require 2468 <note>
2469 changes to <filename>gcc/eglibc</filename> and to the site information, which is 2469 Although well within the capabilities of the Yocto Project,
2470 beyond the scope of this manual. 2470 adding a totally new architecture might require
2471 changes to <filename>gcc/eglibc</filename> and to the site
2472 information, which is beyond the scope of this manual.
2473 </note>
2471 </para> 2474 </para>
2472 2475
2473 <para> 2476 <para>
2474 For a complete example that shows how to add a new machine, 2477 For a complete example that shows how to add a new machine,
2475 see the 2478 see the
2476 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>" 2479 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
2477 in the Yocto Project Board Support Package (BSP) Developer's Guide. 2480 section in the Yocto Project Board Support Package (BSP) Developer's Guide.
2478 </para> 2481 </para>
2479 2482
2480 <section id="platdev-newmachine-conffile"> 2483 <section id="platdev-newmachine-conffile">
2481 <title>Adding the Machine Configuration File</title> 2484 <title>Adding the Machine Configuration File</title>
2482 2485
2483 <para> 2486 <para>
2484 To add a machine configuration, you need to add a <filename>.conf</filename> file 2487 To add a new machine, you need to add a new machine
2485 with details of the device being added to the <filename>conf/machine/</filename> file. 2488 configuration file to the layer's
2486 The name of the file determines the name the OpenEmbedded build system 2489 <filename>conf/machine</filename> directory.
2487 uses to reference the new machine. 2490 This configuration file provides details about the device
2491 you are adding.
2492 </para>
2493
2494 <para>
2495 The OpenEmbedded build system uses the root name of the
2496 machine configuration file to reference the new machine.
2497 For example, given a machine configuration file named
2498 <filename>crownbay.conf</filename>, the build system
2499 recognizes the machine as "crownbay".
2488 </para> 2500 </para>
2489 2501
2490 <para> 2502 <para>
2491 The most important variables to set in this file are as follows: 2503 The most important variables you must set in your machine
2504 configuration file are as follows:
2492 <itemizedlist> 2505 <itemizedlist>
2493 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_ARCH'>TARGET_ARCH</ulink></filename> 2506 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_ARCH'>TARGET_ARCH</ulink></filename>
2494 (e.g. "arm")</para></listitem> 2507 (e.g. "arm")</para></listitem>
@@ -2512,9 +2525,10 @@
2512 </para> 2525 </para>
2513 2526
2514 <para> 2527 <para>
2515 You can find full details on these variables in the reference section. 2528 You can find full details on these variables in the reference
2516 You can leverage many existing machine <filename>.conf</filename> files from 2529 section.
2517 <filename>meta/conf/machine/</filename>. 2530 You can leverage existing machine <filename>.conf</filename>
2531 files from <filename>meta-yocto-bsp/conf/machine/</filename>.
2518 </para> 2532 </para>
2519 </section> 2533 </section>
2520 2534
@@ -2522,37 +2536,46 @@
2522 <title>Adding a Kernel for the Machine</title> 2536 <title>Adding a Kernel for the Machine</title>
2523 2537
2524 <para> 2538 <para>
2525 The OpenEmbedded build system needs to be able to build a kernel for the machine. 2539 The OpenEmbedded build system needs to be able to build a kernel
2526 You need to either create a new kernel recipe for this machine, or extend an 2540 for the machine.
2527 existing recipe. 2541 You need to either create a new kernel recipe for this machine,
2528 You can find several kernel examples in the 2542 or extend an existing kernel recipe.
2529 Source Directory at <filename>meta/recipes-kernel/linux</filename> 2543 You can find several kernel recipe examples in the
2544 Source Directory at
2545 <filename>meta/recipes-kernel/linux</filename>
2530 that you can use as references. 2546 that you can use as references.
2531 </para> 2547 </para>
2532 2548
2533 <para> 2549 <para>
2534 If you are creating a new recipe, normal recipe-writing rules apply for setting 2550 If you are creating a new kernel recipe, normal recipe-writing
2535 up a 2551 rules apply for setting up a
2536 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>. 2552 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>.
2537 Thus, you need to specify any necessary patches and set 2553 Thus, you need to specify any necessary patches and set
2538 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'>S</ulink></filename> to point at the source code. 2554 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'>S</ulink></filename>
2539 You need to create a <filename>configure</filename> task that configures the 2555 to point at the source code.
2540 unpacked kernel with a defconfig. 2556 You need to create a <filename>do_configure</filename> task that
2541 You can do this by using a <filename>make defconfig</filename> command or, 2557 configures the unpacked kernel with a
2542 more commonly, by copying in a suitable <filename>defconfig</filename> file and then running 2558 <filename>defconfig</filename> file.
2559 You can do this by using a <filename>make defconfig</filename>
2560 command or, more commonly, by copying in a suitable
2561 <filename>defconfig</filename> file and then running
2543 <filename>make oldconfig</filename>. 2562 <filename>make oldconfig</filename>.
2544 By making use of <filename>inherit kernel</filename> and potentially some of the 2563 By making use of <filename>inherit kernel</filename> and
2545 <filename>linux-*.inc</filename> files, most other functionality is 2564 potentially some of the <filename>linux-*.inc</filename> files,
2546 centralized and the defaults of the class normally work well. 2565 most other functionality is centralized and the defaults of the
2566 class normally work well.
2547 </para> 2567 </para>
2548 2568
2549 <para> 2569 <para>
2550 If you are extending an existing kernel, it is usually a matter of adding a 2570 If you are extending an existing kernel recipe, it is usually
2551 suitable defconfig file. 2571 a matter of adding a suitable <filename>defconfig</filename>
2552 The file needs to be added into a location similar to defconfig files 2572 file.
2553 used for other machines in a given kernel. 2573 The file needs to be added into a location similar to
2574 <filename>defconfig</filename> files used for other machines
2575 in a given kernel recipe.
2554 A possible way to do this is by listing the file in the 2576 A possible way to do this is by listing the file in the
2555 <filename>SRC_URI</filename> and adding the machine to the expression in 2577 <filename>SRC_URI</filename> and adding the machine to the
2578 expression in
2556 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'>COMPATIBLE_MACHINE</ulink></filename>: 2579 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'>COMPATIBLE_MACHINE</ulink></filename>:
2557 <literallayout class='monospaced'> 2580 <literallayout class='monospaced'>
2558 COMPATIBLE_MACHINE = '(qemux86|qemumips)' 2581 COMPATIBLE_MACHINE = '(qemux86|qemumips)'
@@ -2587,7 +2610,7 @@
2587 </para> 2610 </para>
2588 2611
2589 <para> 2612 <para>
2590 Following is an example for qemuarm: 2613 Following is an example for "qemuarm" machine:
2591 <literallayout class='monospaced'> 2614 <literallayout class='monospaced'>
2592 HAVE_TOUCHSCREEN=1 2615 HAVE_TOUCHSCREEN=1
2593 HAVE_KEYBOARD=1 2616 HAVE_KEYBOARD=1
@@ -2714,8 +2737,7 @@
2714 2737
2715 <para> 2738 <para>
2716 Aside from this wiki page, several examples exist in the 2739 Aside from this wiki page, several examples exist in the
2717 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/tree/meta-skeleton'><filename>meta-skeleton</filename></ulink> 2740 <filename>meta-skeleton</filename> layer found in the
2718 layer found in the
2719 <link linkend='source-directory'>Source Directory</link>: 2741 <link linkend='source-directory'>Source Directory</link>:
2720 <itemizedlist> 2742 <itemizedlist>
2721 <listitem><para><filename>conf/multilib-example.conf</filename> 2743 <listitem><para><filename>conf/multilib-example.conf</filename>
@@ -2746,7 +2768,8 @@
2746 done using the 2768 done using the
2747 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></ulink> 2769 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></ulink>
2748 variable. 2770 variable.
2749 Eventually, all recipes will be covered and this list will be unneeded. 2771 Eventually, all recipes will be covered and this list will
2772 not be needed.
2750 </para> 2773 </para>
2751 2774
2752 <para> 2775 <para>