summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@intel.com>2013-01-18 18:27:10 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-20 13:05:39 (GMT)
commit93d37a261b1c6cc91451b3d197c7f28a3f6123b1 (patch)
tree50eff3535fcc5f1fc95036bdca17600610d06f5f /scripts/lib
parentbd1cb7b36dd1ba61a7d18520d85d09b215d6dfba (diff)
downloadpoky-93d37a261b1c6cc91451b3d197c7f28a3f6123b1.tar.gz
yocto-layer: add 'layer' template data
Add a 'layer' target containing all the data that will be used to generate a generic yocto layer. (From meta-yocto rev: 198a85f61ebd6435830285b2a9b1b925aea6779e) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT17
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/README64
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf10
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall14
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}-{{=example_bbappend_version}}/example.patch12
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}_{{=example_bbappend_version}}.bbappend8
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/example.patch12
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/helloworld.c8
-rw-r--r--scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}_0.1.bb23
9 files changed, 168 insertions, 0 deletions
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT b/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT
new file mode 100644
index 0000000..89de354
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT
@@ -0,0 +1,17 @@
1Permission is hereby granted, free of charge, to any person obtaining a copy
2of this software and associated documentation files (the "Software"), to deal
3in the Software without restriction, including without limitation the rights
4to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5copies of the Software, and to permit persons to whom the Software is
6furnished to do so, subject to the following conditions:
7
8The above copyright notice and this permission notice shall be included in
9all copies or substantial portions of the Software.
10
11THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
17THE SOFTWARE.
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/README b/scripts/lib/bsp/substrate/target/arch/layer/README
new file mode 100644
index 0000000..943dfc4
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/layer/README
@@ -0,0 +1,64 @@
1This README file contains information on the contents of the
2{{=layer_name}} layer.
3
4Please see the corresponding sections below for details.
5
6
7Dependencies
8============
9
10This layer depends on:
11
12 URI: git://git.openembedded.org/bitbake
13 branch: master
14
15 URI: git://git.openembedded.org/openembedded-core
16 layers: meta
17 branch: master
18
19 URI: git://git.yoctoproject.org/xxxx
20 layers: xxxx
21 branch: master
22
23
24Patches
25=======
26
27Please submit any patches against the {{=layer_name}} layer to the
28xxxx mailing list (xxxx@zzzz.org) and cc: the maintainer:
29
30Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
31
32
33Table of Contents
34=================
35
36 I. Adding the {{=layer_name}} layer to your build
37 II. Misc
38
39
40I. Adding the {{=layer_name}} layer to your build
41=================================================
42
43--- replace with specific instructions for the {{=layer_name}} layer ---
44
45In order to use this layer, you need to make the build system aware of
46it.
47
48Assuming the {{=layer_name}} layer exists at the top-level of your
49yocto build tree, you can add it to the build system by adding the
50location of the {{=layer_name}} layer to bblayers.conf, along with any
51other layers needed. e.g.:
52
53 BBLAYERS ?= " \
54 /path/to/yocto/meta \
55 /path/to/yocto/meta-yocto \
56 /path/to/yocto/meta-yocto-bsp \
57 /path/to/yocto/meta-{{=layer_name}} \
58 "
59
60
61II. Misc
62========
63
64--- replace with specific information about the {{=layer_name}} layer ---
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf b/scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf
new file mode 100644
index 0000000..84a9abb
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf
@@ -0,0 +1,10 @@
1# We have a conf and classes directory, add to BBPATH
2BBPATH := "${BBPATH}:${LAYERDIR}"
3
4# We have a recipes directory, add to BBFILES
5BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
6 ${LAYERDIR}/recipes-*/*/*.bbappend"
7
8BBFILE_COLLECTIONS += "{{=layer_name}}"
9BBFILE_PATTERN_{{=layer_name}} := "^${LAYERDIR}/"
10BBFILE_PRIORITY_{{=layer_name}} = "{{=layer_priority}}"
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall b/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
new file mode 100644
index 0000000..e2a89c3
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall
@@ -0,0 +1,14 @@
1{{ input type:"edit" name:"layer_priority" prio:"20" msg:"Please enter the layer priority you'd like to use for the layer:" default:"6"}}
2
3{{ input type:"boolean" name:"create_example_recipe" prio:"20" msg:"Would you like to have an example recipe created? (y/n)" default:"n"}}
4
5{{ if create_example_recipe == "y": }}
6{{ input type:"edit" name:"example_recipe_name" prio:"20" msg:"Please enter the name you'd like to use for your example recipe:" default:"example"}}
7
8{{ input type:"boolean" name:"create_example_bbappend" prio:"20" msg:"Would you like to have an example bbappend file created? (y/n)" default:"n"}}
9
10{{ if create_example_bbappend == "y": }}
11{{ input type:"edit" name:"example_bbappend_name" prio:"20" msg:"Please enter the name you'd like to use for your bbappend file:" default:"example"}}
12
13{{ if create_example_bbappend == "y": }}
14{{ input type:"edit" name:"example_bbappend_version" prio:"20" msg:"Please enter the version number you'd like to use for your bbappend file (this should match the recipe you're appending to):" default:"0.1"}}
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}-{{=example_bbappend_version}}/example.patch b/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}-{{=example_bbappend_version}}/example.patch
new file mode 100644
index 0000000..2000a34
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}-{{=example_bbappend_version}}/example.patch
@@ -0,0 +1,12 @@
1#
2# This is a non-functional placeholder file, here for example purposes
3# only.
4#
5# If you had a patch for your recipe, you'd put it in this directory
6# and reference it from your recipe's SRC_URI:
7#
8# SRC_URI += "file://example.patch"
9#
10# Note that you could also rename the directory containing this patch
11# to remove the version number or simply rename it 'files'. Doing so
12# allows you to use the same directory for multiple recipes.
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}_{{=example_bbappend_version}}.bbappend b/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}_{{=example_bbappend_version}}.bbappend
new file mode 100644
index 0000000..2e50ff6
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_bbappend == "y": }} recipes-example-bbappend/example-bbappend/{{=example_bbappend_name}}_{{=example_bbappend_version}}.bbappend
@@ -0,0 +1,8 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
2
3#
4# This .bbappend doesn't yet do anything - replace this text with
5# modifications to the example_0.1.bb recipe, or whatever recipe it is
6# that you want to modify with this .bbappend (make sure you change
7# the recipe name (PN) and version (PV) to match).
8#
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/example.patch b/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/example.patch
new file mode 100644
index 0000000..2000a34
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/example.patch
@@ -0,0 +1,12 @@
1#
2# This is a non-functional placeholder file, here for example purposes
3# only.
4#
5# If you had a patch for your recipe, you'd put it in this directory
6# and reference it from your recipe's SRC_URI:
7#
8# SRC_URI += "file://example.patch"
9#
10# Note that you could also rename the directory containing this patch
11# to remove the version number or simply rename it 'files'. Doing so
12# allows you to use the same directory for multiple recipes.
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/helloworld.c b/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/helloworld.c
new file mode 100644
index 0000000..71f2e46
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}-0.1/helloworld.c
@@ -0,0 +1,8 @@
1#include <stdio.h>
2
3int main(int argc, char **argv)
4{
5 printf("Hello World!\n");
6
7 return 0;
8}
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}_0.1.bb b/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}_0.1.bb
new file mode 100644
index 0000000..14bf344
--- /dev/null
+++ b/scripts/lib/bsp/substrate/target/arch/layer/{{ if create_example_recipe == "y": }} recipes-example/example/{{=example_recipe_name}}_0.1.bb
@@ -0,0 +1,23 @@
1#
2# This file was derived from the 'Hello World!' example recipe in the
3# Yocto Project Development Manual.
4#
5
6DESCRIPTION = "Simple helloworld application"
7SECTION = "examples"
8LICENSE = "MIT"
9LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
10PR = "r0"
11
12SRC_URI = "file://helloworld.c"
13
14S = "${WORKDIR}"
15
16do_compile() {
17 ${CC} helloworld.c -o helloworld
18}
19
20do_install() {
21 install -d ${D}${bindir}
22 install -m 0755 helloworld ${D}${bindir}
23}