Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 1 | # This version extension should match CONFIG_LOCALVERSION in defconfig |
| 2 | XILINX_RELEASE_VERSION ?= "" |
| 3 | LINUX_VERSION_EXTENSION ?= "-xilinx-${XILINX_RELEASE_VERSION}" |
| 4 | PV = "${LINUX_VERSION}${LINUX_VERSION_EXTENSION}+git${SRCPV}" |
| 5 | |
| 6 | # Sources, by default allow for the use of SRCREV pointing to orphaned tags/commits |
| 7 | KBRANCH ?= "" |
| 8 | SRCBRANCHARG = "${@['nobranch=1', 'branch=${KBRANCH}'][d.getVar('KBRANCH', True) != '']}" |
| 9 | |
| 10 | FILESOVERRIDES_append = ":${XILINX_RELEASE_VERSION}" |
| 11 | KERNELURI ?= "git://github.com/Xilinx/linux-xlnx.git;protocol=https" |
| 12 | SRC_URI = "${KERNELURI};${SRCBRANCHARG}" |
| 13 | |
| 14 | SRCREV_machine ?= "${SRCREV}" |
| 15 | |
| 16 | require recipes-kernel/linux/linux-yocto.inc |
| 17 | require linux-microblaze.inc |
| 18 | |
| 19 | DESCRIPTION = "Xilinx Kernel" |
| 20 | |
| 21 | # Force the use of the KBUILD_DEFCONFIG even if some other defconfig was generated in the ${WORKDIR} |
| 22 | do_kernel_metadata_prepend () { |
| 23 | [ -n "${KBUILD_DEFCONFIG}" ] && [ -e ${WORKDIR}/defconfig ] && rm ${WORKDIR}/defconfig |
| 24 | } |
| 25 | |
| 26 | # Default to be only compatible with specific machines or soc families |
| 27 | COMPATIBLE_MACHINE ?= "^$" |
| 28 | COMPATIBLE_MACHINE_zynq = ".*" |
| 29 | COMPATIBLE_MACHINE_zynqmp = ".*" |
| 30 | COMPATIBLE_MACHINE_microblaze = ".*" |
| 31 | |
| 32 | # Use DEFCONFIGs for configuring linux-xlnx kernels |
| 33 | KCONFIG_MODE ?= "alldefconfig" |
| 34 | KBUILD_DEFCONFIG_zynqmp = "xilinx_zynqmp_defconfig" |
| 35 | KBUILD_DEFCONFIG_zynq = "xilinx_zynq_defconfig" |
| 36 | KBUILD_DEFCONFIG_microblaze = "mmu_defconfig" |
| 37 | |
| 38 | # Add meta-xilinx kmeta, used for MicroBlaze BSP fragments |
| 39 | FILESEXTRAPATHS_prepend := "${THISDIR}:" |
| 40 | SRC_URI_append = " file://xilinx-kmeta;type=kmeta;name=xilinx-kmeta;destsuffix=xilinx-kmeta" |
| 41 | |
| 42 | # MicroBlaze BSP fragments |
| 43 | KERNEL_FEATURES_append_kc705-microblazeel = " bsp/kc705-microblazeel/kc705-microblazeel.scc" |
| 44 | |
| 45 | KERNEL_FEATURES_zynqmp += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' bsp/xilinx/xen.scc', '', d)}" |