From fd67c63d0d3e31cc1d44abc413cc9f7c19ab86d8 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 1 Oct 2012 13:56:44 -0700 Subject: [PATCH] documentation: dev-manual - Changes from Crown Bay to fri2 These changes are partial for converting the example for BSP creation from Crown Bay to Fish River Island 2. (From yocto-docs rev: c7fc78a8453ad363138764aa30e377b56ce49f2b) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-bsp-appendix.xml | 152 ++++++++++-------- 1 file changed, 86 insertions(+), 66 deletions(-) diff --git a/documentation/dev-manual/dev-manual-bsp-appendix.xml b/documentation/dev-manual/dev-manual-bsp-appendix.xml index c5a6c92cad..27e4b48ea9 100644 --- a/documentation/dev-manual/dev-manual-bsp-appendix.xml +++ b/documentation/dev-manual/dev-manual-bsp-appendix.xml @@ -11,10 +11,10 @@ The example assumes the following: No previous preparation or use of the Yocto Project. - Use of the Crown Bay Board Support Package (BSP) as a "base" BSP from + Use of the Fish River Island 2 Board Support Package (BSP) as a "base" BSP from which to work. - The example begins with the Crown Bay BSP as the starting point - but ends by building a new 'atom-pc' BSP, which was based on the Crown Bay BSP. + The example begins with the Fish River Island 2 BSP as the starting point + but ends by building a new 'atom-pc' BSP, which was based on the Fish River Island 2 BSP. Shell commands assume bash Example was developed on an Intel-based Core i7 platform running @@ -113,10 +113,10 @@ For this example, the base BSP is the Intel Atom Processor E660 with Intel Platform - Controller Hub EG20T Development Kit, which is otherwise referred to as "Crown Bay." - The BSP layer is meta-crownbay. + Controller Hub EG20T Development Kit, which is otherwise referred to as "Fish River Island 2." + The BSP layer is meta-fri2. The base BSP is simply the BSP - we will be using as a starting point, so don't worry if you don't actually have Crown Bay + we will be using as a starting point, so don't worry if you don't actually have Fish River Island 2 hardware. The remainder of the example transforms the base BSP into a BSP that should be able to boot on generic atom-pc (netbook) hardware. @@ -149,7 +149,7 @@ parent directory. The following steps will automatically create the meta-intel directory and the contained - meta-crownbay starting point in both the Git and the tarball cases. + meta-fri2 starting point in both the Git and the tarball cases. @@ -160,16 +160,16 @@ $ git clone git://git.yoctoproject.org/meta-intel.git $ cd meta-intel - Alternatively, you can start with the downloaded Crown Bay tarball. + Alternatively, you can start with the downloaded Fish River Island 2 tarball. You can download the &DISTRO_NAME; version of the BSP tarball from the Downloads page of the Yocto Project website. Here is the specific link for the tarball needed for this example: - . + . Again, be sure that you are already in the poky directory as described previously before installing the tarball: - $ tar xfj crownbay-noemgd-&DISTRO_NAME;-&POKYVERSION;.tar.bz2 + $ tar xfj fri2-noemgd-&DISTRO_NAME;-&POKYVERSION;.tar.bz2 $ cd meta-intel @@ -199,7 +199,7 @@ Now that you have set up the Source Directory and included the base BSP files, you need to create a new layer for your BSP. - To create your BSP layer, you simply copy the meta-crownbay + To create your BSP layer, you simply copy the meta-fri2 layer to a new layer. @@ -212,7 +212,7 @@ To start your new layer, just copy the new layer alongside the existing BSP layers in the meta-intel directory: - $ cp -a meta-crownbay/ meta-mymachine + $ cp -a meta-fri2/ meta-mymachine @@ -222,7 +222,7 @@ Right now you have two identical BSP layers with different names: - meta-crownbay and meta-mymachine. + meta-fri2 and meta-mymachine. You need to change your configurations so that they work for your new BSP and your particular hardware. The following sections look at each of these areas of the BSP. @@ -238,15 +238,15 @@ First, since in this example the new BSP will not support EMGD, we will get rid of the - crownbay.conf file and then rename the - crownbay-noemgd.conf file to mymachine.conf. + fri2.conf file and then rename the + fri2-noemgd.conf file to mymachine.conf. Much of what we do in the configuration directory is designed to help the OpenEmbedded build system work with the new layer and to be able to find and use the right software. The following two commands result in a single machine configuration file named mymachine.conf. - $ rm meta-mymachine/conf/machine/crownbay.conf - $ mv meta-mymachine/conf/machine/crownbay-noemgd.conf \ + $ rm meta-mymachine/conf/machine/fri2.conf + $ mv meta-mymachine/conf/machine/fri2-noemgd.conf \ meta-mymachine/conf/machine/mymachine.conf @@ -254,10 +254,10 @@ Next, we need to make changes to the mymachine.conf itself. The only changes we want to make for this example are to the comment lines. - Changing comments, of course, is never strictly necessary, but it's alway good form to make + Changing comments, of course, is never strictly necessary, but it's always good form to make them reflect reality as much as possible. - Here, simply substitute the Crown Bay name with an appropriate name for the BSP + Here, simply substitute the Fish River Island 2 name with an appropriate name for the BSP (mymachine in this case) and change the description to something that describes your hardware. @@ -267,7 +267,7 @@ PREFERRED_VERSION_linux-yocto statement. This statement identifies the kernel that the BSP is going to use. In this case, the BSP is using linux-yocto, which is the - current Yocto Project kernel based on the Linux 3.2 release. + current Yocto Project kernel based on the Linux 3.4 release. @@ -281,18 +281,18 @@ - The file contains these statements that reference the Crown Bay BSP: + The file contains these statements that reference the Fish River Island 2 BSP: - BBFILE_COLLECTIONS += "crownbay" - BBFILE_PATTERN_crownbay := "^${LAYERDIR}/" - BBFILE_PRIORITY_crownbay = "6" + BBFILE_COLLECTIONS += "fri2" + BBFILE_PATTERN_fri2 := "^${LAYERDIR}/" + BBFILE_PRIORITY_fri2 = "6" - LAYERDEPENDS_crownbay = "intel" + LAYERDEPENDS_fri2 = "intel" - Simply substitute the machine string name crownbay + Simply substitute the machine string name fri2 with the new machine name mymachine to get the following: BBFILE_COLLECTIONS += "mymachine" @@ -331,8 +331,8 @@ the remaining one that doesn't support EMGD. These commands take care of the recipes-bsp recipes: - $ rm -rf meta-mymachine/recipes-bsp/formfactor/formfactor/crownbay - $ mv meta-mymachine/recipes-bsp/formfactor/formfactor/crownbay-noemgd/ \ + $ rm -rf meta-mymachine/recipes-bsp/formfactor/formfactor/fri2 + $ mv meta-mymachine/recipes-bsp/formfactor/formfactor/fri2-noemgd/ \ meta-mymachine/recipes-bsp/formfactor/formfactor/mymachine @@ -347,8 +347,8 @@ be sure to rename remaining directories appropriately. The following commands clean up the recipes-graphics directory: - $ rm -rf meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay - $ mv meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd \ + $ rm -rf meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/fri2 + $ mv meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/fri2-noemgd \ meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/mymachine @@ -369,7 +369,7 @@ The recipe for that kernel is not located in the BSP layer but rather in the Source Directory at meta/recipes-kernel/linux and is - named linux-yocto_3.2.bb. + named linux-yocto_3.4.bb. The SRCREV_machine and SRCREV_meta statements point to the exact commits used by the Yocto Project development team in their source repositories that identify the right kernel for our hardware. @@ -382,30 +382,38 @@ However, in the meta-mymachine layer in recipes-kernel/linux resides a .bbappend - file named linux-yocto_3.2.bbappend that - appends information to the recipe of the same name in meta/recipes-kernel/linux. + file named linux-yocto_3.4.bbappend that + appends the information to the recipe of the same name + that is found in meta/recipes-kernel/linux. Thus, the SRCREV statements in the append file override the more general statements found in meta. The SRCREV statements in the append file currently identify - the kernel that supports the Crown Bay BSP with and without EMGD support. + the kernel that supports the Fish River Island 2 BSP with and without EMGD support. Here are the statements: The commit ID strings used in this manual might not match the actual commit - ID strings found in the linux-yocto_3.2.bbappend file. + ID strings found in the linux-yocto_3.4.bbappend file. For the example, this difference does not matter. - SRCREV_machine_pn-linux-yocto_crownbay ?= \ - "211fc7f4d10ec2b82b424286aabbaff9254b7cbd" - SRCREV_meta_pn-linux-yocto_crownbay ?= \ - "514847185c78c07f52e02750fbe0a03ca3a31d8f" + SRCREV_machine_pn-linux-yocto_fri2 ?= \ + "59c3ff750831338d05ab67d5efd7fc101c451aff" + #SRCREV_meta_pn-linux-yocto_fri2 ?= \ + "c5bddf8ea379406ffec550528e17b777a0eba24b" - SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= \ - "211fc7f4d10ec2b82b424286aabbaff9254b7cbd" - SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= \ - "514847185c78c07f52e02750fbe0a03ca3a31d8f" + SRCREV_machine_pn-linux-yocto_fri2-noemgd ?= \ + "59c3ff750831338d05ab67d5efd7fc101c451aff" + #SRCREV_meta_pn-linux-yocto_fir2-noemgd ?= \ + "c5bddf8ea379406ffec550528e17b777a0eba24b" + The SRCREV_meta_pn-linux-yocto_fir2-noemgd + statements in the Fish River Island 2 append file are identical to those in the + general linux-yocto_3.4.bbappend recipe, which is + found in meta/recipes-kernel/linux. + For this reason they are commented out in the Fish River Island 2 + append file. + In this case, there is no need to override the statements. @@ -415,11 +423,12 @@ The bottom pair identifies the kernel that we will use: linux-yocto. At this point though, the unique commit strings all are still associated with - Crown Bay and not meta-mymachine. + Fish River Island 2 and not meta-mymachine. - To fix this situation in linux-yocto_3.2.bbappend, + To fix this situation in linux-yocto_3.4.bbappend + for mymachine, we delete the two SRCREV statements that support EMGD (the top pair). We also change the remaining pair to specify mymachine @@ -428,26 +437,34 @@ kernel. In this case, because we're working with the &DISTRO_NAME; branch of everything, we need to use the SRCREV values for the atom-pc branch - that are associated with the &DISTRO_NAME; release. - To find those values, we need to find the SRCREV - values that &DISTRO_NAME; uses for the atom-pc branch, which we find in the - poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.2.bbappend + that are associated with the &DISTRO_NAME; release. + + + + To find the machine value, we need to find the SRCREV + value that &DISTRO_NAME; uses for the atom-pc branch, which we find in the + poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.4.bbappend file. + The machine SRCREV we want is in the + SRCREV_machine_atom-pc variable. + + + + The meta SRCREV isn't specified in this file, so if you + needed it, you would find it in the base kernel recipe in the + poky/meta/recipes-kernel/linux/linux-yocto_3.4.bb. + Recall that for this example the commit ID's for the SRCREV + meta statements are identical and are do not have to be used in the + mymachine append file. - The machine SRCREV we want is in the - SRCREV_machine_atom-pc variable. - The meta SRCREV isn't specified in this file, so it must be - specified in the base kernel recipe in the - poky/meta/recipes-kernel/linux/linux-yocto_3.2.bb - file, in the SRCREV_meta variable found there. Here are the final SRCREV statements: SRCREV_machine_pn-linux-yocto_mymachine ?= \ - "f29531a41df15d74be5ad47d958e4117ca9e489e" - SRCREV_meta_pn-linux-yocto_mymachine ?= \ - "b14a08f5c7b469a5077c10942f4e1aec171faa9d" + "0985844fa6235422c67ef269952fa4e765f252f9" + #SRCREV_meta_pn-linux-yocto_mymachine ?= \ + "463299bc2e533e1bd38b0053ae7b210980f269c3" @@ -463,8 +480,8 @@ exact commit strings in the Yocto Project source repositories you need to change the SRCREV statements. You can find all the machine and meta - branch points (commits) for the linux-yocto-3.2 kernel at - . + branch points (commits) for the linux-yocto-3.4 kernel at + . @@ -475,7 +492,7 @@ branch Click on the commit column header to view the top commit Copy the commit string for use in the - linux-yocto_3.2.bbappend file + linux-yocto_3.4.bbappend file @@ -486,7 +503,7 @@ - Also in the linux-yocto_3.2.bbappend file are + Also in the linux-yocto_3.4.bbappend file are COMPATIBLE_MACHINE, KMACHINE, and @@ -494,16 +511,19 @@ Two sets of these exist: one set supports EMGD and one set does not. Because we are not interested in supporting EMGD those three can be deleted. The remaining three must be changed so that mymachine replaces - crownbay-noemgd and crownbay. + fri2-noemgd and fri2. + + + Because we are using the atom-pc branch for this new BSP, we can also find the exact branch we need for the KMACHINE and KBRANCH variables in our new BSP from the value we find in the - poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.2.bbappend + poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.4.bbappend file we looked at in a previous step. In this case, the values we want are in the KMACHINE_atom-pc variable and the KBRANCH_atom-pc variables in that file. - Here is the final linux-yocto_3.2.bbappend file after all + Here is the final linux-yocto_3.4.bbappend file after all the edits: FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" @@ -672,7 +692,7 @@ 260538368 2012-04-27 01:44 core-image-sato-mymachine-20120427025051.hddimg The previous instructions are also present in the README that was copied - from meta-crownbay, which should also be updated to reflect the specifics of your + from meta-fri2, which should also be updated to reflect the specifics of your new BSP. That file and the README.hardware file in the top-level poky directory