diff options
Diffstat (limited to 'meta-agl-bsp/meta-raspberrypi/recipes-kernel')
-rw-r--r-- | meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb | 43 | ||||
-rw-r--r-- | meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/dtc_1.7.0.bbappend (renamed from meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/dtc_1.6.0.bbappend) | 2 | ||||
-rw-r--r-- | meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-mconf-menuconfig.patch | 6 | ||||
-rw-r--r-- | meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-Disable-DMA-in-sdhci-driver.patch | 25 | ||||
-rw-r--r-- | meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0003-Fix-PCIe-in-dom0-for-RPi4.patch | 31 | ||||
-rw-r--r-- | meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend | 56 | ||||
-rw-r--r-- | meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend | 17 |
7 files changed, 42 insertions, 138 deletions
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb index c365715fa..c5edbe1dc 100644 --- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb +++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb @@ -7,36 +7,27 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384 DEPENDS = "dtc-native" -ALLOW_EMPTY_${PN} = "1" -FILES_${PN} = "" +ALLOW_EMPTY:${PN} = "1" +FILES:${PN} = "" S = "${WORKDIR}" do_compile[depends] += "virtual/kernel:do_deploy" do_compile () { - # Official touchscreen setup (rpi3b/rpi3b dtb, VC4DTBO and ft5406) - if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb" ]; then - fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b-plus+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo - fi - if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb" ]; then - fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo + # Plain VC4 (HDMI) + if [ -f "${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb" ]; then + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb -o bcm2711-rpi-4-b+vc4.dtb \ + ${DEPLOY_DIR_IMAGE}/${VC4DTBO}-pi4.dtbo fi - # NOTE: meta-updater currently disables rpi-ft5406.dtbo on rpi4, so need to check if it is present + + # VC4 + LCD if [ -f "${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb" -a -f "${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo" ]; then - fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb -o bcm2711-rpi-4-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb -o bcm2711-rpi-4-b+vc4+ft5406.dtb \ + ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo \ + ${DEPLOY_DIR_IMAGE}/${VC4DTBO}-pi4.dtbo fi - # HDMI screen setup (rpi3b/rpi3b dtb and VC4DTBO) - if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb" ]; then - fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b-plus+vc4.dtb ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo - fi - if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb" ]; then - fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo - fi - if [ -f "${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb" ]; then - fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb -o bcm2711-rpi-4-b+vc4.dtb ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo - fi } do_deploy () { @@ -44,21 +35,9 @@ do_deploy () { if [ -f "${S}/bcm2711-rpi-4-b+vc4+ft5406.dtb" ]; then install -m 0644 ${S}/bcm2711-rpi-4-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE} fi - if [ -f "${S}/bcm2710-rpi-3-b+vc4+ft5406.dtb" ]; then - install -m 0644 ${S}/bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE} - fi - if [ -f "${S}/bcm2710-rpi-3+vc4+ft5406.dtb" ]; then - install -m 0644 ${S}/bcm2710-rpi-3+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE} - fi if [ -f "${S}/bcm2711-rpi-4-b+vc4.dtb" ]; then install -m 0644 ${S}/bcm2711-rpi-4-b+vc4.dtb ${DEPLOY_DIR_IMAGE} fi - if [ -f "${S}/bcm2710-rpi-3-b+vc4.dtb" ]; then - install -m 0644 ${S}/bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE} - fi - if [ -f "${S}/bcm2710-rpi-3+vc4.dtb" ]; then - install -m 0644 ${S}/bcm2710-rpi-3+vc4.dtb ${DEPLOY_DIR_IMAGE} - fi } addtask deploy after do_install diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/dtc_1.6.0.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/dtc_1.7.0.bbappend index 89e45a8d3..a28a9e748 100644 --- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/dtc_1.6.0.bbappend +++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/dtc_1.7.0.bbappend @@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI += "file://0001-fdtoverlay-Prevent-overlays-from-modifying-phandle-p.patch" diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-mconf-menuconfig.patch b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-mconf-menuconfig.patch index 3dc71ff22..7f0979ca9 100644 --- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-mconf-menuconfig.patch +++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-mconf-menuconfig.patch @@ -40,9 +40,9 @@ index c812872d7f9d..42d20819025c 100755 + exit 0 +fi + - if [ -n "$(command -v pkg-config)" ]; then - if pkg-config --exists $PKG; then - echo cflags=\"$(pkg-config --cflags $PKG)\" + if [ -n "$(command -v ${HOSTPKG_CONFIG})" ]; then + if ${HOSTPKG_CONFIG} --exists $PKG; then + echo cflags=\"$(${HOSTPKG_CONFIG} --cflags $PKG)\" -- 2.17.1 diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-Disable-DMA-in-sdhci-driver.patch b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-Disable-DMA-in-sdhci-driver.patch deleted file mode 100644 index 04a8733f2..000000000 --- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-Disable-DMA-in-sdhci-driver.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 758bc9b917469bc4e527dc3aae821c91cbc3d426 Mon Sep 17 00:00:00 2001 -From: Stewart Hildebrand <stewart.hildebrand@dornerworks.com> -Date: Thu, 18 Jul 2019 00:01:27 -0400 -Subject: [PATCH 2/4] Disable DMA in sdhci driver - ---- - drivers/mmc/host/sdhci-iproc.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c -index 983cddce9..150f7bfc8 100644 ---- a/drivers/mmc/host/sdhci-iproc.c -+++ b/drivers/mmc/host/sdhci-iproc.c -@@ -252,6 +252,8 @@ static const struct sdhci_iproc_data bcm2835_data = { - - static const struct sdhci_pltfm_data sdhci_bcm2838_pltfm_data = { - .ops = &sdhci_iproc_32only_ops, -+ .quirks = SDHCI_QUIRK_BROKEN_DMA | -+ SDHCI_QUIRK_BROKEN_ADMA, - }; - - static const struct sdhci_iproc_data bcm2838_data = { --- -2.17.1 - diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0003-Fix-PCIe-in-dom0-for-RPi4.patch b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0003-Fix-PCIe-in-dom0-for-RPi4.patch deleted file mode 100644 index 835f36da3..000000000 --- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0003-Fix-PCIe-in-dom0-for-RPi4.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 77765c2a47ce43911b8fe7b09f037c9bc13008ca Mon Sep 17 00:00:00 2001 -From: Jeff Kubascik <jeff.kubascik@dornerworks.com> -Date: Tue, 30 Jul 2019 08:49:56 -0400 -Subject: [PATCH 3/4] Fix PCIe in dom0 for RPi4 - -There is an issue where the Broadcom PCIe driver and Xen swiotlb layer -invoke each other's dma alloc function recursively until the stack blows -up. The cause appears to be due to arch_setup_dma_ops being called -more than once for the device, possibly through of_dma_configure, and -screwing up the dma_ops pointers. This patch adds a check to make sure -that the xen_dma_ops are applied only once for a device. ---- - arch/arm64/mm/dma-mapping.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c -index d3a5bb16f..243a3b9be 100644 ---- a/arch/arm64/mm/dma-mapping.c -+++ b/arch/arm64/mm/dma-mapping.c -@@ -895,7 +895,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, - __iommu_setup_dma_ops(dev, dma_base, size, iommu); - - #ifdef CONFIG_XEN -- if (xen_initial_domain()) { -+ if (!dev->archdata.dev_dma_ops && xen_initial_domain()) { - dev->archdata.dev_dma_ops = dev->dma_ops; - dev->dma_ops = xen_dma_ops; - } --- -2.17.1 - diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend index dd850669f..ec3fa910b 100644 --- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend +++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend @@ -1,48 +1,46 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" -require recipes-kernel/linux/linux-agl.inc +require recipes-kernel/linux/linux-yocto-agl.inc -SRC_URI_append = "\ +SRC_URI:append = " \ ${@oe.utils.conditional('USE_FAYTECH_MONITOR', '1', 'file://0002-faytech-fix-rpi.patch', '', d)} \ file://0001-mconf-menuconfig.patch \ " -#take in account that linux under xen should use the hvc0 console -SERIAL_OPTION = "${@bb.utils.contains('AGL_XEN_WANTED','1','hvc0','115200;ttyS0',d)}" + +# Enable support for Pi foundation touchscreen +AGL_KCONFIG_FRAGMENTS += "raspberrypi-panel.cfg" + +# Enable bt hci uart +AGL_KCONFIG_FRAGMENTS += "raspberrypi-hciuart.cfg" + +# ENABLE NETWORK (built-in) +AGL_KCONFIG_FRAGMENTS += "raspberrypi_network.cfg" + +# For Xen +AGL_KCONFIG_FRAGMENTS += " \ + ${@bb.utils.contains('AGL_XEN_WANTED','1','xen-be.cfg','',d)} \ +" + +# Take in account that linux under Xen should use the hvc0 console +SERIAL_OPTION = "${@bb.utils.contains('AGL_XEN_WANTED','1','hvc0','ttyS0,115200',d)}" SERIAL = "${@oe.utils.conditional("ENABLE_UART", "1", "console=${SERIAL_OPTION}", "", d)}" CMDLINE_DEBUG = "" -#XEN related option -CMDLINE_append = ' ${@bb.utils.contains('AGL_XEN_WANTED','1','clk_ignore_unused','',d)}' +# Xen related option +CMDLINE:append = ' ${@bb.utils.contains('AGL_XEN_WANTED','1','clk_ignore_unused','',d)}' -#workaround for crash during brcmfmac loading. Disable it at this moment -CMDLINE_append = ' ${@bb.utils.contains('AGL_XEN_WANTED','1','modprobe.blacklist=brcmfmac','',d)}' +# Workaround for crash during brcmfmac loading. Disable it at this moment +CMDLINE:append = ' ${@bb.utils.contains('AGL_XEN_WANTED','1','modprobe.blacklist=brcmfmac','',d)}' -CMDLINE_append = " usbhid.mousepoll=0" +CMDLINE:append = " usbhid.mousepoll=0" # Add options to allow CMA to operate -CMDLINE_append = '${@oe.utils.conditional("ENABLE_CMA", "1", " coherent_pool=6M smsc95xx.turbo_mode=N", "", d)}' +CMDLINE:append = '${@oe.utils.conditional("ENABLE_CMA", "1", " coherent_pool=6M smsc95xx.turbo_mode=N", "", d)}' KERNEL_MODULE_AUTOLOAD += "snd-bcm2835" KERNEL_MODULE_AUTOLOAD += "hid-multitouch" -RDEPENDS_${PN} += "kernel-module-snd-bcm2835" PACKAGES += "kernel-module-snd-bcm2835" -# Enable support for usb video class for usb camera devices -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uvc.cfg" - -# Enable support for joystick devices -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/joystick.cfg" - -# Enable support for Pi foundation touchscreen -SRC_URI_append = " file://raspberrypi-panel.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi-panel.cfg" - -# Enable bt hci uart -SRC_URI_append = " file://raspberrypi-hciuart.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi-hciuart.cfg" - -# ENABLE NETWORK (built-in) -SRC_URI_append = " file://raspberrypi_network.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi_network.cfg" +RDEPENDS:${PN} += "kernel-module-snd-bcm2835" diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend deleted file mode 100644 index 2d100cb43..000000000 --- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend +++ /dev/null @@ -1,17 +0,0 @@ -require recipes-kernel/linux/linux-agl-4.19.inc - -ENABLE_UART_raspberrypi4 = "1" - -# For Xen - -SRC_URI_append =" \ - ${@bb.utils.contains('AGL_XEN_WANTED','1','file://0002-Disable-DMA-in-sdhci-driver.patch','',d)} \ -" - -SRC_URI_append =" \ - ${@bb.utils.contains('AGL_XEN_WANTED','1','file://0003-Fix-PCIe-in-dom0-for-RPi4.patch','',d)} \ -" - -SRC_URI_append = " \ - ${@bb.utils.contains('AGL_XEN_WANTED','1','file://xen-be.cfg','',d)} \ -" |