From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx1.pokylinux.org (Postfix) with ESMTP id E41164C8120C for ; Mon, 20 Dec 2010 14:24:01 -0600 (CST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 20 Dec 2010 12:23:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.60,203,1291622400"; d="scan'208";a="585536784" Received: from scottrif-desktop.jf.intel.com (HELO localhost) ([10.7.201.54]) by orsmga002.jf.intel.com with ESMTP; 20 Dec 2010 12:23:58 -0800 Message-Id: <222a10c9a43ecebd9a17c51b8dbaf7e2a0aea738.1292876262.git.scott.m.rifenbark@intel.com> In-Reply-To: References: From: Scott Rifenbark Date: Fri, 17 Dec 2010 14:53:40 -0800 To: poky@yoctoproject.org CC: Subject: [PATCH 26/29] documentation/bsp-guide/bsp.xml: Updated the Linux Kernel Configuration section X-BeenThere: poky@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Poky build system developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2010 20:24:02 -0000 These changes are another round of edits from Tom Z. Signed-off-by: Scott Rifenbark --- documentation/bsp-guide/bsp.xml | 89 +++++++++++++++++++++++++++----------- 1 files changed, 63 insertions(+), 26 deletions(-) diff --git a/documentation/bsp-guide/bsp.xml b/documentation/bsp-guide/bsp.xml index 75640cc..ff8a481 100644 --- a/documentation/bsp-guide/bsp.xml +++ b/documentation/bsp-guide/bsp.xml @@ -324,21 +324,22 @@ meta-<bsp_name>/recipes-kernel/linux/linux-wrs_git.bbappend For your BSP you typically want to use an existing Poky kernel found in the Poky repository at meta/recipes-kernel/kernel. - You can append your specific changes to the kernel by using a - .bbappend file, which is located in the - meta-<bsp_name>/recipes-kernel/linux + You can append your specific changes to the kernel recipe by using an append file, + which is located in the + meta-<bsp_name>/recipes-kernel/linux directory. - Consider a BSP that uses the linux-yocto-stable_git.bb kernel. - You would use the linux-yocto-stable_git.bbappend file to add + Consider a BSP that uses the linux-yocto-stable_git.bb kernel, + which is the preferred kernel to use for developing a new BSP using the Yocto Project. + You would use the linux-yocto-stable_git.bbappend file to append specific BSP settings to the kernel, thus configuring the kernel for your particular BSP. Consider an example for the existing "crownbay" BSP. - The .bbaappend file used for the "crownbay" BSP is: + The append file used for the "crownbay" BSP is: -meta-crownbay/recipes-kernel/linux/linux-wrs_git.bbappend +meta-crownbay/recipes-kernel/linux/linux-yocto-stable_git.bbappend The file contains the following: @@ -346,31 +347,67 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}" COMPATIBLE_MACHINE_crownbay = "cronwbay" KMACHINE_crownbay = "crownbay" - This .bbappend file adds "crownbay" as a compatible machine, + This append file adds "crownbay" as a compatible machine, and additionally sets a Yocto Kernel-specific variable that identifies the name of the BSP branch to use in the GIT repository to find configuration information. - - For an established BSP the configuration information is incorporated directly into the - git tree. - For a new BSP, however, the .bbappend file needs to - include its own set of configuration options in a file called - defconfig located in a directory that matches the recipe name. + + One thing missing in this particular BSP, which you will typically need when + developing a BSP, is the kernel configuration (.config) for your BSP. + When developing a BSP, you probably have a kernel configuration file or a set of kernel + configuration files that, when taken together, define the kernel configuration for your BSP. + You can accomplish this definition by putting the configurations in a file or a set of files + inside a directory located at the same level as your append file and having the same name + as the kernel. + With all these conditions met simply reference those files in a SRC_URI statement in the append + file. + + + For example, suppose you had a set of configuration options in a file called + defonfig. + If you put that file inside a directory named + /linux-yocto-stable_git and then added + a SRC_URI statement such as the following to the append file, those configuration + options will be picked up and applied when the kernel is built. SRC_URI += "file://defconfig" - Once a BSP is committed, the Yocto kernel maintainer moves this configuration information - into the git tree so that the .bbappend file does not need to locate - its own configuration options. - Again, the initial configuration options using the SRC_URI are put into a - directory named - meta-<bsp_name>/recipes/linux/linux-yocto-stable. - - - You can find more information about creating a BSP that is based on an existing similar - BSP by reading the "Creating a BSP Based on an Existing Similar BSP" section in the - "Yocto Project - Kernel Architecture and Use Manual". + + + As mentioned earlier, you can group related configurations into multiple files and + name them all in the SRC_URI statement as well. + For example, you could group separate configurations specifically for ethernet and graphics + into their own files and add those by using a SRC_URI statement like the + following in your append file: + +SRC_URI += "file://defconfig \ + file://eth.cfg \ + file://gfx.cfg" + + + + The FILESEXTRAPATHS variable is boilerplated here in order to make it easy to do that. + It basically allows those configuration files to be found by the build process. + + + Other methods exist to accomplish grouping and defining configuration options. + For example, you could directly add configuration options to the Yocto kernel + wrs_meta branch for your BSP. + The configuration options will likely end up in that location anyway if the BSP gets + added to the Yocto Project. + For information on how to add these configurations directly, see the + "Yocto Project Kernel Architecture and Use Manual" on the + Yocto Project website + Documentation Page + + + In general, however, the Yocto Project maintainers take care of moving the SRC_URI-specified + configuration options to the wrs_meta branch. + Not only is it easier for BSP developers to not have to worry about putting those + configurations in the branch, but having the manintainers do it allows them to apply + 'global' knowledge about the kinds of common configuration options multiple BSPs in + the tree are typically using. + This allows for promotion of common configurations into common features. -- 1.7.0.4