From 74c3203ba211b25a9100844635ac18d2fb8b0d6a Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 23 Apr 2018 17:07:03 -0700 Subject: brief-yoctoprojectqs: Added sections on layers Added a section on adding a machine layer. Used Altera as an example. Also, added a section on creating a general layer. (From yocto-docs rev: fc36f006bd483a5c26d2b79a18431d16ec27dc00) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../brief-yoctoprojectqs/brief-yoctoprojectqs.xml | 138 ++++++++++++++++++++- 1 file changed, 137 insertions(+), 1 deletion(-) (limited to 'documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml') diff --git a/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml b/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml index 116dfbd145..1fae145bbc 100644 --- a/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml +++ b/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml @@ -33,6 +33,8 @@ Welcome! This short document steps you through the process for a typical image build using the Yocto Project. + The document also introduces how to add a machine layer and a + general layer to your Yocto Project development environment. You will use Yocto Project to build a reference embedded OS called Poky. @@ -200,7 +202,7 @@ Later, when the build completes, the Build Directory contains all the files created during the build. - + Examine Your Local Configuration File: When you set up the build environment, a local configuration file named @@ -270,6 +272,140 @@ +
+ Adding a Hardware Layer + + + So far, all you have done is quickly built an image suitable + for emulation only. + This section shows you how you can add a hardware layer into + the Yocto Project development environment. + + + + A hardware layer provides the metadata to support specific + hardware. + By convention, hardware layers (i.e. Board Support Packages) + start with the string "meta-". + + + + Follow these steps to add a hardware layer: + + + Find a Layer: + Lots of hardware layers exist. + The Yocto Project + Source Repositories + has many hardware layers. + This example adds the + meta-altera + hardware layer. + + + Clone the Layer + Use Git to make a local copy of the layer on your machine. + You can put the copy in the top level of the copy of the + Poky repository created earlier: + + $ cd ~/poky + $ git clone https://github.com/kraj/meta-altera.git + Cloning into 'meta-altera'... + remote: Counting objects: 25170, done. + remote: Compressing objects: 100% (350/350), done. + remote: Total 25170 (delta 645), reused 719 (delta 538), pack-reused 24219 + Receiving objects: 100% (25170/25170), 41.02 MiB | 1.64 MiB/s, done. + Resolving deltas: 100% (13385/13385), done. + Checking connectivity... done. + + The hardware layer now exists inside as + meta-altera and contains all the + metadata needed to support hardware from Altera, which + is owned by Intel. + + + Change the Configuration to Build for a Specific Machine: + The + MACHINE + variable in the local.conf file + specifies the machine for the build. + For this example, set the MACHINE + variable to "cyclone5". + The build system will use the machine configurations here: + . + + See the + "Examine Your Local Configuration File" + step earlier for more information on configuring the + build. + + + + Add Your Layer to the Layer Configuration File: + Before you can use a layer during a build, you must add it + to your bblayers.conf file, which + is found in the + Build Directory's + conf directory. + + Use the bitbake-layers add-layer + command: + + $ cd ~/poky/build + $ bitbake-layers add-layer ../meta-altera + NOTE: Starting bitbake server... + Parsing recipes: 100% |##################################################################| Time: 0:00:32 + Parsing of 918 .bb files complete (0 cached, 918 parsed). 1401 targets, 123 skipped, 0 masked, 0 errors. + + You can find more information on adding layers in the + "Adding a Layer Using the bitbake-layers Script" + section. + + + Completing these steps has added the + meta-altera layer to your Yocto Project + development environment and configured it to build for the + "imx6sxsabresd" machine. + + The previous steps are for demonstration purposes only. + If you were to attempt to build an image for the + "cyclone5" build, you should read the Altera + README. + + +
+ +
+ Adding Your Own Layer + + + Maybe you have an application or specific set of behaviors you + need to isolate. + You can create your own layer using the + bitbake-layers create-layer command. + The tool automates layer creation by setting up a + subdirectory with a layer.conf + configuration file, a recipes-example + subdirectory that contains an example.bb + recipe, a licensing file, and a README. + + + + The following commands run the tool to create a layer named + meta-mylayer in the + poky directory: + + $ cd ~/poky + $ bitbake-layers create-layer meta-mylayer + NOTE: Starting bitbake server... + Add your new layer with 'bitbake-layers add-layer meta-mylayer' + + For more information on layers and how to create them, see the + "Creating a General Layer Using the bitbake-layers Script" + section in the Yocto Project Development Tasks Manual. + +
+
Where To Go Next -- cgit v1.2.3-54-g00ecf