diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc index c392341f0..ba3e8c8ca 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc @@ -16,4 +16,22 @@ LINUX_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , \ SRC_URI = "${LINUX_GIT_URI};branch=${SRCBRANCH}" SRC_URI_stmp32mpcommon = "${LINUX_GIT_URI};branch=${SRCBRANCH}" +# A user can provide his own kernel 'defconfig' file by: +# - setting the variable KERNEL_DEFCONFIG to a custom kernel configuration file +# inside the kernel repository. +# - setting the variable KERNEL_DEFCONFIG to a kernel configuration file using +# the full path to the file. +# - clearing the variable KERNEL_DEFCONFIG and providing a kernel configuration +# file in the layer (in this case the file must be named 'defconfig'). +# Otherwise the default platform's kernel configuration file will be taken from +# the Linux source code tree. +do_copy_defconfig[vardeps] += "KERNEL_DEFCONFIG" +do_copy_defconfig[dirs] = "${S}" +do_copy_defconfig () { + if [ -n "${KERNEL_DEFCONFIG}" ]; then + cp -f ${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig + fi +} +addtask copy_defconfig after do_patch before do_kernel_localversion + S = "${WORKDIR}/git" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_5.4.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_5.4.bb index 9f04eb4ae..6ffae9061 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_5.4.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_5.4.bb @@ -22,24 +22,6 @@ FILES_${KERNEL_PACKAGE_NAME}-image += "/boot/config-${KERNEL_VERSION}" # Don't include kernels in standard images RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" -# A user can provide his own kernel 'defconfig' file by: -# - setting the variable KERNEL_DEFCONFIG to a custom kernel configuration file -# inside the kernel repository. -# - setting the variable KERNEL_DEFCONFIG to a kernel configuration file using -# the full path to the file. -# - clearing the variable KERNEL_DEFCONFIG and providing a kernel configuration -# file in the layer (in this case the file must be named 'defconfig'). -# Otherwise the default platform's kernel configuration file will be taken from -# the Linux source code tree. -do_copy_defconfig[vardeps] += "KERNEL_DEFCONFIG" -do_copy_defconfig[dirs] = "${S}" -do_copy_defconfig () { - if [ -n "${KERNEL_DEFCONFIG}" ]; then - cp -f ${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig - fi -} -addtask copy_defconfig after do_patch before do_kernel_localversion - # Apply configuration fragments do_configure_append() { # Only accept fragments ending in .cfg. If the fragments contain