]> code.ossystems Code Review - meta-freescale.git/commitdiff
linux-imx.inc: inherit kernel-yocto class
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Sun, 3 May 2020 21:11:36 +0000 (21:11 +0000)
committerOtavio Salvador <otavio@ossystems.com.br>
Wed, 6 May 2020 18:52:09 +0000 (15:52 -0300)
Since commit [de2ef0120432cba343452151e86cbc3c99876524] in oe-core, it
is possible to use kernel-yocto class without including linux-yocto.inc
into the recipe.

Inherit the class in order to take advantage of providing mechanisms to
use kernel config fragments, patches and verification features
implemented upstream.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
recipes-kernel/linux/linux-imx.inc

index 9a8a035f6e57824f9d13c4726beacee3bc377473..d508a7276c2d19470fbf609fb9f1a8b04d499483 100644 (file)
@@ -4,19 +4,36 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 
-inherit kernel fsl-kernel-localversion fsl-vivante-kernel-driver-handler
+inherit kernel-yocto kernel fsl-kernel-localversion fsl-vivante-kernel-driver-handler
 
 # Put a local version until we have a true SRCREV to point to
 LOCALVERSION ?= ""
 SCMVERSION ?= "y"
 SRCBRANCH ?= ""
 
+# Set the PV to the correct kernel version to satisfy the kernel version sanity check
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
 SRC_URI = "git://source.codeaurora.org/external/imx/linux-imx;protocol=https;branch=${SRCBRANCH} \
            file://defconfig \
 "
 
 S = "${WORKDIR}/git"
 
+# Tell to kernel class that we would like to use our defconfig to configure the kernel.
+# Otherwise, the --allnoconfig would be used per default which leads to mis-configured
+# kernel.
+#
+# This behavior happens when a defconfig is provided, the kernel-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, we need to specify: KCONFIG_MODE="--alldefconfig"
+# in the kernel recipe include.
+KCONFIG_MODE="--alldefconfig"
+
 # We need to pass it as param since kernel might support more then one
 # machine, with different entry points
 KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"