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}" |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 4 | PV = "${LINUX_VERSION}+git${SRCPV}" |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 5 | |
| 6 | # Sources, by default allow for the use of SRCREV pointing to orphaned tags/commits |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 7 | KBRANCH ?= "xlnx_rebase_v5.4" |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 8 | SRCBRANCHARG = "${@['nobranch=1', 'branch=${KBRANCH}'][d.getVar('KBRANCH', True) != '']}" |
| 9 | |
| 10 | FILESOVERRIDES_append = ":${XILINX_RELEASE_VERSION}" |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 11 | KERNELURI ?= "git://github.com/Xilinx/linux-xlnx.git;protocol=https;name=machine" |
| 12 | YOCTO_META ?= "git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=yocto-kmeta" |
| 13 | SRC_URI = "${KERNELURI};${SRCBRANCHARG} ${YOCTO_META}" |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 14 | |
| 15 | SRCREV_machine ?= "${SRCREV}" |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 16 | SRCREV_meta ?= "33bd5e8ac6fa46d5d7891b6e850603159f095b1a" |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 17 | SRCREV_FORMAT = "machine" |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 18 | |
| 19 | require recipes-kernel/linux/linux-yocto.inc |
| 20 | require linux-microblaze.inc |
| 21 | |
| 22 | DESCRIPTION = "Xilinx Kernel" |
Brad Bishop | 754b8fa | 2019-08-20 09:16:20 -0400 | [diff] [blame] | 23 | LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 24 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 25 | EXTKERNELSRC = "${@'1' if d.getVar('EXTERNALSRC') else ''}" |
| 26 | |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 27 | # Force the use of the KBUILD_DEFCONFIG even if some other defconfig was generated in the ${WORKDIR} |
| 28 | do_kernel_metadata_prepend () { |
| 29 | [ -n "${KBUILD_DEFCONFIG}" ] && [ -e ${WORKDIR}/defconfig ] && rm ${WORKDIR}/defconfig |
| 30 | } |
| 31 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 32 | do_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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 38 | inherit kernel-simpleimage |
| 39 | |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 40 | # Default to be only compatible with specific machines or soc families |
| 41 | COMPATIBLE_MACHINE ?= "^$" |
| 42 | COMPATIBLE_MACHINE_zynq = ".*" |
| 43 | COMPATIBLE_MACHINE_zynqmp = ".*" |
| 44 | COMPATIBLE_MACHINE_microblaze = ".*" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 45 | COMPATIBLE_MACHINE_versal = ".*" |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 46 | |
| 47 | # Use DEFCONFIGs for configuring linux-xlnx kernels |
| 48 | KCONFIG_MODE ?= "alldefconfig" |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 49 | KBUILD_DEFCONFIG_zynqmp = "xilinx_defconfig" |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 50 | KBUILD_DEFCONFIG_zynq = "xilinx_zynq_defconfig" |
| 51 | KBUILD_DEFCONFIG_microblaze = "mmu_defconfig" |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 52 | KBUILD_DEFCONFIG_versal = "xilinx_defconfig" |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 53 | |
| 54 | # MicroBlaze BSP fragments |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 55 | KERNEL_FEATURES_append_kc705-microblazeel = " bsp/xilinx/kc705-microblazeel-features/kc705-microblazeel-features.scc" |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 56 | |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 57 | KERNEL_FEATURES_append_zynqmp = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' features/xen/xen.scc', '', d)}" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 58 | |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 59 | KERNEL_FEATURES_append_zynqmp = "${@' features/xilinx/overlay/overlay_of.scc' if d.getVar('FPGA_MNGR_RECONFIG_ENABLE') == '1' else ''}" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 60 | |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 61 | KERNEL_FEATURES_append_versal = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' features/xen/xen.scc', '', d)} features/xilinx/hdmi-module/hdmi-module.scc" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 62 | |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 63 | KERNEL_FEATURES_append_ultra96-zynqmp = " bsp/xilinx/ultra96-zynqmp/mipi-config-ultra96.scc" |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 64 | |
| 65 | KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', ' features/ocicontainer/ocicontainer.scc', '', d)}" |