diff options
Diffstat (limited to 'scripts/lib/bsp')
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 0000000000..89de354795 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT | |||
@@ -0,0 +1,17 @@ | |||
1 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
2 | of this software and associated documentation files (the "Software"), to deal | ||
3 | in the Software without restriction, including without limitation the rights | ||
4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
5 | copies of the Software, and to permit persons to whom the Software is | ||
6 | furnished to do so, subject to the following conditions: | ||
7 | |||
8 | The above copyright notice and this permission notice shall be included in | ||
9 | all copies or substantial portions of the Software. | ||
10 | |||
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
17 | THE 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 0000000000..943dfc4412 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/README | |||
@@ -0,0 +1,64 @@ | |||
1 | This README file contains information on the contents of the | ||
2 | {{=layer_name}} layer. | ||
3 | |||
4 | Please see the corresponding sections below for details. | ||
5 | |||
6 | |||
7 | Dependencies | ||
8 | ============ | ||
9 | |||
10 | This 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 | |||
24 | Patches | ||
25 | ======= | ||
26 | |||
27 | Please submit any patches against the {{=layer_name}} layer to the | ||
28 | xxxx mailing list (xxxx@zzzz.org) and cc: the maintainer: | ||
29 | |||
30 | Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com> | ||
31 | |||
32 | |||
33 | Table of Contents | ||
34 | ================= | ||
35 | |||
36 | I. Adding the {{=layer_name}} layer to your build | ||
37 | II. Misc | ||
38 | |||
39 | |||
40 | I. Adding the {{=layer_name}} layer to your build | ||
41 | ================================================= | ||
42 | |||
43 | --- replace with specific instructions for the {{=layer_name}} layer --- | ||
44 | |||
45 | In order to use this layer, you need to make the build system aware of | ||
46 | it. | ||
47 | |||
48 | Assuming the {{=layer_name}} layer exists at the top-level of your | ||
49 | yocto build tree, you can add it to the build system by adding the | ||
50 | location of the {{=layer_name}} layer to bblayers.conf, along with any | ||
51 | other 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 | |||
61 | II. 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 0000000000..84a9abb1d0 --- /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 | ||
2 | BBPATH := "${BBPATH}:${LAYERDIR}" | ||
3 | |||
4 | # We have a recipes directory, add to BBFILES | ||
5 | BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \ | ||
6 | ${LAYERDIR}/recipes-*/*/*.bbappend" | ||
7 | |||
8 | BBFILE_COLLECTIONS += "{{=layer_name}}" | ||
9 | BBFILE_PATTERN_{{=layer_name}} := "^${LAYERDIR}/" | ||
10 | BBFILE_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 0000000000..e2a89c3b5d --- /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 0000000000..2000a34da5 --- /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 0000000000..2e50ff668d --- /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 @@ | |||
1 | FILESEXTRAPATHS_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 0000000000..2000a34da5 --- /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 0000000000..71f2e46b4e --- /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 | |||
3 | int 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 0000000000..14bf344da5 --- /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 | |||
6 | DESCRIPTION = "Simple helloworld application" | ||
7 | SECTION = "examples" | ||
8 | LICENSE = "MIT" | ||
9 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
10 | PR = "r0" | ||
11 | |||
12 | SRC_URI = "file://helloworld.c" | ||
13 | |||
14 | S = "${WORKDIR}" | ||
15 | |||
16 | do_compile() { | ||
17 | ${CC} helloworld.c -o helloworld | ||
18 | } | ||
19 | |||
20 | do_install() { | ||
21 | install -d ${D}${bindir} | ||
22 | install -m 0755 helloworld ${D}${bindir} | ||
23 | } | ||