summaryrefslogtreecommitdiff
path: root/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/kernel/linux-basic_4.4.bb
diff options
context:
space:
mode:
Diffstat (limited to 'distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/kernel/linux-basic_4.4.bb')
-rw-r--r--distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/kernel/linux-basic_4.4.bb48
1 files changed, 48 insertions, 0 deletions
diff --git a/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/kernel/linux-basic_4.4.bb b/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/kernel/linux-basic_4.4.bb
new file mode 100644
index 0000000..7301b6e
--- /dev/null
+++ b/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/kernel/linux-basic_4.4.bb
@@ -0,0 +1,48 @@
+# use the kernel class (poky/meta/kernel.bbclass)
+inherit kernel
+
+# license information/checksum
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+# specify kernel source (named as "upstream" for later reference)
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;name=upstream"
+
+# specify kernel config (automatically searched in ./files/${MACHINE}/)
+SRC_URI += "file://defconfig"
+
+# provide git reference for the exact commit
+# - references must be used with git if no network available
+# - reference for "v4.4" tag discovered with: git show-ref v4.4
+SRCREV_upstream = "b5be40b90dbaa6bd337f3b77de361bfc0723468b"
+
+# by default for the git protocol, the repository is checked out into
+# ${WORKDIR}/git, so bitbake must look there for the source code
+# (the "destsuffix" SRC_URI option defaults to "git/" for git)
+S = "${WORKDIR}/git"
+
+# set a weak default for our DTB variable
+# (this ensures that DTB definitely has a value and because of
+# how we named the dummy value, will generate a useful message
+# if DTB is not specified in some .conf somehwere)
+DTB ??= "no-devicetree-specified.dtb"
+
+# create a compile function for the device tree
+# - DTB is a variable we created
+# build_dtb () {
+# oe_runmake ${DTB}
+#}
+# ...and have it called after the compile task is finished
+do_compile[postfuncs] += "build_dtb"
+
+# create a deploy function for the device tree
+# - ${B} is set to the kernel build directory (set in kernel.bbclass)
+# - ${ARCH} is set to the kernel architecture (set in kernel-arch.bbclass)
+# - anything copied to ${DEPLOYDIR} will also appear as a deployed file
+# (for example: tmp/deploy/images/vexpress/myfile)
+deploy_dtb () {
+ install -D -m 0644 ${B}/arch/${ARCH}/boot/dts/${DTB} \
+ ${DEPLOYDIR}/devicetree-${DTB}
+}
+# ...and have it called after the deploy task is finished
+do_deploy[postfuncs] += "deploy_dtb"