1*4882a593SmuzhiyunSUMMARY = "An example kernel recipe that uses the linux-yocto and oe-core" 2*4882a593Smuzhiyun# linux-yocto-custom.bb: 3*4882a593Smuzhiyun# 4*4882a593Smuzhiyun# kernel classes to apply a subset of yocto kernel management to git 5*4882a593Smuzhiyun# managed kernel repositories. 6*4882a593Smuzhiyun# 7*4882a593Smuzhiyun# To use linux-yocto-custom in your layer, copy this recipe (optionally 8*4882a593Smuzhiyun# rename it as well) and modify it appropriately for your machine. i.e.: 9*4882a593Smuzhiyun# 10*4882a593Smuzhiyun# COMPATIBLE_MACHINE_yourmachine = "yourmachine" 11*4882a593Smuzhiyun# 12*4882a593Smuzhiyun# You must also provide a Linux kernel configuration. The most direct 13*4882a593Smuzhiyun# method is to copy your .config to files/defconfig in your layer, 14*4882a593Smuzhiyun# in the same directory as the copy (and rename) of this recipe and 15*4882a593Smuzhiyun# add file://defconfig to your SRC_URI. 16*4882a593Smuzhiyun# 17*4882a593Smuzhiyun# To use the yocto kernel tooling to generate a BSP configuration 18*4882a593Smuzhiyun# using modular configuration fragments, see the yocto-bsp and 19*4882a593Smuzhiyun# yocto-kernel tools documentation. 20*4882a593Smuzhiyun# 21*4882a593Smuzhiyun# Warning: 22*4882a593Smuzhiyun# 23*4882a593Smuzhiyun# Building this example without providing a defconfig or BSP 24*4882a593Smuzhiyun# configuration will result in build or boot errors. This is not a 25*4882a593Smuzhiyun# bug. 26*4882a593Smuzhiyun# 27*4882a593Smuzhiyun# 28*4882a593Smuzhiyun# Notes: 29*4882a593Smuzhiyun# 30*4882a593Smuzhiyun# patches: patches can be merged into to the source git tree itself, 31*4882a593Smuzhiyun# added via the SRC_URI, or controlled via a BSP 32*4882a593Smuzhiyun# configuration. 33*4882a593Smuzhiyun# 34*4882a593Smuzhiyun# defconfig: When a defconfig is provided, the linux-yocto configuration 35*4882a593Smuzhiyun# uses the filename as a trigger to use a 'allnoconfig' baseline 36*4882a593Smuzhiyun# before merging the defconfig into the build. 37*4882a593Smuzhiyun# 38*4882a593Smuzhiyun# If the defconfig file was created with make_savedefconfig, 39*4882a593Smuzhiyun# not all options are specified, and should be restored with their 40*4882a593Smuzhiyun# defaults, not set to 'n'. To properly expand a defconfig like 41*4882a593Smuzhiyun# this, specify: KCONFIG_MODE="--alldefconfig" in the kernel 42*4882a593Smuzhiyun# recipe. 43*4882a593Smuzhiyun# 44*4882a593Smuzhiyun# example configuration addition: 45*4882a593Smuzhiyun# SRC_URI += "file://smp.cfg" 46*4882a593Smuzhiyun# example patch addition (for kernel v4.x only): 47*4882a593Smuzhiyun# SRC_URI += "file://0001-linux-version-tweak.patch" 48*4882a593Smuzhiyun# example feature addition (for kernel v4.x only): 49*4882a593Smuzhiyun# SRC_URI += "file://feature.scc" 50*4882a593Smuzhiyun# 51*4882a593Smuzhiyun 52*4882a593Smuzhiyuninherit kernel 53*4882a593Smuzhiyunrequire recipes-kernel/linux/linux-yocto.inc 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun# Override SRC_URI in a copy of this recipe to point at a different source 56*4882a593Smuzhiyun# tree if you do not want to build from Linus' tree. 57*4882a593SmuzhiyunSRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine" 58*4882a593Smuzhiyun 59*4882a593SmuzhiyunLINUX_VERSION ?= "4.2" 60*4882a593SmuzhiyunLINUX_VERSION_EXTENSION:append = "-custom" 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun# Modify SRCREV to a different commit hash in a copy of this recipe to 63*4882a593Smuzhiyun# build a different release of the Linux kernel. 64*4882a593Smuzhiyun# tag: v4.2 64291f7db5bd8150a74ad2036f1037e6a0428df2 65*4882a593SmuzhiyunSRCREV_machine="64291f7db5bd8150a74ad2036f1037e6a0428df2" 66*4882a593Smuzhiyun 67*4882a593SmuzhiyunPV = "${LINUX_VERSION}+git${SRCPV}" 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun# Override COMPATIBLE_MACHINE to include your machine in a copy of this recipe 70*4882a593Smuzhiyun# file. Leaving it empty here ensures an early explicit build failure. 71*4882a593SmuzhiyunCOMPATIBLE_MACHINE = "(^$)" 72