diff --git a/meta-webos-backports/meta-webos-backports-5.0/conf/layer.conf b/meta-webos-backports/meta-webos-backports-5.0/conf/layer.conf index 180e51ab0..f08f4f6ae 100644 --- a/meta-webos-backports/meta-webos-backports-5.0/conf/layer.conf +++ b/meta-webos-backports/meta-webos-backports-5.0/conf/layer.conf @@ -19,3 +19,8 @@ LAYERDEPENDS_meta-webos-backports-5.0 = " \ " SKIP_RECIPE[rust-hello-world] ?= "BROKEN: doesn't build since rust and related bbclasses were updated by this layer, already removed in newer oe-core/nanbield" + +BBFILES_DYNAMIC += " \ + raspberrypi:${LAYERDIR}/dynamic-layers/raspberrypi/*/*/*.bb \ + raspberrypi:${LAYERDIR}/dynamic-layers/raspberrypi/*/*/*.bbappend \ +" diff --git a/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/android-drivers.cfg b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/android-drivers.cfg new file mode 100644 index 000000000..f74ac0e1c --- /dev/null +++ b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/android-drivers.cfg @@ -0,0 +1,8 @@ +CONFIG_ANDROID=y + +#CONFIG_ANDROID_BINDERFS is not set +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ANDROID_BINDER_DEVICES="binder" + +CONFIG_ASHMEM=y + diff --git a/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/default-cpu-governor.cfg b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/default-cpu-governor.cfg new file mode 100644 index 000000000..e2e201d71 --- /dev/null +++ b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/default-cpu-governor.cfg @@ -0,0 +1,9 @@ +# The defconfigs from the RPi Kernel set "powersave" as the default CPU governor. +# That is a bad idea as it reduces performance, so we unset that default option here. +# The option to build the powersave governor (but not as the default) is also enabled. +# A fix for this was sent to upstream: https://github.com/raspberrypi/linux/pull/5666 +# However, we need to carry this option override until those defconfigs are fixed on +# *all* the kernel branches that we support. So that can be a long time depending +# on wheter the above PR gets accepted and/or backported to the stable branches. +CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=n +CONFIG_CPU_FREQ_GOV_POWERSAVE=y diff --git a/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/initramfs-image-bundle.cfg b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/initramfs-image-bundle.cfg new file mode 100644 index 000000000..8d3ad168f --- /dev/null +++ b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/initramfs-image-bundle.cfg @@ -0,0 +1,5 @@ +CONFIG_OVERLAY_FS=y +CONFIG_SQUASHFS=y +CONFIG_MTD=y +CONFIG_MTD_UBI=y +CONFIG_UBIFS_FS=y diff --git a/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/powersave.cfg b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/powersave.cfg new file mode 100644 index 000000000..9c48eff19 --- /dev/null +++ b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/powersave.cfg @@ -0,0 +1,13 @@ +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_HIBERNATE_CALLBACKS=y +CONFIG_HIBERNATION=y +CONFIG_PM_STD_PARTITION="/dev/mmcblk0p2" +CONFIG_PM_SLEEP=y +CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=100 +CONFIG_PM_WAKELOCKS_GC=y +CONFIG_PM_GENERIC_DOMAINS_SLEEP=y +CONFIG_ARCH_HIBERNATION_HEADER=y diff --git a/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg new file mode 100644 index 000000000..fd97ed71f --- /dev/null +++ b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg @@ -0,0 +1,2 @@ +# see emmc node +CONFIG_MMC_SDHCI_IPROC=y diff --git a/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/raspberrypi4/rpi4-nvmem.cfg b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/raspberrypi4/rpi4-nvmem.cfg new file mode 100644 index 000000000..024816245 --- /dev/null +++ b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/raspberrypi4/rpi4-nvmem.cfg @@ -0,0 +1 @@ +CONFIG_NVMEM_RMEM=y diff --git a/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/vc4graphics.cfg b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/vc4graphics.cfg new file mode 100644 index 000000000..0b4ba4843 --- /dev/null +++ b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/vc4graphics.cfg @@ -0,0 +1,6 @@ +CONFIG_I2C_BCM2835=y +CONFIG_DRM=y +CONFIG_DRM_FBDEV_EMULATION=y +CONFIG_DRM_VC4=y +CONFIG_SND=y +CONFIG_SND_SOC=y diff --git a/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/wm8960.cfg b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/wm8960.cfg new file mode 100644 index 000000000..936080083 --- /dev/null +++ b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/files/wm8960.cfg @@ -0,0 +1,2 @@ +CONFIG_I2C_BCM2835=y +CONFIG_SND_SOC_WM8960=y diff --git a/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc new file mode 100644 index 000000000..e62ff3ff7 --- /dev/null +++ b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc @@ -0,0 +1,48 @@ +DESCRIPTION = "Linux Kernel for Raspberry Pi" +SECTION = "kernel" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +COMPATIBLE_MACHINE ?= "^rpi$" + +PE = "1" +PV = "${LINUX_VERSION}+git${SRCPV}" + +inherit siteinfo +require recipes-kernel/linux/linux-yocto.inc + +SRC_URI += " \ + ${@bb.utils.contains("INITRAMFS_IMAGE_BUNDLE", "1", "file://initramfs-image-bundle.cfg", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "file://vc4graphics.cfg", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "wm8960", "file://wm8960.cfg", "", d)} \ + file://default-cpu-governor.cfg \ + " + +SRC_URI:append:raspberrypi4 = " \ + file://rpi4-nvmem.cfg \ +" + +KCONFIG_MODE = "--alldefconfig" +KBUILD_DEFCONFIG:raspberrypi0-wifi ?= "bcmrpi_defconfig" +KBUILD_DEFCONFIG:raspberrypi ?= "bcmrpi_defconfig" +KBUILD_DEFCONFIG:raspberrypi-cm3 ?= "bcm2709_defconfig" +KBUILD_DEFCONFIG:raspberrypi2 ?= "bcm2709_defconfig" +KBUILD_DEFCONFIG:raspberrypi3 ?= "bcm2709_defconfig" +KBUILD_DEFCONFIG:raspberrypi3-64 ?= "bcmrpi3_defconfig" +KBUILD_DEFCONFIG:raspberrypi4 ?= "bcm2711_defconfig" +KBUILD_DEFCONFIG:raspberrypi4-64 ?= "bcm2711_defconfig" +KBUILD_DEFCONFIG:raspberrypi-armv7 ?= "bcm2711_defconfig" +KBUILD_DEFCONFIG:raspberrypi-armv8 ?= "bcm2711_defconfig" +KBUILD_DEFCONFIG:raspberrypi5 ?= "bcm2712_defconfig" + +LINUX_VERSION_EXTENSION ?= "" + +KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "stmpe-ts", "", d)}" + +# A LOADADDR is needed when building a uImage format kernel. This value is not +# set by default in rpi-4.8.y and later branches so we need to provide it +# manually. This value unused if KERNEL_IMAGETYPE is not uImage. +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" + +UBOOT_ENTRYPOINT = "0x00008000" +UBOOT_LOADADDRESS = "0x00008000" diff --git a/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_6.1.bb b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_6.1.bb new file mode 100644 index 000000000..5731a816d --- /dev/null +++ b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_6.1.bb @@ -0,0 +1,31 @@ +LINUX_VERSION ?= "6.1.77" +LINUX_RPI_BRANCH ?= "rpi-6.1.y" +LINUX_RPI_KMETA_BRANCH ?= "yocto-6.1" + +SRCREV_machine = "77fc1fbcb5c013329af9583307dd1ff3cd4752aa" +SRCREV_meta = "43d1723dbe0ce7b341cf32feeb35ecbe6b0ce29a" + +KMETA = "kernel-meta" + +SRC_URI = " \ + git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \ + file://powersave.cfg \ + file://android-drivers.cfg \ + " + +require linux-raspberrypi.inc + +KERNEL_DTC_FLAGS += "-@ -H epapr" + +RDEPENDS:${KERNEL_PACKAGE_NAME}:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}" +RDEPENDS:${KERNEL_PACKAGE_NAME}-base:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-base" +RDEPENDS:${KERNEL_PACKAGE_NAME}-image:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-image" +RDEPENDS:${KERNEL_PACKAGE_NAME}-dev:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-dev" +RDEPENDS:${KERNEL_PACKAGE_NAME}-vmlinux:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-vmlinux" +RDEPENDS:${KERNEL_PACKAGE_NAME}-modules:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-modules" +RDEPENDS:${KERNEL_PACKAGE_NAME}-dbg:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-dbg" + +DEPLOYDEP = "" +DEPLOYDEP:raspberrypi-armv7 = "${RASPBERRYPI_v7_KERNEL}:do_deploy" +do_deploy[depends] += "${DEPLOYDEP}" diff --git a/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_6.6.bb b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_6.6.bb new file mode 100644 index 000000000..b4d9953e1 --- /dev/null +++ b/meta-webos-backports/meta-webos-backports-5.0/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_6.6.bb @@ -0,0 +1,31 @@ +LINUX_VERSION ?= "6.6.22" +LINUX_RPI_BRANCH ?= "rpi-6.6.y" +LINUX_RPI_KMETA_BRANCH ?= "yocto-6.6" + +SRCREV_machine = "c04af98514c26014a4f29ec87b3ece95626059bd" +SRCREV_meta = "6a24861d6504575a4a9f92366285332d47c7e111" + +KMETA = "kernel-meta" + +SRC_URI = " \ + git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \ + file://powersave.cfg \ + file://android-drivers.cfg \ + " + +require linux-raspberrypi.inc + +KERNEL_DTC_FLAGS += "-@ -H epapr" + +RDEPENDS:${KERNEL_PACKAGE_NAME}:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}" +RDEPENDS:${KERNEL_PACKAGE_NAME}-base:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-base" +RDEPENDS:${KERNEL_PACKAGE_NAME}-image:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-image" +RDEPENDS:${KERNEL_PACKAGE_NAME}-dev:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-dev" +RDEPENDS:${KERNEL_PACKAGE_NAME}-vmlinux:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-vmlinux" +RDEPENDS:${KERNEL_PACKAGE_NAME}-modules:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-modules" +RDEPENDS:${KERNEL_PACKAGE_NAME}-dbg:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-dbg" + +DEPLOYDEP = "" +DEPLOYDEP:raspberrypi-armv7 = "${RASPBERRYPI_v7_KERNEL}:do_deploy" +do_deploy[depends] += "${DEPLOYDEP}"