blob: 73f85ddcf056739c6f619ece49aee1d4709f2e87 [file] [log] [blame]
Brad Bishop286d45c2018-10-02 15:21:57 -04001# This version extension should match CONFIG_LOCALVERSION in defconfig
2XILINX_RELEASE_VERSION ?= ""
3LINUX_VERSION_EXTENSION ?= "-xilinx-${XILINX_RELEASE_VERSION}"
Andrew Geissler84ad7c52020-06-27 00:00:16 -05004PV = "${LINUX_VERSION}+git${SRCPV}"
Brad Bishop286d45c2018-10-02 15:21:57 -04005
6# Sources, by default allow for the use of SRCREV pointing to orphaned tags/commits
Andrew Geissler84ad7c52020-06-27 00:00:16 -05007KBRANCH ?= "xlnx_rebase_v5.4"
Brad Bishop286d45c2018-10-02 15:21:57 -04008SRCBRANCHARG = "${@['nobranch=1', 'branch=${KBRANCH}'][d.getVar('KBRANCH', True) != '']}"
9
10FILESOVERRIDES_append = ":${XILINX_RELEASE_VERSION}"
Andrew Geissler84ad7c52020-06-27 00:00:16 -050011KERNELURI ?= "git://github.com/Xilinx/linux-xlnx.git;protocol=https;name=machine"
12YOCTO_META ?= "git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=yocto-kmeta"
13SRC_URI = "${KERNELURI};${SRCBRANCHARG} ${YOCTO_META}"
Brad Bishop286d45c2018-10-02 15:21:57 -040014
15SRCREV_machine ?= "${SRCREV}"
Andrew Geissler84ad7c52020-06-27 00:00:16 -050016SRCREV_meta ?= "93b1325e4b9bff0d1ce7a2dd85aed0b26e3e76d7"
17SRCREV_FORMAT = "machine"
Brad Bishop286d45c2018-10-02 15:21:57 -040018
19require recipes-kernel/linux/linux-yocto.inc
20require linux-microblaze.inc
21
22DESCRIPTION = "Xilinx Kernel"
Brad Bishop754b8fa2019-08-20 09:16:20 -040023LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
Brad Bishop286d45c2018-10-02 15:21:57 -040024
Brad Bishop26bdd442019-08-16 17:08:17 -040025EXTKERNELSRC = "${@'1' if d.getVar('EXTERNALSRC') else ''}"
26
Brad Bishop286d45c2018-10-02 15:21:57 -040027# Force the use of the KBUILD_DEFCONFIG even if some other defconfig was generated in the ${WORKDIR}
28do_kernel_metadata_prepend () {
29 [ -n "${KBUILD_DEFCONFIG}" ] && [ -e ${WORKDIR}/defconfig ] && rm ${WORKDIR}/defconfig
30}
31
Brad Bishop26bdd442019-08-16 17:08:17 -040032do_configure_prepend () {
33 if [ -n "${KBUILD_DEFCONFIG}" ] && [ -n "${EXTKERNELSRC}" ]; then
34 cp ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
35 fi
36}
37
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038inherit kernel-simpleimage
39
Brad Bishop286d45c2018-10-02 15:21:57 -040040# Default to be only compatible with specific machines or soc families
41COMPATIBLE_MACHINE ?= "^$"
42COMPATIBLE_MACHINE_zynq = ".*"
43COMPATIBLE_MACHINE_zynqmp = ".*"
44COMPATIBLE_MACHINE_microblaze = ".*"
Brad Bishop26bdd442019-08-16 17:08:17 -040045COMPATIBLE_MACHINE_versal = ".*"
Brad Bishop286d45c2018-10-02 15:21:57 -040046
47# Use DEFCONFIGs for configuring linux-xlnx kernels
48KCONFIG_MODE ?= "alldefconfig"
49KBUILD_DEFCONFIG_zynqmp = "xilinx_zynqmp_defconfig"
50KBUILD_DEFCONFIG_zynq = "xilinx_zynq_defconfig"
51KBUILD_DEFCONFIG_microblaze = "mmu_defconfig"
Brad Bishop26bdd442019-08-16 17:08:17 -040052KBUILD_DEFCONFIG_versal = "xilinx_versal_defconfig"
Brad Bishop286d45c2018-10-02 15:21:57 -040053
54# Add meta-xilinx kmeta, used for MicroBlaze BSP fragments
55FILESEXTRAPATHS_prepend := "${THISDIR}:"
56SRC_URI_append = " file://xilinx-kmeta;type=kmeta;name=xilinx-kmeta;destsuffix=xilinx-kmeta"
57
58# MicroBlaze BSP fragments
59KERNEL_FEATURES_append_kc705-microblazeel = " bsp/kc705-microblazeel/kc705-microblazeel.scc"
60
Andrew Geissler84ad7c52020-06-27 00:00:16 -050061KERNEL_FEATURES_append_zynqmp = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' features/xen/xen.scc', '', d)}"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080062
Brad Bishop26bdd442019-08-16 17:08:17 -040063KERNEL_FEATURES_append_zynqmp = "${@' features/overlay/overlay.scc' if d.getVar('FPGA_MNGR_RECONFIG_ENABLE') == '1' else ''}"
64
Andrew Geissler84ad7c52020-06-27 00:00:16 -050065KERNEL_FEATURES_append_versal = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' features/xen/xen.scc', '', d)}"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080066
Andrew Geissler84ad7c52020-06-27 00:00:16 -050067KERNEL_FEATURES_append_ultra96-zynqmp = " bsp/ultra96-zynqmp/mipi-config-ultra96.scc"
68
69KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', ' features/ocicontainer/ocicontainer.scc', '', d)}"