summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2017-09-30 01:16:59 +1000
committerNathan Rossi <nathan@nathanrossi.com>2017-10-18 18:00:09 +1000
commit0fb4608c502f2d333ef964a08a3d6adfb5fcc5ac (patch)
tree1a32b8767bf38fcab442469e2615630032d147ea
parentcac099d109916246d62fa45a93a1d4ceb9cf58aa (diff)
downloadmeta-xilinx-0fb4608c502f2d333ef964a08a3d6adfb5fcc5ac.tar.gz
linux-xlnx: Rework kernel config setup
This change reworks how the linux-xlnx kernel is configured, instead of using kmeta fragments as the base config the kernel is instead configured with defconfigs from the vendor tree. This has been the default for zcu102-zynqmp and now extends to Zynq and MicroBlaze targets. Since linux-yocto.inc is still included by the linux-xlnx.inc, it is possible to still use kmeta like .scc/.cfg fragments separately as well as from a kmeta source. This is used by default to get the KC705 and ZYBO Linux-BD kernel configuration fragments. Though fragments are limited to the current in layer provided fragments by default. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
-rw-r--r--recipes-kernel/linux/linux-xilinx-configs.inc11
-rw-r--r--recipes-kernel/linux/linux-xilinx-machines.inc17
-rw-r--r--recipes-kernel/linux/linux-xlnx.inc43
3 files changed, 25 insertions, 46 deletions
diff --git a/recipes-kernel/linux/linux-xilinx-configs.inc b/recipes-kernel/linux/linux-xilinx-configs.inc
deleted file mode 100644
index 5892c1c4..00000000
--- a/recipes-kernel/linux/linux-xilinx-configs.inc
+++ /dev/null
@@ -1,11 +0,0 @@
1# This include file sets up the xilinx config fragments, these
2# fragments build on top of the base config infrastructure provided in
3# the linux-yocto/kernel-yocto recipes and classes in core layer of OE.
4
5FILESEXTRAPATHS_prepend := "${THISDIR}/config:"
6
7SRC_URI_append = " \
8 file://xilinx-common;type=kmeta;name=kmeta-xilinx-common;destsuffix=xilinx-common \
9 file://xilinx-machine;type=kmeta;name=kmeta-xilinx-machine;destsuffix=xilinx-machine \
10 "
11
diff --git a/recipes-kernel/linux/linux-xilinx-machines.inc b/recipes-kernel/linux/linux-xilinx-machines.inc
deleted file mode 100644
index 77cab0af..00000000
--- a/recipes-kernel/linux/linux-xilinx-machines.inc
+++ /dev/null
@@ -1,17 +0,0 @@
1# Setup for MicroBlaze and Zynq architectures
2COMPATIBLE_MACHINE ?= "^$"
3COMPATIBLE_MACHINE_zynq = "zynq"
4COMPATIBLE_MACHINE_zynqmp = "zynqmp"
5COMPATIBLE_MACHINE_microblaze = "microblaze"
6
7# Default kernel config fragements for specific machines
8KERNEL_FEATURES_append_ml605-qemu-microblazeel = " bsp/ml605-qemu-microblazeel.scc"
9KERNEL_FEATURES_append_s3adsp1800-qemu-microblazeeb = " bsp/s3adsp1800-qemu-microblazeeb.scc"
10KERNEL_FEATURES_append_kc705-microblazeel = " bsp/kc705-microblazeel/kc705-microblazeel.scc"
11
12# MicroBlaze is a uImage target, but its not called 'uImage' instead it is called 'linux.bin.ub'
13python () {
14 if d.getVar('KERNEL_IMAGETYPE', True).endswith('.ub'):
15 d.setVar('DEPENDS', "%s u-boot-mkimage-native" % d.getVar('DEPENDS', True))
16}
17
diff --git a/recipes-kernel/linux/linux-xlnx.inc b/recipes-kernel/linux/linux-xlnx.inc
index 844fdfd5..50d6ebf1 100644
--- a/recipes-kernel/linux/linux-xlnx.inc
+++ b/recipes-kernel/linux/linux-xlnx.inc
@@ -1,4 +1,3 @@
1
2# This version extension should match CONFIG_LOCALVERSION in defconfig 1# This version extension should match CONFIG_LOCALVERSION in defconfig
3XILINX_RELEASE_VERSION ?= "" 2XILINX_RELEASE_VERSION ?= ""
4LINUX_VERSION_EXTENSION ?= "-xilinx-${XILINX_RELEASE_VERSION}" 3LINUX_VERSION_EXTENSION ?= "-xilinx-${XILINX_RELEASE_VERSION}"
@@ -10,28 +9,36 @@ SRCBRANCHARG = "${@['nobranch=1', 'branch=${KBRANCH}'][d.getVar('KBRANCH', True)
10 9
11FILESOVERRIDES_append = ":${LINUX_VERSION}" 10FILESOVERRIDES_append = ":${LINUX_VERSION}"
12KERNELURI ?= "git://github.com/Xilinx/linux-xlnx.git;protocol=https" 11KERNELURI ?= "git://github.com/Xilinx/linux-xlnx.git;protocol=https"
13SRC_URI = " \ 12SRC_URI = "${KERNELURI};${SRCBRANCHARG}"
14 ${KERNELURI};${SRCBRANCHARG} \
15 file://xilinx-base;type=kmeta;name=kmeta-xilinx-base;destsuffix=xilinx-base \
16 "
17 13
18SRCREV_machine ?= "${SRCREV}" 14SRCREV_machine ?= "${SRCREV}"
19 15
20require recipes-kernel/linux/linux-yocto.inc 16require recipes-kernel/linux/linux-yocto.inc
17require linux-microblaze.inc
21 18
22DESCRIPTION = "Xilinx Kernel" 19DESCRIPTION = "Xilinx Kernel"
23 20
24require linux-xilinx-configs.inc 21# Force the use of the KBUILD_DEFCONFIG even if some other defconfig was generated in the ${WORKDIR}
25require linux-xilinx-machines.inc 22do_kernel_metadata_prepend () {
26 23 [ -n "${KBUILD_DEFCONFIG}" ] && [ -e ${WORKDIR}/defconfig ] && rm ${WORKDIR}/defconfig
27KBUILD_DEFCONFIG_zcu102-zynqmp = "xilinx_zynqmp_defconfig" 24}
28KCONFIG_MODE_zcu102-zynqmp = "alldefconfig" 25
29 26# Default to be only compatible with specific machines or soc families
30KERNEL_FEATURES_append = " bsp/xilinx/soc/linux-xlnx/drivers/xilinx.scc" 27COMPATIBLE_MACHINE ?= "^$"
31KERNEL_FEATURES_append_zynq = " bsp/xilinx/soc/linux-xlnx/drivers/zynq7.scc" 28COMPATIBLE_MACHINE_zynq = ".*"
32KERNEL_FEATURES_append_zynqmp = " \ 29COMPATIBLE_MACHINE_zynqmp = ".*"
33 bsp/xilinx/soc/linux-xlnx/drivers/zynqmp.scc \ 30COMPATIBLE_MACHINE_kc705-microblazeel = ".*"
34 features/drm/drm-xilinx.scc \ 31
35 features/v4l2/v4l2-xilinx.scc \ 32# Use DEFCONFIGs for configuring linux-xlnx kernels
36 " 33KCONFIG_MODE ?= "alldefconfig"
34KBUILD_DEFCONFIG_zynqmp = "xilinx_zynqmp_defconfig"
35KBUILD_DEFCONFIG_zynq = "xilinx_zynq_defconfig"
36KBUILD_DEFCONFIG_microblaze = "mmu_defconfig"
37
38# Add meta-xilinx kmeta, used for MicroBlaze BSP fragments
39FILESEXTRAPATHS_prepend := "${THISDIR}:"
40SRC_URI_append = " file://xilinx-kmeta;type=kmeta;name=xilinx-kmeta;destsuffix=xilinx-kmeta"
41
42# MicroBlaze BSP fragments
43KERNEL_FEATURES_append_kc705-microblazeel = " bsp/kc705-microblazeel/kc705-microblazeel.scc"
37 44