summaryrefslogtreecommitdiff
path: root/meta/recipes-kernel/linux/linux-yocto.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/linux/linux-yocto.inc')
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
new file mode 100644
index 000000000..0912beef5
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -0,0 +1,40 @@
+DESCRIPTION = "Yocto Kernel"
+SECTION = "kernel"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+# A KMACHINE is the mapping of a yocto $MACHINE to what is built
+# by the kernel. This is typically the branch that should be built,
+# and it can be specific to the machine or shared
+# KMACHINE = "UNDEFINED"
+
+LINUX_KERNEL_TYPE ?= "standard"
+
+# KMETA ?= ""
+KBRANCH ?= "master"
+KMACHINE ?= "${MACHINE}"
+SRCREV_FORMAT ?= "meta_machine"
+
+LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
+
+do_patch[depends] = "kern-tools-native:do_populate_sysroot"
+
+addtask kernel_configme before do_configure after do_patch
+
+# Pick up shared functions
+inherit kernel-yocto
+require linux-dtb.inc
+
+B = "${WORKDIR}/linux-${MACHINE}-${LINUX_KERNEL_TYPE}-build"
+
+do_install_append(){
+ if [ -n "${KMETA}" ]; then
+ rm -rf ${STAGING_KERNEL_DIR}/${KMETA}
+ fi
+}
+
+# extra tasks
+addtask kernel_link_vmlinux after do_compile before do_install
+addtask validate_branches before do_patch after do_kernel_checkout
+addtask kernel_configcheck after do_configure before do_compile