summaryrefslogtreecommitdiff
path: root/meta-skeleton
diff options
context:
space:
mode:
Diffstat (limited to 'meta-skeleton')
-rw-r--r--meta-skeleton/COPYING.MIT17
-rw-r--r--meta-skeleton/conf/layer.conf13
-rw-r--r--meta-skeleton/conf/multilib-example.conf13
-rw-r--r--meta-skeleton/conf/multilib-example2.conf13
-rw-r--r--meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg1
-rw-r--r--meta-skeleton/recipes-core/busybox/busybox_%.bbappend12
-rw-r--r--meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb8
-rw-r--r--meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb77
-rw-r--r--meta-skeleton/recipes-kernel/linux/linux-yocto-custom/0001-linux-version-tweak.patch21
-rw-r--r--meta-skeleton/recipes-multilib/images/core-image-multilib-example.bb13
-rw-r--r--meta-skeleton/recipes-skeleton/service/service_0.1.bb11
-rw-r--r--meta-skeleton/recipes-skeleton/useradd/useradd-example.bb44
12 files changed, 174 insertions, 69 deletions
diff --git a/meta-skeleton/COPYING.MIT b/meta-skeleton/COPYING.MIT
new file mode 100644
index 0000000000..fb950dc69f
--- /dev/null
+++ b/meta-skeleton/COPYING.MIT
@@ -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.
diff --git a/meta-skeleton/conf/layer.conf b/meta-skeleton/conf/layer.conf
index edb31dd89a..aca1633420 100644
--- a/meta-skeleton/conf/layer.conf
+++ b/meta-skeleton/conf/layer.conf
@@ -1,10 +1,15 @@
# We have a conf and classes directory, add to BBPATH
-BBPATH := "${BBPATH}:${LAYERDIR}"
+BBPATH .= ":${LAYERDIR}"
-# We have a packages directory, add to BBFILES
-BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb"
+# We have recipes-* directories, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "skeleton"
-BBFILE_PATTERN_skeleton := "^${LAYERDIR}/"
+BBFILE_PATTERN_skeleton = "^${LAYERDIR}/"
BBFILE_PRIORITY_skeleton = "1"
+# This should only be incremented on significant changes that will
+# cause compatibility issues with other layers
+LAYERVERSION_skeleton = "1"
+
+LAYERDEPENDS_skeleton = "core"
diff --git a/meta-skeleton/conf/multilib-example.conf b/meta-skeleton/conf/multilib-example.conf
new file mode 100644
index 0000000000..da6da7f1f6
--- /dev/null
+++ b/meta-skeleton/conf/multilib-example.conf
@@ -0,0 +1,13 @@
+#
+# Sample multilib configuration which the user can either add in local.conf
+# or specific in an configuration file like this, then require it.
+#
+# This configuration specifies an x86 64 bit machine as the main machine
+# type and then adds a multilib in the "lib32" directory where those
+# libraries are compiled with the "x86" tune.
+#
+
+MACHINE = "qemux86-64"
+require conf/multilib.conf
+MULTILIBS = "multilib:lib32"
+DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
diff --git a/meta-skeleton/conf/multilib-example2.conf b/meta-skeleton/conf/multilib-example2.conf
new file mode 100644
index 0000000000..2596f61d9f
--- /dev/null
+++ b/meta-skeleton/conf/multilib-example2.conf
@@ -0,0 +1,13 @@
+#
+# Sample multilib configuration which the user can either add in local.conf
+# or specific in an configuration file like this, then require it.
+#
+# This configuration specifies an x86 64 bit machine as the main machine
+# type and then adds a multilib in the "libx32" directory where those
+# libraries are compiled with the "x86-64-x32" tune.
+#
+
+MACHINE = "qemux86-64"
+require conf/multilib.conf
+MULTILIBS = "multilib:libx32"
+DEFAULTTUNE_virtclass-multilib-libx32 = "x86-64-x32"
diff --git a/meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg b/meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg
new file mode 100644
index 0000000000..f840ecd26c
--- /dev/null
+++ b/meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg
@@ -0,0 +1 @@
+# CONFIG_RFKILL is not set
diff --git a/meta-skeleton/recipes-core/busybox/busybox_%.bbappend b/meta-skeleton/recipes-core/busybox/busybox_%.bbappend
new file mode 100644
index 0000000000..64cdefc76d
--- /dev/null
+++ b/meta-skeleton/recipes-core/busybox/busybox_%.bbappend
@@ -0,0 +1,12 @@
+# Example use of configuration fragments for busybox, which uses the same
+# mechanism as the linux-yocto kernel recipe.
+#
+# The entries here will override any entries in the base busybox recipe
+#
+# More details can be found in the Kernel Dev Manual
+# http://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#changing-the-configuration
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+ file://no_rfkill.cfg \
+ "
diff --git a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
index 64a6ddad4c..b140b0ac8e 100644
--- a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
+++ b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
@@ -1,15 +1,15 @@
-DESCRIPTION = "hello-world-mod tests the module.bbclass mechanism."
+SUMMARY = "Example of how to build an external Linux kernel module"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
inherit module
-PR = "r0"
-PV = "0.1"
-
SRC_URI = "file://Makefile \
file://hello.c \
file://COPYING \
"
S = "${WORKDIR}"
+
+# The inherit of module.bbclass will automatically name module packages with
+# "kernel-module-" prefix as required by the oe-core build environment.
diff --git a/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb
index 55f0c38c03..6194d4f8da 100644
--- a/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb
+++ b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb
@@ -1,44 +1,71 @@
# linux-yocto-custom.bb:
#
-# Provides an example/minimal kernel recipe that uses the linux-yocto
-# and oe-core kernel classes to apply a subset of yocto kernel
-# management to git managed kernel repositories.
+# An example kernel recipe that uses the linux-yocto and oe-core
+# kernel classes to apply a subset of yocto kernel management to git
+# managed kernel repositories.
+#
+# To use linux-yocto-custom in your layer, copy this recipe (optionally
+# rename it as well) and modify it appropriately for your machine. i.e.:
+#
+# COMPATIBLE_MACHINE_yourmachine = "yourmachine"
+#
+# You must also provide a Linux kernel configuration. The most direct
+# method is to copy your .config to files/defconfig in your layer,
+# in the same directory as the copy (and rename) of this recipe and
+# add file://defconfig to your SRC_URI.
+#
+# To use the yocto kernel tooling to generate a BSP configuration
+# using modular configuration fragments, see the yocto-bsp and
+# yocto-kernel tools documentation.
+#
+# Warning:
+#
+# Building this example without providing a defconfig or BSP
+# configuration will result in build or boot errors. This is not a
+# bug.
+#
#
# Notes:
#
-# kconfig(s): the kernel must be configured with a defconfig, or via
-# configuration fragment(s). Either of these can be added
-# via bbappend.
-# patches: patches can be merged into to the source git tree itself, added
-# using standard bbappend syntax or controlled via .scc feature
-# descriptions (also via bbappends)
+# patches: patches can be merged into to the source git tree itself,
+# added via the SRC_URI, or controlled via a BSP
+# configuration.
+#
+# defconfig: When a defconfig is provided, the linux-yocto configuration
+# uses the filename as a trigger to use a 'allnoconfig' baseline
+# before merging the defconfig into the build.
+#
+# If the defconfig file was created with make_savedefconfig,
+# not all options are specified, and should be restored with their
+# defaults, not set to 'n'. To properly expand a defconfig like
+# this, specify: KCONFIG_MODE="--alldefconfig" in the kernel
+# recipe.
#
# example configuration addition:
# SRC_URI += "file://smp.cfg"
-# example patch addition (for kernel v3.4 only):
-# SRC_URI += "file://0001-linux-version-tweak.patch
-# example feature addition (for kernel v3.4 only):
+# example patch addition (for kernel v4.x only):
+# SRC_URI += "file://0001-linux-version-tweak.patch"
+# example feature addition (for kernel v4.x only):
# SRC_URI += "file://feature.scc"
#
-# Warning:
-#
-# Building the sample kernel tree (kernel.org) without providing any
-# configuration will result in build or boot errors. This is not a bug
-# it is a required element for creating a valid kernel.
-#
inherit kernel
require recipes-kernel/linux/linux-yocto.inc
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1"
+# Override SRC_URI in a copy of this recipe to point at a different source
+# tree if you do not want to build from Linus' tree.
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine"
-LINUX_VERSION ?= "3.4"
-LINUX_VERSION_EXTENSION ?= "-custom"
+LINUX_VERSION ?= "4.2"
+LINUX_VERSION_EXTENSION_append = "-custom"
-# tag: v3.4 76e10d158efb6d4516018846f60c2ab5501900bc
-SRCREV="76e10d158efb6d4516018846f60c2ab5501900bc"
+# Modify SRCREV to a different commit hash in a copy of this recipe to
+# build a different release of the Linux kernel.
+# tag: v4.2 64291f7db5bd8150a74ad2036f1037e6a0428df2
+SRCREV_machine="64291f7db5bd8150a74ad2036f1037e6a0428df2"
-PR = "r0"
PV = "${LINUX_VERSION}+git${SRCPV}"
-COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64)"
+# Override COMPATIBLE_MACHINE to include your machine in a copy of this recipe
+# file. Leaving it empty here ensures an early explicit build failure.
+COMPATIBLE_MACHINE = "(^$)"
diff --git a/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/0001-linux-version-tweak.patch b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/0001-linux-version-tweak.patch
index c9562da10d..1c88315cdc 100644
--- a/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/0001-linux-version-tweak.patch
+++ b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom/0001-linux-version-tweak.patch
@@ -1,26 +1,29 @@
-From 5a55943a6bbb10a79994a0b18071b2427dffb15f Mon Sep 17 00:00:00 2001
+From fb2c401374d4efe89e8da795e21d96fac038639d Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@windriver.com>
Date: Mon, 11 Jun 2012 15:31:42 -0400
Subject: [PATCH] linux: version tweak
+Upstream-Status: Inappropriate [example code]
+
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
- Makefile | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
-index a687963..f5b1ac3 100644
+index c361593..099e8ff 100644
--- a/Makefile
+++ b/Makefile
-@@ -2,7 +2,7 @@ VERSION = 3
- PATCHLEVEL = 4
+@@ -2,7 +2,7 @@ VERSION = 4
+ PATCHLEVEL = 2
SUBLEVEL = 0
EXTRAVERSION =
--NAME = Saber-toothed Squirrel
-+NAME = Saber-toothed Squirrel-custom
+-NAME = Hurr durr I'ma sheep
++NAME = Hurr durr I'ma customized sheep
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
--
-1.7.5.4
+2.1.4
diff --git a/meta-skeleton/recipes-multilib/images/core-image-multilib-example.bb b/meta-skeleton/recipes-multilib/images/core-image-multilib-example.bb
new file mode 100644
index 0000000000..f13186f933
--- /dev/null
+++ b/meta-skeleton/recipes-multilib/images/core-image-multilib-example.bb
@@ -0,0 +1,13 @@
+#
+# An example of a multilib image
+#
+# This example includes a lib32 version of bash into an otherwise standard
+# sato image. It assumes a "lib32" multilib has been enabled in the user's
+# configuration (see the example conf files for examples of this.)
+#
+
+# First include a base image to base things off
+require recipes-sato/images/core-image-sato.bb
+
+# Now add the multilib packages we want to install
+IMAGE_INSTALL += "lib32-bash"
diff --git a/meta-skeleton/recipes-skeleton/service/service_0.1.bb b/meta-skeleton/recipes-skeleton/service/service_0.1.bb
index 22137a5e57..6416618dcb 100644
--- a/meta-skeleton/recipes-skeleton/service/service_0.1.bb
+++ b/meta-skeleton/recipes-skeleton/service/service_0.1.bb
@@ -1,19 +1,15 @@
-DESCRIPTION = "The canonical example of init scripts"
+SUMMARY = "The canonical example of init scripts"
SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYRIGHT;md5=349c872e0066155e1818b786938876a4"
-RDEPENDS_${PN} = "initscripts"
-PR = "r0"
SRC_URI = "file://skeleton \
file://skeleton_test.c \
file://COPYRIGHT \
"
-CONFFILES_${PN} += "${sysconfdir}/init.d/skeleton"
-
do_compile () {
- ${CC} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/skeleton-test
+ ${CC} ${CFLAGS} ${LDFLAGS} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/skeleton-test
}
do_install () {
@@ -30,3 +26,6 @@ do_install () {
install -m 0755 ${WORKDIR}/skeleton-test ${D}${sbindir}/
}
+RDEPENDS_${PN} = "initscripts"
+
+CONFFILES_${PN} += "${sysconfdir}/init.d/skeleton"
diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
index b10c1d0c37..7c5b9d0503 100644
--- a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
+++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
@@ -1,10 +1,9 @@
SUMMARY = "Example recipe for using inherit useradd"
DESCRIPTION = "This recipe serves as an example for using features from useradd.bbclass"
SECTION = "examples"
-PR = "r0"
+PR = "r1"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://file1 \
file://file2 \
@@ -15,6 +14,8 @@ S = "${WORKDIR}"
PACKAGES =+ "${PN}-user3"
+EXCLUDE_FROM_WORLD = "1"
+
inherit useradd
# You must set USERADD_PACKAGES when you inherit useradd. This
@@ -32,7 +33,8 @@ USERADD_PACKAGES = "${PN} ${PN}-user3"
USERADD_PARAM_${PN} = "-u 1200 -d /home/user1 -r -s /bin/bash user1; -u 1201 -d /home/user2 -r -s /bin/bash user2"
# user3 will be managed in the useradd-example-user3 pacakge:
-USERADD_PARAM_${PN}-user3 = "-u 1202 -d /home/user3 -r -s /bin/bash user3"
+# As an example, we use the -P option to set clear text password for user3
+USERADD_PARAM_${PN}-user3 = "-u 1202 -d /home/user3 -r -s /bin/bash -P 'user3' user3"
# GROUPADD_PARAM works the same way, which you set to the options
# you'd normally pass to the groupadd command. This will create
@@ -43,32 +45,32 @@ GROUPADD_PARAM_${PN} = "-g 880 group1; -g 890 group2"
GROUPADD_PARAM_${PN}-user3 = "-g 900 group3"
do_install () {
- install -d -m 755 ${D}/usr/share/user1
- install -d -m 755 ${D}/usr/share/user2
- install -d -m 755 ${D}/usr/share/user3
+ install -d -m 755 ${D}${datadir}/user1
+ install -d -m 755 ${D}${datadir}/user2
+ install -d -m 755 ${D}${datadir}/user3
- install -p -m 644 file1 ${D}/usr/share/user1/
- install -p -m 644 file2 ${D}/usr/share/user1/
+ install -p -m 644 file1 ${D}${datadir}/user1/
+ install -p -m 644 file2 ${D}${datadir}/user1/
- install -p -m 644 file2 ${D}/usr/share/user2/
- install -p -m 644 file3 ${D}/usr/share/user2/
+ install -p -m 644 file2 ${D}${datadir}/user2/
+ install -p -m 644 file3 ${D}${datadir}/user2/
- install -p -m 644 file3 ${D}/usr/share/user3/
- install -p -m 644 file4 ${D}/usr/share/user3/
+ install -p -m 644 file3 ${D}${datadir}/user3/
+ install -p -m 644 file4 ${D}${datadir}/user3/
# The new users and groups are created before the do_install
# step, so you are now free to make use of them:
- chown -R user1 ${D}/usr/share/user1
- chown -R user2 ${D}/usr/share/user2
- chown -R user3 ${D}/usr/share/user3
+ chown -R user1 ${D}${datadir}/user1
+ chown -R user2 ${D}${datadir}/user2
+ chown -R user3 ${D}${datadir}/user3
- chgrp -R group1 ${D}/usr/share/user1
- chgrp -R group2 ${D}/usr/share/user2
- chgrp -R group3 ${D}/usr/share/user3
+ chgrp -R group1 ${D}${datadir}/user1
+ chgrp -R group2 ${D}${datadir}/user2
+ chgrp -R group3 ${D}${datadir}/user3
}
-FILES_${PN} = "/usr/share/user1/* /usr/share/user2/*"
-FILES_${PN}-user3 = "/usr/share/user3/*"
+FILES_${PN} = "${datadir}/user1/* ${datadir}/user2/*"
+FILES_${PN}-user3 = "${datadir}/user3/*"
# Prevents do_package failures with:
# debugsources.list: No such file or directory: