From 43d93f3426c44413acdb2284e0362d0d9d06bf8a Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Tue, 18 Mar 2014 15:53:55 -0600 Subject: 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 Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 103 +++++++++++++-------- 1 file changed, 63 insertions(+), 40 deletions(-) (limited to 'documentation/dev-manual/dev-manual-common-tasks.xml') 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 @@ Adding a New Machine - Adding a new machine to the Yocto Project is a straightforward process. - This section provides information that gives you an idea of the changes you must make. - The information covers adding machines similar to those the Yocto Project already supports. - Although well within the capabilities of the Yocto Project, adding a totally new architecture - might require - changes to gcc/eglibc and to the site information, which is - beyond the scope of this manual. + Adding a new machine to the Yocto Project is a straight forward + process. + This section describes how to add machines that are similar + to those that the Yocto Project already supports. + + Although well within the capabilities of the Yocto Project, + adding a totally new architecture might require + changes to gcc/eglibc and to the site + information, which is beyond the scope of this manual. + For a complete example that shows how to add a new machine, see the "Creating a New BSP Layer Using the yocto-bsp Script" - in the Yocto Project Board Support Package (BSP) Developer's Guide. + section in the Yocto Project Board Support Package (BSP) Developer's Guide.
Adding the Machine Configuration File - To add a machine configuration, you need to add a .conf file - with details of the device being added to the conf/machine/ file. - The name of the file determines the name the OpenEmbedded build system - uses to reference the new machine. + To add a new machine, you need to add a new machine + configuration file to the layer's + conf/machine directory. + This configuration file provides details about the device + you are adding. + + + + The OpenEmbedded build system uses the root name of the + machine configuration file to reference the new machine. + For example, given a machine configuration file named + crownbay.conf, the build system + recognizes the machine as "crownbay". - The most important variables to set in this file are as follows: + The most important variables you must set in your machine + configuration file are as follows: TARGET_ARCH (e.g. "arm") @@ -2512,9 +2525,10 @@ - You can find full details on these variables in the reference section. - You can leverage many existing machine .conf files from - meta/conf/machine/. + You can find full details on these variables in the reference + section. + You can leverage existing machine .conf + files from meta-yocto-bsp/conf/machine/.
@@ -2522,37 +2536,46 @@ Adding a Kernel for the Machine - The OpenEmbedded build system needs to be able to build a kernel for the machine. - You need to either create a new kernel recipe for this machine, or extend an - existing recipe. - You can find several kernel examples in the - Source Directory at meta/recipes-kernel/linux + The OpenEmbedded build system needs to be able to build a kernel + for the machine. + You need to either create a new kernel recipe for this machine, + or extend an existing kernel recipe. + You can find several kernel recipe examples in the + Source Directory at + meta/recipes-kernel/linux that you can use as references. - If you are creating a new recipe, normal recipe-writing rules apply for setting - up a + If you are creating a new kernel recipe, normal recipe-writing + rules apply for setting up a SRC_URI. Thus, you need to specify any necessary patches and set - S to point at the source code. - You need to create a configure task that configures the - unpacked kernel with a defconfig. - You can do this by using a make defconfig command or, - more commonly, by copying in a suitable defconfig file and then running + S + to point at the source code. + You need to create a do_configure task that + configures the unpacked kernel with a + defconfig file. + You can do this by using a make defconfig + command or, more commonly, by copying in a suitable + defconfig file and then running make oldconfig. - By making use of inherit kernel and potentially some of the - linux-*.inc files, most other functionality is - centralized and the defaults of the class normally work well. + By making use of inherit kernel and + potentially some of the linux-*.inc files, + most other functionality is centralized and the defaults of the + class normally work well. - If you are extending an existing kernel, it is usually a matter of adding a - suitable defconfig file. - The file needs to be added into a location similar to defconfig files - used for other machines in a given kernel. + If you are extending an existing kernel recipe, it is usually + a matter of adding a suitable defconfig + file. + The file needs to be added into a location similar to + defconfig files used for other machines + in a given kernel recipe. A possible way to do this is by listing the file in the - SRC_URI and adding the machine to the expression in + SRC_URI and adding the machine to the + expression in COMPATIBLE_MACHINE: COMPATIBLE_MACHINE = '(qemux86|qemumips)' @@ -2587,7 +2610,7 @@ - Following is an example for qemuarm: + Following is an example for "qemuarm" machine: HAVE_TOUCHSCREEN=1 HAVE_KEYBOARD=1 @@ -2714,8 +2737,7 @@ Aside from this wiki page, several examples exist in the - meta-skeleton - layer found in the + meta-skeleton layer found in the Source Directory: conf/multilib-example.conf @@ -2746,7 +2768,8 @@ done using the BBCLASSEXTEND variable. - Eventually, all recipes will be covered and this list will be unneeded. + Eventually, all recipes will be covered and this list will + not be needed. -- cgit v1.2.3-54-g00ecf