From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 80E9EE00970; Fri, 24 Mar 2017 07:26:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [208.80.206.84 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from smtp684.redcondor.net (smtp684.redcondor.net [208.80.206.84]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id C23D7E004E5 for ; Fri, 24 Mar 2017 07:26:37 -0700 (PDT) Received: from astoria.ccjclearline.com ([64.235.106.9]) by smtp684.redcondor.net ({700db0a8-6fb7-4c8b-9b2a-6812225182d8}) via TCP (outbound) with ESMTPS id 20170324142625224_0684; Fri, 24 Mar 2017 14:26:25 +0000 X-RC-FROM: Received: from [174.118.92.171] (port=45190 helo=crashcourse.ca) by astoria.ccjclearline.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.80) (envelope-from ) id 1crQAT-0000m4-Ob; Fri, 24 Mar 2017 10:26:17 -0400 Date: Fri, 24 Mar 2017 10:26:15 -0400 (EDT) From: "Robert P. J. Day" X-X-Sender: rpjday@localhost.localdomain To: Yocto discussion list Message-ID: User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 X-MAG-OUTBOUND: ccj.redcondor.net@64.235.106.9/32 Cc: Saul Wold Subject: [PATCH][yocto-docs] BSP Guide: Numerous aesthetic tweaks/clarifications X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2017 14:26:39 -0000 Content-Type: text/plain; charset=US-ASCII * Outside of a title, use "BSP layer", not "BSP Layer" * Add details about YP reference boards. * Minor grammatical clarification in places. * Add to even single paragraph notes for consistency. Signed-off-by: Robert P. J. Day --- diff --git a/documentation/bsp-guide/bsp.xml b/documentation/bsp-guide/bsp.xml index 4d0ace0..63848ad 100644 --- a/documentation/bsp-guide/bsp.xml +++ b/documentation/bsp-guide/bsp.xml @@ -19,7 +19,7 @@ - This guide presents information about BSP Layers, defines a structure for components + This guide presents information about BSP layers, defines a structure for components so that BSPs follow a commonly understood layout, discusses how to customize a recipe for a BSP, addresses BSP licensing, and provides information that shows you how to create and manage a @@ -33,7 +33,7 @@ A BSP consists of a file structure inside a base directory. Collectively, you can think of the base directory, its file structure, - and the contents as a BSP Layer. + and the contents as a BSP layer. Although not a strict requirement, layers in the Yocto Project use the following well-established naming convention: @@ -77,8 +77,9 @@ meta-yocto-bsp layer is part of the shipped poky repository. The meta-yocto-bsp layer maintains several - BSPs such as the Beaglebone, EdgeRouter, and generic versions of - both 32 and 64-bit IA machines. + Yocto Project "reference" BSPs such as the ARM-based Beaglebone, + MIPS-based Ubiquiti EdgeRouter, PowerPC-based MPC8315E-RDB, + and generic versions of both 32 and 64-bit IA machines. @@ -94,7 +95,7 @@ The layer's base directory (meta-bsp_name) - is the root of the BSP Layer. + is the root of the BSP layer. This root is what you add to the BBLAYERS variable in the conf/bblayers.conf file found in the @@ -179,7 +180,7 @@ - Before looking at the common form for the file structure inside a BSP Layer, + Before looking at the common form for the file structure inside a BSP layer, you should be aware that some requirements do exist in order for a BSP to be considered compliant with the Yocto Project. For that list of requirements, see the @@ -188,7 +189,7 @@ - Below is the common form for the file structure inside a BSP Layer. + Below is the common form for the file structure inside a BSP layer. While you can use this basic form for the standard, realize that the actual structures for specific BSPs could differ. @@ -572,7 +573,8 @@ - To use an include file, you simply include them in the + To use an include file, you simply include or + require it in the machine configuration file. For example, the Raspberry Pi BSP raspberrypi3.conf contains the @@ -956,28 +958,28 @@ Instructions on how to boot the BSP build from the BSP layer. Instructions on how to boot the binary images - contained in the binary directory, + contained in the binary/ directory, if present. Information on any known bugs or issues that users should know about when either building or booting the BSP binaries. README.sources File: - You must include a README.sources in the - meta-bsp_name directory. - This file specifies exactly where you can find the sources used to - generate the binary images contained in the - binary directory, if present. + If your BSP layer includes a binary/ directory + with at least one binary image, then it must also include a top-level + README.sources file that explains exactly + where you can find the sources used to generate those binary images. Layer Configuration File: - You must include a conf/layer.conf in the + You must include a conf/layer.conf file in the meta-bsp_name directory. This file identifies the meta-bsp_name BSP layer as a layer to the build system. Machine Configuration File: You must include one or more - conf/machine/bsp_name.conf - files in the meta-bsp_name directory. + conf/machine/machine.conf + machine definition files in the + meta-bsp_name directory. These configuration files define machine targets that can be built using the BSP layer. Multiple machine configuration files define variations of machine @@ -989,12 +991,22 @@ hardware. If you do have very different targets, you should create separate BSP layers for each target. - It is completely possible for a developer to structure the - working repository as a conglomeration of unrelated BSP - files, and to possibly generate BSPs targeted for release - from that directory using scripts or some other mechanism - (e.g. meta-yocto-bsp layer). - Such considerations are outside the scope of this document. + + + It is completely possible for a developer to structure the + working repository as a conglomeration of unrelated BSP + files, and to possibly generate BSPs targeted for release + from that directory using scripts or some other mechanism + (e.g. meta-yocto-bsp layer). + Such considerations are outside the scope of this document. + + + In any event, the meta-yocto-bsp layer should be + considered a special case as it defines the family of Yocto Project + reference boards, which necessarily cover the set of supported + architectures. + + @@ -1025,16 +1037,20 @@ purposes, you should put the images and artifacts within a binary/ subdirectory located in the meta-bsp_name directory. - If you do include a bootable image as part of the BSP and the image - was built by software covered by the GPL or other open source licenses, - it is your responsibility to understand - and meet all licensing requirements, which could include distribution - of source files. + + + If you do include a bootable image as part of the BSP and the image + was built by software covered by the GPL or other open source licenses, + it is your responsibility to understand and meet all licensing + requirements, which could include distribution of source files. + + + Use a Yocto Linux Kernel: Kernel recipes in the BSP should be based on a Yocto Linux kernel. Basing your recipes on these kernels reduces the costs for maintaining the BSP and increases its scalability. - See the Yocto Linux Kernel category in the + See the "Yocto Linux Kernel" category in the Source Repositories for these kernels. @@ -1056,7 +1072,7 @@ section in the Yocto Project Development Manual. - Ensure your directory structure in the BSP layer + Ensure that the directory structure in the BSP layer that supports your machine is such that it can be found by the build system. See the example later in this section for more information. @@ -1083,40 +1099,40 @@ Following is a specific example to help you better understand the process. - Consider an example that customizes a recipe by adding + Consider an example that customizes a single recipe by adding a BSP-specific configuration file named interfaces to the - init-ifupdown_1.0.bb recipe for machine "xyz" where the - BSP layer also supports several other machines. + init-ifupdown_1.0.bb recipe exclusively for machine "xyz", + where the BSP layer supports several other machines. + + Do the following: - Edit the init-ifupdown_1.0.bbappend file so that it - contains the following: + In the meta-xyz/recipes-core/init-ifupdown/ + directory, create the init-ifupdown_1.0.bbappend file + so that it contains the following: FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - The append file needs to be in the - meta-xyz/recipes-core/init-ifupdown directory. Create and place the new interfaces - configuration file in the BSP's layer here: - - meta-xyz/recipes-core/init-ifupdown/files/xyz-machine-one/interfaces - + configuration file in the BSP layer at + meta-xyz/recipes-core/init-ifupdown/files/xyz-machine-one/interfaces. + If the meta-xyz layer did not support - multiple machines, you would place the + multiple machines, or this customization applied to all of the + machines defined by this BSP layer, you could place the interfaces configuration file in the - layer here: - - meta-xyz/recipes-core/init-ifupdown/files/interfaces - + layer at + meta-xyz/recipes-core/init-ifupdown/files/interfaces. + The FILESEXTRAPATHS variable in the append files extends the search path the build system uses to find files during the build. Consequently, for this example you need to have the - files directory in the same location + files/ directory in the same location as your append file. @@ -1227,6 +1243,7 @@ + Pre-compiled images are bundled with a time-limited kernel that runs for a predetermined amount of time (10 days) before it forces @@ -1234,6 +1251,7 @@ This limitation is meant to discourage direct redistribution of the image. You must eventually rebuild the image if you want to remove this restriction. + @@ -1367,11 +1385,13 @@ necessary to create a BSP and perform basic kernel maintenance on that BSP using the tools. + You can also use the yocto-layer tool to create a "generic" layer. For information on this tool, see the "Creating a General Layer Using the yocto-layer Script" section in the Yocto Project Development Guide. + -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================