[meta-xilinx] [meta-xilinx-bsp][RFC] linux-xlnx.inc: Use KBUILD_DEFCONFIG in externalsrc mode if defined
Manjukumar Matha
manjukumar.harthikote-matha at xilinx.com
Wed Mar 13 11:25:40 PDT 2019
When external source is used for kernel, we need a starting point for
kernel configuration, use KBUILD_DEFCONFIG if it is defined.
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha at xilinx.com>
---
meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc
index a597dca..4cc3a9e 100644
--- a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc
+++ b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx.inc
@@ -18,11 +18,19 @@ require linux-microblaze.inc
DESCRIPTION = "Xilinx Kernel"
+EXTKERNELSRC = "${@'1' if d.getVar('EXTERNALSRC') else ''}"
+
# Force the use of the KBUILD_DEFCONFIG even if some other defconfig was generated in the ${WORKDIR}
do_kernel_metadata_prepend () {
[ -n "${KBUILD_DEFCONFIG}" ] && [ -e ${WORKDIR}/defconfig ] && rm ${WORKDIR}/defconfig
}
+do_configure_prepend () {
+ if [ -n "${KBUILD_DEFCONFIG}" ] && [ -n "${EXTKERNELSRC}" ]; then
+ cp ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
+ fi
+}
+
inherit kernel-simpleimage
# Default to be only compatible with specific machines or soc families
--
2.7.4
More information about the meta-xilinx
mailing list