summaryrefslogtreecommitdiff
path: root/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/kernel/linux-basic_4.11.1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/kernel/linux-basic_4.11.1.bb')
-rw-r--r--distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/kernel/linux-basic_4.11.1.bb60
1 files changed, 60 insertions, 0 deletions
diff --git a/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/kernel/linux-basic_4.11.1.bb b/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/kernel/linux-basic_4.11.1.bb
new file mode 100644
index 0000000..f02c964
--- /dev/null
+++ b/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/kernel/linux-basic_4.11.1.bb
@@ -0,0 +1,60 @@
+# use the kernel class (poky/meta/kernel.bbclass)
+inherit kernel
+
+KERNEL_IMAGETYPE = "zImage"
+
+# 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"
+
+# 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"
+
+SRC_URI = "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${PV}.tar.xz"
+
+# checksums for the downloaded file
+SRC_URI[md5sum] = "9a75a70346aff3be6147e2478a581c18"
+SRC_URI[sha256sum] = "7e46f9e216907942b0b07f2bb59708dc33501d4e2a0938164396386ebd21e608"
+
+# the https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.11.1.tar.xz extracts
+# into a directory called linux-4.11.1 set this as source directory
+S = "${WORKDIR}/linux-4.11.1"
+
+# specify kernel config (automatically searched in ./files/${MACHINE}/)
+SRC_URI += "file://defconfig"
+
+# 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 -f ${B}/Makefile ${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"