1eb8dc403SDave CobbleyDESCRIPTION = "Linux Kernel for Raspberry Pi"
2eb8dc403SDave CobbleySECTION = "kernel"
3eb8dc403SDave CobbleyLICENSE = "GPLv2"
4eb8dc403SDave CobbleyLIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
5eb8dc403SDave Cobbley
6eb8dc403SDave CobbleyCOMPATIBLE_MACHINE = "^rpi$"
7eb8dc403SDave Cobbley
8eb8dc403SDave CobbleyPE = "1"
9eb8dc403SDave CobbleyPV = "${LINUX_VERSION}+git${SRCPV}"
10eb8dc403SDave Cobbley
11eb8dc403SDave Cobbleyinherit kernel siteinfo
12eb8dc403SDave Cobbleyrequire recipes-kernel/linux/linux-yocto.inc
13eb8dc403SDave Cobbley
14*26e4beaaSAndrew GeisslerSRC_URI += " \
15*26e4beaaSAndrew Geissler    ${@bb.utils.contains("INITRAMFS_IMAGE_BUNDLE", "1", "file://initramfs-image-bundle.cfg", "", d)} \
16*26e4beaaSAndrew Geissler    ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "file://vc4graphics.cfg", "", d)} \
17*26e4beaaSAndrew Geissler    "
189392c69cSBrad Bishop
19eb8dc403SDave CobbleyKCONFIG_MODE = "--alldefconfig"
20eb8dc403SDave CobbleyKBUILD_DEFCONFIG_raspberrypi0-wifi ?= "bcmrpi_defconfig"
21eb8dc403SDave CobbleyKBUILD_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig"
221b9ee293SBrad BishopKBUILD_DEFCONFIG_raspberrypi-cm3 ?= "bcm2709_defconfig"
23eb8dc403SDave CobbleyKBUILD_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig"
24eb8dc403SDave CobbleyKBUILD_DEFCONFIG_raspberrypi3 ?= "bcm2709_defconfig"
25eb8dc403SDave CobbleyKBUILD_DEFCONFIG_raspberrypi3-64 ?= "bcmrpi3_defconfig"
2626bdd445SBrad BishopKBUILD_DEFCONFIG_raspberrypi4 ?= "bcm2711_defconfig"
2726bdd445SBrad BishopKBUILD_DEFCONFIG_raspberrypi4-64 ?= "bcm2711_defconfig"
28eb8dc403SDave Cobbley
29870eb53cSBrad BishopLINUX_VERSION_EXTENSION ?= ""
30870eb53cSBrad Bishop
31eb8dc403SDave CobbleyKERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "stmpe-ts", "", d)}"
32eb8dc403SDave Cobbley
33eb8dc403SDave Cobbley# A LOADADDR is needed when building a uImage format kernel. This value is not
34eb8dc403SDave Cobbley# set by default in rpi-4.8.y and later branches so we need to provide it
35eb8dc403SDave Cobbley# manually. This value unused if KERNEL_IMAGETYPE is not uImage.
36eb8dc403SDave CobbleyKERNEL_EXTRA_ARGS += "LOADADDR=0x00008000"
37eb8dc403SDave Cobbley
3826bdd445SBrad Bishopdo_compile_append() {
3926bdd445SBrad Bishop    if [ "${SITEINFO_BITS}" = "64" ]; then
40eb8dc403SDave Cobbley        cc_extra=$(get_cc_option)
41eb8dc403SDave Cobbley        oe_runmake dtbs CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
4226bdd445SBrad Bishop    fi
43eb8dc403SDave Cobbley}
44