add layer

This commit is contained in:
Simon From Jakosen 2024-08-07 12:19:03 +02:00
parent 5f94ed3ba1
commit dc9a4d3f7c
8 changed files with 175 additions and 1 deletions

View File

@ -1,7 +1,20 @@
# example-projects # example-projects
Add projects to Yocto project: ### Add layer in a Yocto project
```
bitbake-layers add-layer /path/to/meta-helloworld
```
Then add this to `build/conf/local.conf`:
```sh
IMAGE_INSTALL:append = " helloworld-c-make"
IMAGE_INSTALL:append = " helloworld-cpp-cmake"
IMAGE_INSTALL:append = " helloworld-rs"
```
### Add/create recipes in a Yocto projectV
``` ```
devtool add helloworld-c-make git@bitbucket.org:dol-sensors/example-projects.git --srcbranch main --src-subdir helloworld-c-make devtool add helloworld-c-make git@bitbucket.org:dol-sensors/example-projects.git --srcbranch main --src-subdir helloworld-c-make

View File

@ -0,0 +1,17 @@
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

41
meta-helloworld/README Normal file
View File

@ -0,0 +1,41 @@
This README file contains information on the contents of the meta-helloworld layer.
Please see the corresponding sections below for details.
Dependencies
============
URI: <first dependency>
branch: <branch name>
URI: <second dependency>
branch: <branch name>
.
.
.
Patches
=======
Please submit any patches against the meta-helloworld layer to the xxxx mailing list (xxxx@zzzz.org)
and cc: the maintainer:
Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
Table of Contents
=================
I. Adding the meta-helloworld layer to your build
II. Misc
I. Adding the meta-helloworld layer to your build
=================================================
Run 'bitbake-layers add-layer meta-helloworld'
II. Misc
========
--- replace with specific information about the meta-helloworld layer ---

View File

@ -0,0 +1,13 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "helloworld"
BBFILE_PATTERN_helloworld = "^${LAYERDIR}/"
BBFILE_PRIORITY_helloworld = "6"
LAYERDEPENDS_helloworld = "core"
LAYERSERIES_COMPAT_helloworld = "kirkstone"

View File

@ -0,0 +1,13 @@
SUMMARY = "bitbake-layers recipe"
DESCRIPTION = "Recipe created by bitbake-layers"
LICENSE = "MIT"
python do_display_banner() {
bb.plain("***********************************************");
bb.plain("* *");
bb.plain("* Example recipe created by bitbake-layers *");
bb.plain("* *");
bb.plain("***********************************************");
}
addtask display_banner before do_build

View File

@ -0,0 +1,26 @@
# NOTE: LICENSE is being set to "CLOSED" to allow you to at least start building - if
# this is not accurate with respect to the licensing of the software being built (it
# will not be in most cases) you must specify the correct value before using this
# recipe for anything other than initial testing/development!
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""
SRC_URI = "git://git@bitbucket.org/dol-sensors/example-projects.git;protocol=ssh;branch=main"
PV = "1.0+git${SRCPV}"
SRCREV = "5f94ed3ba1bff1c6631d0234c7dbe65c27c4791e"
S = "${WORKDIR}/git/${BPN}"
do_compile () {
oe_runmake
}
do_install () {
install -d ${D}${bindir}
install -m 0755 ${S}/build/helloworld-c-make ${D}${bindir}
}
FILES:${PN} += "${bindir}"

View File

@ -0,0 +1,27 @@
# Recipe created by recipetool
# This is the basis of a recipe and may need further editing in order to be fully functional.
# (Feel free to remove these comments when editing.)
# Unable to find any files that looked like license statements. Check the accompanying
# documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly.
#
# NOTE: LICENSE is being set to "CLOSED" to allow you to at least start building - if
# this is not accurate with respect to the licensing of the software being built (it
# will not be in most cases) you must specify the correct value before using this
# recipe for anything other than initial testing/development!
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""
SRC_URI = "git://git@bitbucket.org/dol-sensors/example-projects.git;protocol=ssh;branch=main"
# Modify these as desired
PV = "1.0+git${SRCPV}"
SRCREV = "5f94ed3ba1bff1c6631d0234c7dbe65c27c4791e"
S = "${WORKDIR}/git/${BPN}"
inherit cmake
# Specify any options you want to pass to cmake using EXTRA_OECMAKE:
EXTRA_OECMAKE = ""

View File

@ -0,0 +1,24 @@
# Recipe created by recipetool
# This is the basis of a recipe and may need further editing in order to be fully functional.
# (Feel free to remove these comments when editing.)
# Unable to find any files that looked like license statements. Check the accompanying
# documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly.
#
# NOTE: LICENSE is being set to "CLOSED" to allow you to at least start building - if
# this is not accurate with respect to the licensing of the software being built (it
# will not be in most cases) you must specify the correct value before using this
# recipe for anything other than initial testing/development!
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""
SRC_URI = "git://git@bitbucket.org/dol-sensors/example-projects.git;protocol=ssh;branch=main"
# Modify these as desired
PV = "1.0+git${SRCPV}"
SRCREV = "5f94ed3ba1bff1c6631d0234c7dbe65c27c4791e"
S = "${WORKDIR}/git/${BPN}"
inherit cargo