blob: 6b4264f54bfb578c2a473540c661b993874a18f7 [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 Geisslera9ff2b32020-10-16 10:11:54 -050016SRCREV_meta ?= "33bd5e8ac6fa46d5d7891b6e850603159f095b1a"
Andrew Geissler84ad7c52020-06-27 00:00:16 -050017SRCREV_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"
Andrew Geisslera9ff2b32020-10-16 10:11:54 -050049KBUILD_DEFCONFIG_zynqmp = "xilinx_defconfig"
Brad Bishop286d45c2018-10-02 15:21:57 -040050KBUILD_DEFCONFIG_zynq = "xilinx_zynq_defconfig"
51KBUILD_DEFCONFIG_microblaze = "mmu_defconfig"
Andrew Geisslera9ff2b32020-10-16 10:11:54 -050052KBUILD_DEFCONFIG_versal = "xilinx_defconfig"
Brad Bishop286d45c2018-10-02 15:21:57 -040053
54# MicroBlaze BSP fragments
Andrew Geisslera9ff2b32020-10-16 10:11:54 -050055KERNEL_FEATURES_append_kc705-microblazeel = " bsp/xilinx/kc705-microblazeel-features/kc705-microblazeel-features.scc"
Brad Bishop286d45c2018-10-02 15:21:57 -040056
Andrew Geissler84ad7c52020-06-27 00:00:16 -050057KERNEL_FEATURES_append_zynqmp = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' features/xen/xen.scc', '', d)}"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080058
Andrew Geisslera9ff2b32020-10-16 10:11:54 -050059KERNEL_FEATURES_append_zynqmp = "${@' features/xilinx/overlay/overlay_of.scc' if d.getVar('FPGA_MNGR_RECONFIG_ENABLE') == '1' else ''}"
Brad Bishop26bdd442019-08-16 17:08:17 -040060
Andrew Geisslera9ff2b32020-10-16 10:11:54 -050061KERNEL_FEATURES_append_versal = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' features/xen/xen.scc', '', d)} features/xilinx/hdmi-module/hdmi-module.scc"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080062
Andrew Geisslera9ff2b32020-10-16 10:11:54 -050063KERNEL_FEATURES_append_ultra96-zynqmp = " bsp/xilinx/ultra96-zynqmp/mipi-config-ultra96.scc"
Andrew Geissler84ad7c52020-06-27 00:00:16 -050064
65KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', ' features/ocicontainer/ocicontainer.scc', '', d)}"