38 Commits

Author SHA1 Message Date
Leon Anavi
cd677051d1 rpi-base.inc: vc4-kms-dsi-ili9881-5inch.dtbo
Add vc4-kms-dsi-ili9881-5inch.dtbo to RPI_KERNEL_DEVICETREE_OVERLAYS
for the 5" version of Raspberry Pi Touch Display 2.

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-11-25 19:47:08 +00:00
Gyorgy Sarvari
5240b5c200 weston: add patch to adapt to 64-bit plane ids
The raspberry pi kernel has changed the plane IDs in their drm
driver[1], which causes weston to crash upon mouse movement.

This patch adapts the relevant variable sizes from 32-bit to
64-bit.

Since the kernel modification hasn't been upstreamed by rpi, this patch
is deemed to be inappropriate for upstreaming to weston.

Also, clean up this bbappend: the main recipe has switched to meson
long time ago, the autotools config options are obsolete, so remove them.

Beside that the "fbdev" PACKAGECONFIG doesn't exist anymore, so drop it
from the removal list.

[1]: 8181e682d6

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2025-11-22 20:02:35 -08:00
Leon Anavi
8767e2ff80 rpi-base.inc: Add rpi-backlight.dtbo
Add rpi-backlight.dtbo to RPI_KERNEL_DEVICETREE_OVERLAYS. This is
a devicetree overlay for mailbox-driven Raspberry Pi DSI Display
backlight controller.

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-10-30 00:26:10 +01:00
Leon Anavi
4d53165cbe rpi-base.inc: Add w1-gpio-pi5.dtbo
Add w1-gpio-pi5.dtbo to RPI_KERNEL_DEVICETREE_OVERLAYS to resolve
the following issue noticed in vclog --msg on Raspberry Pi 5 when
ENABLE_W1 is set to 1:

dtdebug: mapped overlay 'w1-gpio' to 'w1-gpio-pi5'
dtdebug: Failed to open overlay file 'overlays/w1-gpio-pi5.dtbo'

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-10-18 20:30:35 +01:00
Leon Anavi
aaf976a665 linux-firmware-rpidistro: Update and stabilize
Update to 20240709-2~bpo12+1+rpt3 and add brcmfmac module
parameters for stability.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-09-01 08:19:47 +03:00
Joshua Watt
8d786f646e linux-firmware-rpidistro: Fix WiFi on Raspberry Pi 5
Switches the Raspberry Pi 5 to use the standard cyfman43455-sdio
firmware by default. The minimal firmware on this device is unable to
connect to a WiFi access point.

This also matches the behavior of Raspberry Pi OS, which defaults to the
standard firmware

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-09-01 08:19:47 +03:00
Omri Sarig
2597651049 linux-firmware-rpidistro: Fix wireless error message on RPi
Fixes: #1396

Signed-off-by: Omri Sarig <omri.sarig@prevas.dk>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-09-01 08:19:47 +03:00
Martin Jansa
3afc9728b1 mesa, wayland-protocols: use separate recipe instead of bbappend
Fix
https://github.com/agherzan/meta-raspberrypi/pull/1484

Avoid llvm runtime dependency to avoid issues in builds with meta-clang:

ERROR: Multiple .bb files are due to be built which each provide llvm:
  meta-clang/recipes-devtools/clang/clang_git.bb
  oe-core/meta/recipes-devtools/llvm/llvm_18.1.6.bb
A list of tasks depending on these providers is shown and may help explain where the dependency comes from.
meta-clang/recipes-devtools/clang/clang_git.bb has unique dependees:
  oe-core/meta/recipes-graphics/mesa/mesa_24.0.7.bb:do_prepare_recipe_sysroot
  oe-core/meta/recipes-graphics/mesa/mesa_24.0.7.bb:do_package
  meta-atlas/meta-atlas/recipes-core/images/atlas-image-video.bb:do_populate_lic_deploy
  oe-core/meta/recipes-graphics/mesa/mesa_24.0.7.bb:do_collect_spdx_deps
  meta-atlas/meta-atlas/recipes-core/images/atlas-image-video.bb:do_populate_interfaces_deploy
oe-core/meta/recipes-devtools/llvm/llvm_18.1.6.bb has unique dependees:
  oe-core/meta/recipes-graphics/mesa/mesa_24.0.7.bb:do_package_qa
  oe-core/meta/recipes-graphics/mesa/mesa_24.0.7.bb:do_create_runtime_spdx
It could be that one recipe provides something the other doesn't and should. The following provider and runtime provider differences may be helpful.
meta-clang/recipes-devtools/clang/clang_git.bb has unique provides:
  clang
meta-clang/recipes-devtools/clang/clang_git.bb has unique rprovides:
  clang-dbg
  clang-libclang-cpp
  liblldb
  llvm-linker-tools
  ^clang-locale-.*
  clang-libllvm
  lldb
  clang-format
  clang
  clang-dev
  clang-locale
  clang-lldb-python
  libclang
  clang-src
  clang-doc
  clang-staticdev
  lldb-server
  clang-tidy
  clang-tools
oe-core/meta/recipes-devtools/llvm/llvm_18.1.6.bb has unique provides:

oe-core/meta/recipes-devtools/llvm/llvm_18.1.6.bb has unique rprovides:
  llvm
  llvm-dbg
  llvm-libllvm
  llvm-src
  llvm-dev
  llvm-liboptremarks
  llvm-locale
  llvm-llvmhello
  llvm-liblto
  llvm-staticdev
  llvm-bugpointpasses
  llvm-doc
  ^llvm-locale-.*

check_data_file_clashes: Package clang-libllvm wants to install file rootfs/usr/lib/libLLVM.so.18.1
But that file is already provided by package  * llvm

Also avoid:
  python __anonymous() {
      if d.getVar('SOC_FAMILY') == 'rpi' and d.getVar("PN") == d.getVar("BPN"):
          d.setVarFlag("SRC_URI", "sha256sum", "4d2b2a9e3e099d017dc8107bf1c334d27bb87d9e4aff19a0c8d856d17cd41ef0")
  }
This doesn't work for multilib builds where PN != BPN (e.g. lib32-wayland-protocols)

It is easier to just add separate recipes with COMPATIBLE_MACHINE
restriction instead of modifying the recipes for all MACHINEs with
bbappend and then trying to limit it to rpi MACHINEs with overrides
(e.g. why is whole recipe duplicated in wayland-protocols bbappend
doesn't make any sense to me).

breakage like this in stable branches is bad, these bbappends are hard
to avoid (without BBMASKing them and then reintroducing the necessary
part of original mesa bbappend). Now with separate recipes people can
at least opt-out by setting P_V to original scarthgap versions:

PREFERRED_VERSION_mesa:rpi = "24.%"
PREFERRED_VERSION_wayland-protocols:rpi = "1.33"

Signed-off-by: Martin Jansa <martin2.jansa@lgepartner.com>
2025-08-10 09:52:38 -07:00
Garrett Brown
de443f6986 linux: Enable CONFIG_I2C_BRCMSTB for proper HDMI I2C support
This patch enables the CONFIG_I2C_BRCMSTB option in vc4graphics.cfg to
ensure proper support for the `brcm,bcm2711-hdmi-i2c` device node. Without
this configuration, the I2C bus associated with HDMI on Broadcom
BCM2711-based systems may fail to probe, causing issues with HDMI
communication and display initialization.

Additionally, this resolves potential deferred probe issues observed in
the kernel logs, ensuring the correct initialization of the HDMI I2C bus.

Signed-off-by: Garrett Brown <garrett.brown@aclima.io>
2025-08-08 10:56:28 -07:00
Martin Jansa
5f942bc479 Revert "rpi-default-versions: Switch default kernel to 6.12"
This reverts commit 8c916b683d.

Change like this doesn't belong to stable branch, people who
want to use 6.12 can easily switch the P_V in their config.

As reported in:
https://github.com/agherzan/meta-raspberrypi/pull/1483

lttng-modules version in scarthgap fails to build with 6.12:

lttng-modules/2.13.12/lttng-modules-2.13.12/src/../include/wrapper/uprobes.h:28:16: error: too few arguments to function 'uprobe_register'
lttng-modules-2.13.12/src/../include/wrapper/uprobes.h:34:9: error: implicit declaration of function 'uprobe_unregister'; did you mean 'uprobe_register'? [-Werror=implicit-function-declaration]
   34 |         uprobe_unregister(inode, offset, uc);
      |         ^~~~~~~~~~~~~~~~~

Signed-off-by: Martin Jansa <martin2.jansa@lgepartner.com>
2025-08-08 10:56:07 -07:00
Leon Anavi
fceeefa9f0 mesa: wayland-protocols: Fix signatures
Make the upgrade bbappends conditional for Raspberry Pi to fix
issues with signatures. This way the layer passes successfully
test_signatures from:

yocto-check-layer --with-software-layer-signature-check

This work was sponsored by GOVCERT.LU.

Suggested-by: Denys Dmytriyenko <denys@konsulko.com>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-08-05 18:34:07 -07:00
Leon Anavi
884b8b424f mesa_%.bbappend: DISTRO_FEATURES for wayland
Conditionally add wayland-protocols to DEPENDS and RDEPENDS if
variable DISTRO_FEATURES includes wayland.

This work was sponsored by GOVCERT.LU.

Suggested-by: Daniel F. Dickinson <daniel@d-f-d.ca>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-08-05 18:34:07 -07:00
Leon Anavi
c62176e5ff mesa: Upgrade 25.1.3 -> 25.1.6
Upgrade to release 25.1.6:

- v3dv: regression in vkAllocateMemory importing gbm bo
- Vulkan WSI (and zink) use threads on X11 even when the X
  connection isn't thread-safe
- sddm-greeter-qt segfault when using nvk+zink
- [regression][bisected] [FirePro W4100]: crashing/rebooting
- Descriptor set layout with binding flags fails due to indices
  not matching bindings
- piglit bindless texture tests crash
- [radeonsi] Artifacts in Team Fortress 2 (bisected)
- eglgears_wayland segfault on zink+nvk with PRIME
- vn_renderer_virtgpu.c:13:10: fatal error: 'xf86drm.h' file not
  found
- brw: mad instruction printing broken on Gfx11
- radv: RGB9E5 rendering does not ignore alpha write mask

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-08-05 18:34:07 -07:00
Leon Anavi
41a6240492 mesa: Upgrade 24.3.1 -> 25.1.3
Upgrade to release 25.1.3:

- A bug fix release which fixes bugs found since the 25.1.2 release
- Implements the OpenGL 4.6 API, but the version reported by
  glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
  glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver
  being used. Some drivers don't support all the features required
  in OpenGL 4.6. OpenGL 4.6 is only available if requested at
  context creation. Compatibility contexts may report a lower
  version depending on each driver.
- Implements the Vulkan 1.4 API, but the version reported by the
  apiVersion property of the VkPhysicalDeviceProperties struct
  depends on the particular driver being used.

For Raspberry Pi this upgrade brings the following fixes:

- v3dv: vkcube-wayland crashes on raspberry pi 5 kernel 6.12

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-08-05 18:34:07 -07:00
Leon Anavi
849919de47 wayland-protocols: Upgrade 1.38 -> 1.45
Upgrade wayland-protocols to version 1.45 following the upstream:
https://git.openembedded.org/openembedded-core/commit/meta/recipes-graphics/wayland/wayland-protocols_1.45.bb?id=6d158db297a1b790fdf7f201eb3a1e47bb9bc272

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-08-05 18:34:07 -07:00
Bassem Nomany
cdf5a8ae49 mesa: update to 24.3.1
Upgrade to latest official mesa release.

Fixes DRM DSI linking to missing and non exisiting library
drm-rp1-dsi_dri.so on mesa 24.0.7 from poky scarthgap
and styhead.

    https://github.com/agherzan/meta-raspberrypi/issues/1389

Signed-off-by: Bassem Nomany <bassem.nomany@id8-engineering.io>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-08-05 18:34:07 -07:00
Adam Schafer
1f2045321a add raspi-utils recipe to scarthgap branch
Signed-off-by: Adam Schafer <adam.schafer@iridium.com>
2025-07-25 10:32:15 -07:00
Martin Jansa
8e9ec2685a docker-build: use --no-cache
* --no-cache is needed to actually call apt update instead of using it
  from docker cache and then failing to fetch pruned packages as shown:
  https://github.com/agherzan/meta-raspberrypi/actions/runs/16327036376/job/46119768952?pr=1491

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
2025-07-21 10:30:09 -07:00
Gijs Peskens
48452445d7 raspberrypi5.conf: Add CM5 dtb's
Add new dtb's required for raspberry compute module 5

Signed-off-by: Gijs Peskens <gijs.peskens@munisense.com>
2025-07-03 23:08:04 -07:00
Markus Volk
9e89558cb8 rpi-bootfiles: update to latest release
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-07-01 19:07:00 -07:00
Markus Volk
8c916b683d rpi-default-versions: Switch default kernel to 6.12
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-07-01 19:07:00 -07:00
Markus Volk
4597c80b12 linux-raspberrypi: update 6.12.2 -> 6.12.25
6.12 is now the default in RPiOS and firmware switched to 6.12 initially in raspberrypi/firmware@fe200a5
now it's on 6.12.25

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-07-01 19:07:00 -07:00
Markus Volk
bae1bac2e7 linux-raspberrypi: add recipe for 6.12
This release is tagged outside of branch.
Use 'nobranch=1' to still be able to fetch the code.
https://github.com/raspberrypi/linux/releases/tag/rpi-6.12.y_20241206_2

The kernel was tested to run on raspberrypi4-64

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-07-01 19:07:00 -07:00
Damiano Ferrari
1091bde25e rpi-bootfiles: Update to latest release
Signed-off-by: Damiano Ferrari <damiano.ferrari@ferrarigrowtech.com>
2025-06-30 00:19:13 -07:00
Damiano Ferrari
acc1e1e9f2 rpi-eeprom: Update to latest release
Signed-off-by: Damiano Ferrari <damiano.ferrari@ferrarigrowtech.com>
2025-06-30 00:19:13 -07:00
Leon Anavi
bce7b3acd2 u-boot_%.bbappend: Increase CONFIG_SYS_BOOTM_LEN
Increase CONFIG_SYS_BOOTM_LEN for machine raspberrypi4 (32-bit)
because the kernel size has increased. This fixes the following
issue when booting an image with U-Boot:

   Image Name:   Linux-6.6.63-v7l
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    8559752 Bytes = 8.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Booting using the fdt blob at 0x2eff2000
Working FDT set to 2eff2000
   Loading Kernel Image to 8000
Image too large: increase CONFIG_SYS_BOOTM_LEN
Must RESET board to recover

Fixes: https://github.com/agherzan/meta-raspberrypi/issues/1306

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-06-06 07:57:21 -07:00
Leon Anavi
c06ccd1897 rpi-base.inc: vc4-kms-dsi-ili9881-7inch.dtbo
Add vc4-kms-dsi-ili9881-7inch.dtbo for the Raspberry Pi Touch
Display 2 to RPI_KERNEL_DEVICETREE_OVERLAYS.

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-06-06 07:56:48 -07:00
Florin Sarbu
37975104a6 linux-raspberrypi.inc: Change defconfig for RPi3 64 bits
Switch to bcm2711_defconfig for RPi3 64 bits as per
https://github.com/raspberrypi/linux/pull/6688

Signed-off-by: Florin Sarbu <florin@balena.io>
2025-06-05 22:08:49 -07:00
Leon Anavi
a56d87d4e6 yocto-builder/Dockerfile: Ubuntu 22.04
Upgrade to Ubuntu 22.04 because it is compatible with the Yocto
Project release Walnascar and provides a newer Python version:
- Add --ulimit "nofile=1024:1048576" to yocto-builds.yml.
- Increase vm.max_map_count.
- Add --security-opt apparmor=unconfined to docker cmdline.
- Run docker without the default seccomp profile

This commit is backport from branch master to Scarthgap because
Ubuntu 20.04 reached its end of life (EOL) on May 31, 2025. Yocto
release Scarthgap also supports Ubuntu 22.04.

This work was sponsored by GOVCERT.LU.

Suggested-by: Martin Steegmanns <martin.steegmanns@govcert.etat.lu>
Suggested-by: Stu Westerman @stu-spp
Suggested-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-06-05 08:17:30 -07:00
Thomas Roos
1467f18a49 Moving bcm2712d0.dtbo into rpi-base.inc
Having RPI_KERNEL_DEVICETREE_OVERLAYS:append = " overlays/bcm2712d0.dtbo"
in raspberrypi5.conf is not applying when building an 64bit compatible image
with raspberrypi-armv8. Thus moving into the rpi-base.inc

This fix the boot of this image on Raspberry Pi 5 hw rev 1.1

Signed-off-by: Thomas Roos <throos@amazon.de>
2025-06-03 18:13:50 -07:00
Jaeyoon Jung
3b27c95c16 linux-raspberrypi: Drop deprecated configs from android-driver.cfg
CONFIG_ASHMEM has been deprecated since 5.18 by:
    commit 721412ed3d819e767cac2b06646bf03aa158aaec
    Author: Christoph Hellwig <hch@lst.de>
    Date:   Tue Mar 15 13:34:57 2022 +0100

        staging: remove ashmem

        The mainline replacement for ashmem is memfd, so remove the legacy
        code from drivers/staging/

so has CONFIG_ANDROID since 6.1 by:
    commit 1045a06724f322ed61f1ffb994427c7bdbe64647
    Author: Christoph Hellwig <hch@lst.de>
    Date:   Wed Jun 29 17:01:02 2022 +0200

        remove CONFIG_ANDROID

        The ANDROID config symbol is only used to guard the binder config
        symbol and to inject completely random config changes.  Remove it
        as it is obviously a bad idea.

As now master has 6.1 or later, both should be dropped.

Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
2025-04-10 17:16:41 -07:00
Ayoub Zaki
c153c694bd raspberrypi5: add bcm2712d0 overlay required for booting up correctly
Signed-off-by: Ayoub Zaki <ayoub.zaki@embetrix.com>
2025-03-21 21:40:49 -07:00
Pierrick Curt
e9cc26c9c7 rpi-base: build uart dts overlays by default
We need the uart dts overlays to enable a specific uart peripheral.
For example if you use the disable-bt overlay, you have to enable
the uart0 dts overlay to be able to use uart0 peripheral.

Signed-off-by: Pierrick Curt <pierrickcurt@gmail.com>
2025-03-21 23:56:29 +00:00
Andrei Gherzan
fa2bcfcf0e docs: Fix ReadTheDocs sphinx.configuration requirement
Deprecation of projects using Sphinx or MkDocs without an explicit
configuration file:

https://about.readthedocs.com/blog/2024/12/deprecate-config-files-without-sphinx-or-mkdocs-config/

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2025-03-21 09:22:09 +00:00
Khem Raj
e124d8284c rpi-base: Remove bcm2712-rpi-5-b.dtb from RPI_KERNEL_DEVICETREE target
All bcm2712 are built for arm64 builds alone and rpi-base.inc is included
by 32-bit machine configs as well. Recently, kernel moved thesr dts files
into arch/arm64/boot/dts/broadcom/ folder [1]

[1] 10c77e119e

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-03-12 21:46:29 +00:00
Khem Raj
3209d98660 linux-raspberrypi-6.6: Upgrade to 6.6.63
supersedes https://github.com/agherzan/meta-raspberrypi/pull/1374

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-03-12 21:46:29 +00:00
Matthias Klein
6df7e028a2 linux-firmware-rpidistro: Upgrade to bookworm/20230625-2+rpt3
The upgrade was necessary to get WLAN running on a CM4 (under scarthgap).
Otherwise I continuously got the following kernel messages when trying to connect:
[   31.907395] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail, reason -52
[   32.023434] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail, reason -52
[   32.135403] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail, reason -52
[   32.247392] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail, reason -52
[   33.919395] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail, reason -52
[   33.926940] brcmfmac: brcmf_set_channel: set chanspec 0xd095 fail, reason -52
[   33.935151] brcmfmac: brcmf_set_channel: set chanspec 0xd099 fail, reason -52
[   33.942691] brcmfmac: brcmf_set_channel: set chanspec 0xd09d fail, reason -52
[   33.950338] brcmfmac: brcmf_set_channel: set chanspec 0xd0a1 fail, reason -52
[   33.957903] brcmfmac: brcmf_set_channel: set chanspec 0xd0a5 fail, reason -52

Firmware version before:  BCM4345/6 wl0: Apr 15 2021 03:03:20 version 7.45.234 (4ca95bb CY) FWID 01-996384e2
Firmware version current: BCM4345/6 wl0: Aug 29 2023 01:47:08 version 7.45.265 (28bca26 CY) FWID 01-b677b91b

Signed-off-by: Matthias Klein <matthias@extraklein.de>
2024-09-24 00:27:27 +01:00
Matthias Klein
1918a27419 linux-firmware-rpidistro: Fix wireless on model Zero 2 W
Firmware links for model Zero 2 W were missing.

This patch sets the necessary links for brcmfmac firmware. Without the
links, the firmware cannot be loaded without causing boot messages like:
brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430b0-sdio.raspberrypi,model-zero-2-w.bin failed with error -2

Fixes agherzan/meta-raspberrypi#1324

Signed-off-by: Matthias Klein <matthias@extraklein.de>
2024-06-07 05:19:13 +01:00
32 changed files with 948 additions and 78 deletions

View File

@@ -32,7 +32,7 @@ runs:
n=1
until [ "$n" -gt "$tries" ]; do
echo "Building the docker image ${{ inputs.docker_image }}-${{ inputs.id }}... try $n..."
if docker build . -f "${{ inputs.docker_image }}/Dockerfile" -t "${{ inputs.docker_image }}-${{ inputs.id }}"; then
if docker build --no-cache . -f "${{ inputs.docker_image }}/Dockerfile" -t "${{ inputs.docker_image }}-${{ inputs.id }}"; then
# This can fail if a dangling images cleaning job runs in
# parallel. So we try this a couple of times to minimize
# conflict. This is because while building, docker creates a

View File

@@ -23,7 +23,9 @@ jobs:
id: ${{ github.event.number }}
- name: Do DCO check
run: |
docker run --rm -v "$GITHUB_WORKSPACE:/work:ro" \
docker run --rm --security-opt apparmor=unconfined \
--security-opt seccomp=unconfined \
-v "$GITHUB_WORKSPACE:/work:ro" \
--env "BASE_REF=$GITHUB_BASE_REF" \
"dco-check-${{ github.event.number }}"
- name: Cleanup temporary docker image

View File

@@ -17,5 +17,5 @@ passing the appropriate `-f` argument.
Here is an example for building the `dco-check` image:
```
docker build . -f dco-check/Dockerfile -t dco-check
docker build --no-cache . -f dco-check/Dockerfile -t dco-check
```

View File

@@ -2,20 +2,21 @@
#
# SPDX-License-Identifier: MIT
FROM ubuntu:20.04
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND="noninteractive"
RUN apt-get update -qq
RUN apt-get update -q -y
RUN apt-get install -y eatmydata
# Yocto/OE build host dependencies
# Keep this in sync with
# https://git.yoctoproject.org/poky/tree/documentation/poky.yaml
# https://git.yoctoproject.org/poky/tree/documentation/poky.yaml.in
# https://git.yoctoproject.org/poky/tree/documentation/tools/host_packages_scripts/ubuntu_essential.sh
RUN eatmydata apt-get install -qq -y \
gawk wget git diffstat unzip texinfo gcc build-essential chrpath \
socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
pylint3 xterm python3-subunit mesa-common-dev zstd liblz4-tool
build-essential chrpath cpio debianutils diffstat file gawk gcc \
git iputils-ping libacl1 liblz4-tool locales python3 python3-git \
python3-jinja2 python3-pexpect python3-pip python3-subunit socat \
texinfo unzip wget xz-utils zstd
# en_US.UTF-8 is required by the build system
RUN eatmydata apt-get install -qq -y locales \
@@ -29,6 +30,9 @@ RUN eatmydata apt-get clean && rm -rf /var/lib/apt/lists/*
RUN echo "dash dash/sh boolean false" | debconf-set-selections \
&& dpkg-reconfigure dash
# Fix the resource exhaustion problem on the build infrastructure
RUN echo 'vm.max_map_count = 4048576' >> /etc/sysctl.conf
# Run under normal user called 'ci'
RUN useradd --create-home --uid 1000 --shell /usr/bin/bash ci
USER ci

View File

@@ -66,7 +66,8 @@ jobs:
if: steps.changed-files-specific.outputs.any_changed == 'true'
- name: Build the image
run: |
docker run --rm \
docker run --rm --security-opt apparmor=unconfined \
--security-opt seccomp=unconfined \
-v "$GITHUB_WORKSPACE:/work:ro" \
-v "$DL_DIR:$DL_DIR:rw" \
-v "$SSTATE_DIR:$SSTATE_DIR:rw" \
@@ -76,6 +77,7 @@ jobs:
--env "IMAGE=${{ matrix.image }}" \
--env "DL_DIR=$DL_DIR" \
--env "SSTATE_DIR=$SSTATE_DIR" \
--ulimit "nofile=1024:1048576" \
"yocto-builder-${{ github.event.number }}" \
/entrypoint-build.sh
if: steps.changed-files-specific.outputs.any_changed == 'true'

View File

@@ -42,7 +42,8 @@ jobs:
if: steps.changed-files-specific.outputs.any_changed == 'true'
- name: Run yocto-check-layer
run: |
docker run --rm -v "$GITHUB_WORKSPACE:/work:ro" \
docker run --rm --security-opt apparmor=unconfined \
-v "$GITHUB_WORKSPACE:/work:ro" \
--env "BASE_REF=$GITHUB_BASE_REF" \
"yocto-builder-${{ github.event.number }}" \
/entrypoint-yocto-check-layer.sh

View File

@@ -1,5 +1,7 @@
version: 2
sphinx:
configuration: docs/conf.py
build:
os: ubuntu-22.04
tools:

View File

@@ -58,15 +58,31 @@ RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \
overlays/pps-gpio.dtbo \
overlays/rpi-ft5406.dtbo \
overlays/rpi-poe.dtbo \
overlays/uart0.dtbo \
overlays/uart0-pi5.dtbo \
overlays/uart1.dtbo \
overlays/uart1-pi5.dtbo \
overlays/uart2.dtbo \
overlays/uart2-pi5.dtbo \
overlays/uart3.dtbo \
overlays/uart3-pi5.dtbo \
overlays/uart4.dtbo \
overlays/uart4-pi5.dtbo \
overlays/uart5.dtbo \
overlays/vc4-fkms-v3d.dtbo \
overlays/vc4-fkms-v3d-pi4.dtbo \
overlays/vc4-kms-v3d.dtbo \
overlays/vc4-kms-v3d-pi4.dtbo \
overlays/vc4-kms-v3d-pi5.dtbo \
overlays/vc4-kms-dsi-7inch.dtbo \
overlays/vc4-kms-dsi-ili9881-7inch.dtbo \
overlays/vc4-kms-dsi-ili9881-5inch.dtbo \
overlays/rpi-backlight.dtbo \
overlays/w1-gpio.dtbo \
overlays/w1-gpio-pullup.dtbo \
overlays/w1-gpio-pi5.dtbo \
overlays/wm8960-soundcard.dtbo \
overlays/bcm2712d0.dtbo \
"
RPI_KERNEL_DEVICETREE ?= " \
@@ -86,7 +102,6 @@ RPI_KERNEL_DEVICETREE ?= " \
broadcom/bcm2710-rpi-cm3.dtb \
broadcom/bcm2711-rpi-cm4.dtb \
broadcom/bcm2711-rpi-cm4s.dtb \
broadcom/bcm2712-rpi-5-b.dtb \
"
KERNEL_DEVICETREE ??= " \

View File

@@ -33,6 +33,10 @@ RPI_KERNEL_DEVICETREE = " \
broadcom/bcm2711-rpi-cm4.dtb \
broadcom/bcm2711-rpi-cm4s.dtb \
broadcom/bcm2712-rpi-5-b.dtb \
broadcom/bcm2712-rpi-cm5-cm5io.dtb \
broadcom/bcm2712-rpi-cm5-cm4io.dtb \
broadcom/bcm2712-rpi-cm5l-cm5io.dtb \
broadcom/bcm2712-rpi-cm5l-cm4io.dtb \
"
SDIMG_KERNELIMAGE ?= "kernel8.img"

View File

@@ -15,6 +15,10 @@ MACHINE_EXTRA_RRECOMMENDS += "\
RPI_KERNEL_DEVICETREE = " \
broadcom/bcm2712-rpi-5-b.dtb \
broadcom/bcm2712-rpi-cm5-cm5io.dtb \
broadcom/bcm2712-rpi-cm5-cm4io.dtb \
broadcom/bcm2712-rpi-cm5l-cm5io.dtb \
broadcom/bcm2712-rpi-cm5l-cm4io.dtb \
"
SDIMG_KERNELIMAGE ?= "kernel_2712.img"

View File

@@ -5,14 +5,14 @@ LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=c403841ff2837657b2ed8e5bb474ac8d
inherit deploy nopackages
RPIFW_DATE ?= "20240319"
SRCREV = "9f24f4bc2bdd07ffd158cfbb4bce88a2efc4c1f5"
RPIFW_DATE ?= "20250430"
SRCREV = "bc7f439c234e19371115e07b57c366df59cc1bc7"
SHORTREV = "${@d.getVar("SRCREV", False).__str__()[:7]}"
RPIFW_SRC_URI ?= "https://api.github.com/repos/raspberrypi/firmware/tarball/9f24f4bc2bdd07ffd158cfbb4bce88a2efc4c1f5;downloadfilename=raspberrypi-firmware-${SHORTREV}.tar.gz"
RPIFW_SRC_URI ?= "https://api.github.com/repos/raspberrypi/firmware/tarball/${SRCREV};downloadfilename=raspberrypi-firmware-${SHORTREV}.tar.gz"
RPIFW_S ?= "${WORKDIR}/raspberrypi-firmware-${SHORTREV}"
SRC_URI = "${RPIFW_SRC_URI}"
SRC_URI[sha256sum] = "4b436f8946b139c6a1202375ef55d4848e3bcd8c1a9cb47000e06d7ecec828f7"
SRC_URI[sha256sum] = "2c027debbef53c86c9ff9197d056d501b95f6ad214ad4db00a8a59b947574eb1"
PV = "${RPIFW_DATE}"

View File

@@ -1,15 +1,15 @@
SUMMARY = "Installation scripts and binaries for the Raspberry Pi 4 EEPROM"
DESCRIPTION = "This repository contains the rpi4 bootloader and scripts \
DESCRIPTION = "This repository contains the rpi4/rpi5 bootloader and scripts \
for updating it in the spi eeprom"
LICENSE = "BSD-3-Clause & Broadcom-RPi"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f546ed4f47e9d4c1fe954ecc9d3ef4f3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a6c5149578a16272119f3f9c13d6549b"
SRC_URI = " \
git://github.com/raspberrypi/rpi-eeprom.git;protocol=https;branch=master \
"
SRCREV = "36e58db5c2a2656e553441f4f48f32227809105d"
PV = "v.2024.02.16-2712"
SRCREV = "1bd0a1052b2e74d7af04de18d30b5edb12d8a423"
PV = "v2025.03.10-2712"
S = "${WORKDIR}/git"

View File

@@ -0,0 +1 @@
CONFIG_SYS_BOOTM_LEN=0x1000000

View File

@@ -5,6 +5,7 @@ SRC_URI:append:rpi = " \
"
SRC_URI:append:rpi = " file://0001-rpi-always-set-fdt_addr-with-firmware-provided-FDT-address.patch"
SRC_URI:append:raspberrypi4 = " file://maxsize.cfg"
DEPENDS:append:rpi = " u-boot-default-script"

View File

@@ -0,0 +1,53 @@
SUMMARY = "A collection of scripts and simple applications"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENCE;md5=4c01239e5c3a3d133858dedacdbca63c"
RCONFLICTS:${PN} = "userland"
DEPENDS:append = " dtc"
PACKAGES =+ " ${PN}-raspinfo"
PACKAGES =+ " ${PN}-ovmerge"
RDEPENDS:${PN}-raspinfo += " bash"
RDEPENDS:${PN}-ovmerge += " perl"
PV = "1.0+git"
SRC_URI = "git://github.com/raspberrypi/utils;protocol=https;branch=master"
SRCREV = "b9c63214c535d7df2b0fa6743b7b3e508363c25a"
FILES:${PN}:append = " \
${datadir}/bash-completion/completions/pinctrl \
${datadir}/bash-completion/completions/vcgencmd \
"
FILES:${PN}-raspinfo += "${bindir}/raspinfo"
FILES:${PN}-ovmerge += "${bindir}/ovmerge"
S = "${WORKDIR}/git"
OECMAKE_TARGET_COMPILE = "\
dtmerge/all \
eeptools/all \
otpset/all \
overlaycheck/all \
ovmerge/all \
pinctrl/all \
raspinfo/all \
vcgencmd/all \
vclog/all \
vcmailbox/all \
"
OECMAKE_TARGET_INSTALL = "\
dtmerge/install \
eeptools/install \
otpset/install \
overlaycheck/install \
ovmerge/install \
pinctrl/install \
raspinfo/install \
vcgencmd/install \
vclog/install \
vcmailbox/install \
"
inherit cmake

View File

@@ -0,0 +1,29 @@
From: Markus Volk <f_l_k@t-online.de>
Date: Sun, 19 Mai 2025 15:34:46 +0100
Subject: [PATCH] dont build clover frontend
The clover frontend is deprecated and is always built with opencl, even if
using rusticl. Additionally it adds a reproducibility issue.
Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: Markus Volk <f_l_k@t-online.de>
--- a/src/gallium/meson.build 2025-05-07 18:35:10.000000000 +0200
+++ b/src/gallium/meson.build 2025-05-18 17:05:23.677694272 +0200
@@ -195,15 +195,11 @@
else
driver_d3d12 = declare_dependency()
endif
-if with_gallium_clover or with_tests
+if with_tests
# At the moment, clover and gallium/tests are the only two consumers
# for pipe-loader
subdir('targets/pipe-loader')
endif
-if with_gallium_clover
- subdir('frontends/clover')
- subdir('targets/opencl')
-endif
if with_gallium_rusticl
subdir('frontends/rusticl')
subdir('targets/rusticl')

View File

@@ -0,0 +1,39 @@
From 531c6696d42953cd642dea7bf70153285c7949ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kai=20Wasserb=C3=A4ch?= <kai@dev.carbon-project.org>
Date: Tue, 6 May 2025 14:36:57 +0200
Subject: [PATCH] fix(FTBFS): clc: switch to new non-owned `TargetOptions` for
LLVM 21
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream hid the `TargetOptions` in commit 985410f87f2d19910a8d327527fd30062b042b63
Use the new `getTargetOpts()` to obtain the `TargetOptions` for
`setTarget()`.
Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34835]
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13079
Reference: https://github.com/llvm/llvm-project/commit/985410f87f2d19910a8d327527fd30062b042b63
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34835>
---
src/compiler/clc/clc_helpers.cpp | 4 ++++
1 file changed, 4 insertions(+)
--- a/src/compiler/clc/clc_helpers.cpp
+++ b/src/compiler/clc/clc_helpers.cpp
@@ -874,7 +874,11 @@ clc_compile_to_llvm_module(LLVMContext &
diag_opts));
c->setTarget(clang::TargetInfo::CreateTargetInfo(
+#if LLVM_VERSION_MAJOR >= 21
+ c->getDiagnostics(), c->getInvocation().getTargetOpts()));
+#else
c->getDiagnostics(), c->getInvocation().TargetOpts));
+#endif
c->getFrontendOpts().ProgramAction = clang::frontend::EmitLLVMOnly;

View File

@@ -0,0 +1,110 @@
From 027ac36756cc75eea9ed4fee135a351af30b35fd Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Tue, 16 Jul 2024 12:32:47 +0300
Subject: [PATCH] freedreno: don't encode build path into binaries
Encoding build-specific path into installed binaries is generally
frowned upon. It harms the reproducibility of the build and e.g.
OpenEmbedded now considers that to be an error.
Instead of hardcoding rnn_src_path into the RNN_DEF_PATH define specify
it manually when running the tests.
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30206]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
src/freedreno/afuc/meson.build | 4 ++++
src/freedreno/decode/meson.build | 4 +++-
src/freedreno/meson.build | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/freedreno/afuc/meson.build b/src/freedreno/afuc/meson.build
index bb7cebf5a748..351cc31ef2de 100644
--- a/src/freedreno/afuc/meson.build
+++ b/src/freedreno/afuc/meson.build
@@ -56,10 +56,12 @@ if with_tests
asm_fw = custom_target('afuc_test.fw',
output: 'afuc_test.fw',
command: [asm, files('../.gitlab-ci/traces/afuc_test.asm'), '@OUTPUT@'],
+ env: {'RNN_PATH': rnn_src_path},
)
asm_fw_a7xx = custom_target('afuc_test_a7xx.fw',
output: 'afuc_test_a7xx.fw',
command: [asm, files('../.gitlab-ci/traces/afuc_test_a7xx.asm'), '@OUTPUT@'],
+ env: {'RNN_PATH': rnn_src_path},
)
test('afuc-asm',
diff,
@@ -120,11 +122,13 @@ if cc.sizeof('size_t') > 4
disasm_fw = custom_target('afuc_test.asm',
output: 'afuc_test.asm',
command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test.fw')],
+ env: {'RNN_PATH': rnn_src_path},
capture: true
)
disasm_fw_a7xx = custom_target('afuc_test_a7xx.asm',
output: 'afuc_test_a7xx.asm',
command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test_a7xx.fw')],
+ env: {'RNN_PATH': rnn_src_path},
capture: true
)
test('afuc-disasm',
diff --git a/src/freedreno/decode/meson.build b/src/freedreno/decode/meson.build
index 469eeb4eb597..dfa1c12d0d9f 100644
--- a/src/freedreno/decode/meson.build
+++ b/src/freedreno/decode/meson.build
@@ -194,6 +194,7 @@ if dep_lua.found() and dep_libarchive.found()
log = custom_target(name + '.log',
output: name + '.log',
command: [cffdump, '--unit-test', args, files('../.gitlab-ci/traces/' + name + '.rd.gz')],
+ env: {'RNN_PATH': rnn_src_path},
capture: true,
)
test('cffdump-' + name,
@@ -247,7 +248,8 @@ if with_tests
output: name + '.log',
command: [crashdec, args, files('../.gitlab-ci/traces/' + name + '.devcore')],
capture: true,
- env: {'GALLIUM_DUMP_CPU': 'false'},
+ env: {'GALLIUM_DUMP_CPU': 'false',
+ 'RNN_PATH': rnn_src_path},
)
test('crashdec-' + name,
diff --git a/src/freedreno/meson.build b/src/freedreno/meson.build
index 98e49b8fcf0e..145e72597eb9 100644
--- a/src/freedreno/meson.build
+++ b/src/freedreno/meson.build
@@ -6,7 +6,7 @@ inc_freedreno_rnn = include_directories('rnn')
rnn_src_path = dir_source_root + '/src/freedreno/registers'
rnn_install_path = get_option('datadir') + '/freedreno/registers'
-rnn_path = rnn_src_path + ':' + get_option('prefix') + '/' + rnn_install_path
+rnn_path = get_option('prefix') + '/' + rnn_install_path
dep_libarchive = dependency('libarchive', allow_fallback: true, required: false)
dep_libxml2 = dependency('libxml-2.0', allow_fallback: true, required: false)
diff --git a/src/freedreno/registers/gen_header.py b/src/freedreno/registers/gen_header.py
--- a/src/freedreno/registers/gen_header.py
+++ b/src/freedreno/registers/gen_header.py
@@ -885,13 +885,14 @@ The rules-ng-ng source files this header
""")
maxlen = 0
for filepath in p.xml_files:
- maxlen = max(maxlen, len(filepath))
+ maxlen = max(maxlen, len(os.path.basename(filepath)))
for filepath in p.xml_files:
- pad = " " * (maxlen - len(filepath))
+ filename = os.path.basename(filepath)
+ pad = " " * (maxlen - len(filename))
filesize = str(os.path.getsize(filepath))
filesize = " " * (7 - len(filesize)) + filesize
filetime = time.ctime(os.path.getmtime(filepath))
- print("- " + filepath + pad + " (" + filesize + " bytes, from " + filetime + ")")
+ print("- " + filename + pad + " (" + filesize + " bytes, from " + filetime + ")")
if p.copyright_year:
current_year = str(datetime.date.today().year)
print()
---
2.39.2

View File

@@ -0,0 +1,24 @@
From 02cc21800fe29f566add525e63f619c0536d6e7b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 13 Jan 2020 15:23:47 -0800
Subject: [PATCH] meson misdetects 64bit atomics on mips/clang
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/util/u_atomic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c
index 5a5eab4..e499516 100644
--- a/src/util/u_atomic.c
+++ b/src/util/u_atomic.c
@@ -21,7 +21,7 @@
* IN THE SOFTWARE.
*/
-#if defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
+#if !defined(__clang__) && defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
#include <stdint.h>
#include <pthread.h>

View File

@@ -0,0 +1,383 @@
SUMMARY = "A free implementation of the OpenGL API"
DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - \
a system for rendering interactive 3D graphics. \
A variety of device drivers allows Mesa to be used in many different environments \
ranging from software emulation to complete hardware acceleration for modern GPUs. \
Mesa is used as part of the overall Direct Rendering Infrastructure and X.org \
environment."
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "x11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://docs/license.rst;md5=ffe678546d4337b732cfd12262e6af11"
PE = "2"
SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \
file://0001-dont-build-clover-frontend.patch \
file://0001-fix-FTBFS-clc-switch-to-new-non-owned-TargetOptions-.patch \
"
SRC_URI[sha256sum] = "9f2b69eb39d2d8717d30a9868fdda3e0c0d3708ba32778bbac8ddb044538ce84"
PV = "25.1.6"
UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
#because we cannot rely on the fact that all apps will use pkgconfig,
#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
do_install:append() {
# sed can't find EGL/eglplatform.h as it doesn't get installed when glvnd enabled.
# So, check if EGL/eglplatform.h exists before running sed.
if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; then
sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
fi
# These are ICDs, apps are not supposed to link against them
if ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'true', 'false', d)} ; then
rm -f ${D}${libdir}/libEGL_mesa.so ${D}${libdir}/libGLX_mesa.so
fi
}
DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native"
EXTRANATIVEPATH += "chrpath-native"
GLPROVIDES = " \
${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
"
PROVIDES = " \
${@bb.utils.contains('PACKAGECONFIG', 'glvnd', '', d.getVar('GLPROVIDES'), d)} \
${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
virtual/mesa \
"
inherit meson pkgconfig python3native gettext features_check rust
BBCLASSEXTEND = "native nativesdk"
ANY_OF_DISTRO_FEATURES = "opengl vulkan"
PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}"
# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug'
# by default the upstream mesa sources build a debug release
# here we assume the user will want a release build by default
MESA_BUILD_TYPE ?= "release"
def check_buildtype(d):
_buildtype = d.getVar('MESA_BUILD_TYPE')
if _buildtype not in ['release', 'debug']:
bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype)
if _buildtype == 'debug':
return 'debugoptimized'
return 'plain'
MESON_BUILDTYPE = "${@check_buildtype(d)}"
EXTRA_OEMESON = " \
-Dglx-read-only-text=true \
-Dplatforms='${@",".join("${PLATFORMS}".split())}' \
"
def strip_comma(s):
return s.strip(',')
PACKAGECONFIG = " \
gallium \
video-codecs \
${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland glvnd', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \
"
# skip all Rust dependencies if we are not building OpenCL"
INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
PACKAGECONFIG:append:x86 = " libclc gallium-llvm intel amd nouveau svga"
PACKAGECONFIG:append:x86-64 = " libclc gallium-llvm intel amd nouveau svga"
PACKAGECONFIG:append:i686 = " libclc gallium-llvm intel amd nouveau svga"
PACKAGECONFIG:append:class-native = " libclc gallium-llvm amd nouveau svga"
# "gbm" requires "opengl"
PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled"
X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr xorgproto libxshmfence"
# "x11" requires "opengl"
PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
VULKAN_DRIVERS_AMD = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',amd', '', d)}"
VULKAN_DRIVERS_ASAHI = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc opencl', ',asahi', '', d)}"
VULKAN_DRIVERS_INTEL = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',intel', '', d)}"
VULKAN_DRIVERS_SWRAST = ",swrast"
# Crashes on x32
VULKAN_DRIVERS_SWRAST:x86-x32 = ""
VULKAN_DRIVERS_LLVM = "${VULKAN_DRIVERS_SWRAST}${VULKAN_DRIVERS_AMD}${VULKAN_DRIVERS_ASAHI}${VULKAN_DRIVERS_INTEL}"
VULKAN_DRIVERS = ""
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}"
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${VULKAN_DRIVERS_LLVM}', '', d)}"
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination-experimental', '', d)}"
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
# mesa development and testing tools support, per driver
TOOLS = ""
TOOLS_DEPS = ""
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination', '', d)}"
# dependencies for tools.
TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}"
# the fdperf tool requires libconfig (a part of meta-oe) so it needs special
# treatment in addition to the usual 'freedreno tools'.
PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}"
PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
PACKAGECONFIG[glvnd] = "-Dglvnd=enabled, -Dglvnd=disabled, libglvnd"
# "gles" requires "opengl"
PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled"
# "egl" requires "opengl"
PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
# "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG!
# Be sure to enable them both for the target and for the native build.
PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true, -Dgallium-rusticl=false, bindgen-cli-native"
PACKAGECONFIG[broadcom] = ""
PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native"
PACKAGECONFIG[freedreno] = ""
PACKAGECONFIG[vc4] = ""
PACKAGECONFIG[v3d] = ""
PACKAGECONFIG[zink] = ""
GALLIUMDRIVERS = "softpipe"
# gallium swrast was found to crash Xorg on startup in x32 qemu
GALLIUMDRIVERS:x86-x32 = ""
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '', d)}"
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}"
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}"
GALLIUMDRIVERS_ASAHI = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc opencl', ',asahi', '', d)}"
GALLIUMDRIVERS_AMD = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',r300', '', d)}"
GALLIUMDRIVERS_IRIS = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',iris', '', d)}"
GALLIUMDRIVERS_NOUVEAU = "${@bb.utils.contains('PACKAGECONFIG', 'nouveau', ',nouveau', '', d)}"
GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',radeonsi', '', d)}"
GALLIUMDRIVERS_LLVMPIPE = ",llvmpipe"
# llvmpipe crashes on x32
GALLIUMDRIVERS_LLVMPIPE:x86-x32 = ""
GALLIUMDRIVERS_SVGA = "${@bb.utils.contains('PACKAGECONFIG', 'svga', ',svga', '', d)}"
GALLIUMDRIVERS_LLVM = "${GALLIUMDRIVERS_LLVMPIPE}${GALLIUMDRIVERS_AMD}${GALLIUMDRIVERS_ASAHI}${GALLIUMDRIVERS_IRIS}${GALLIUMDRIVERS_NOUVEAU}${GALLIUMDRIVERS_RADEONSI}${GALLIUMDRIVERS_SVGA}"
PACKAGECONFIG[amd] = ""
PACKAGECONFIG[nouveau] = ""
PACKAGECONFIG[svga] = ""
PACKAGECONFIG[virgl] = ""
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${GALLIUMDRIVERS_LLVM}', '', d)}"
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',r600', '', d)}"
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}"
MESA_CLC = "system"
MESA_CLC:class-native = "enabled"
INSTALL_MESA_CLC = "false"
INSTALL_MESA_CLC:class-native = "true"
MESA_NATIVE = "mesa-native"
MESA_NATIVE:class-native = ""
PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm"
PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils"
PACKAGECONFIG[libclc] = "-Dmesa-clc=${MESA_CLC} -Dinstall-mesa-clc=${INSTALL_MESA_CLC} -Dmesa-clc-bundle-headers=enabled,,libclc spirv-tools spirv-llvm-translator ${MESA_NATIVE}"
PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau"
PACKAGECONFIG[imagination] = "-Dimagination-srv=true,-Dimagination-srv=false"
PACKAGECONFIG[asahi] = ""
PACKAGECONFIG[intel] = ""
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'intel', ',i915,crocus', '', d)}"
PACKAGECONFIG[lima] = ""
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
PACKAGECONFIG[panfrost] = ""
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
PACKAGECONFIG[tegra] = ""
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'tegra', ',tegra,nouveau', '', d)}"
PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false"
PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto"
PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
PACKAGECONFIG[lmsensors] = "-Dlmsensors=enabled,-Dlmsensors=disabled,lmsensors"
VIDEO_CODECS ?= "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'all', 'all_free', d)}"
PACKAGECONFIG[video-codecs] = "-Dvideo-codecs=${VIDEO_CODECS}, -Dvideo-codecs=''"
PACKAGECONFIG[teflon] = "-Dteflon=true, -Dteflon=false"
# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
FULL_OPTIMIZATION:append = " -fno-omit-frame-pointer"
CFLAGS:append:armv5 = " -DMISSING_64BIT_ATOMICS"
CFLAGS:append:armv6 = " -DMISSING_64BIT_ATOMICS"
# Remove the mesa dependency on mesa-dev, as mesa is empty
DEV_PKG_DEPENDENCY = ""
# GLES2 and GLES3 implementations are packaged in a single library in libgles2-mesa.
# Add a dependency so the GLES3 dev package is associated with its implementation.
RPROVIDES:libgles2-mesa += "libgles3-mesa"
RPROVIDES:libgles2-mesa-dev += "libgles3-mesa-dev"
RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools spirv-llvm-translator', '', d)}"
PACKAGES =+ "libegl-mesa libegl-mesa-dev \
libgallium \
libgl-mesa libgl-mesa-dev \
libglx-mesa libglx-mesa-dev \
libglapi libglapi-dev \
libgbm libgbm-dev \
libgles1-mesa libgles1-mesa-dev \
libgles2-mesa libgles2-mesa-dev \
libopencl-mesa \
libteflon \
mesa-megadriver mesa-vulkan-drivers \
mesa-vdpau-drivers mesa-tools \
"
do_install:append () {
# libwayland-egl has been moved to wayland 1.15+
rm -f ${D}${libdir}/libwayland-egl*
rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
}
# For the packages that make up the OpenGL interfaces, inject variables so that
# they don't get Debian-renamed (which would remove the -mesa suffix), and
# RPROVIDEs/RCONFLICTs on the generic libgl name.
python __anonymous() {
pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
mlprefix = d.getVar("MLPREFIX")
suffix = ""
if "-native" in d.getVar("PN"):
suffix = "-native"
for p in ("libegl", "libgl", "libglx", "libgles1", "libgles2", "libgles3", "libopencl"):
fullp = mlprefix + p + "-mesa" + suffix
d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix)
d.setVar("DEBIAN_NOAUTONAME:%slibopencl-mesa%s" % (mlprefix, suffix), "1")
if 'glvnd' in pkgconfig:
for p in ("libegl", "libglx"):
fullp = mlprefix + p + "-mesa" + suffix
d.appendVar("RPROVIDES:" + fullp, ' virtual-%s-icd' % p)
else:
for p in (("egl", "libegl", "libegl1"),
("opengl", "libgl", "libgl1"),
("gles", "libgles1", "libglesv1-cm1"),
("gles", "libgles2", "libglesv2-2", "libgles3")):
if not p[0] in pkgconfig:
continue
fullp = mlprefix + p[1] + "-mesa" + suffix
pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
d.appendVar("RREPLACES:" + fullp, pkgs)
d.appendVar("RPROVIDES:" + fullp, pkgs)
d.appendVar("RCONFLICTS:" + fullp, pkgs)
# For -dev, the first element is both the Debian and original name
fullp = mlprefix + p[1] + "-mesa-dev" + suffix
pkgs = " " + mlprefix + p[1] + "-dev" + suffix
d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
d.appendVar("RREPLACES:" + fullp, pkgs)
d.appendVar("RPROVIDES:" + fullp, pkgs)
d.appendVar("RCONFLICTS:" + fullp, pkgs)
}
python mesa_populate_packages() {
pkgs = ['mesa', 'mesa-dev', 'mesa-dbg']
for pkg in pkgs:
d.setVar("RPROVIDES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
d.setVar("RCONFLICTS:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
d.setVar("RREPLACES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
import re
dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri")
if os.path.isdir(dri_drivers_root):
dri_pkgs = sorted(os.listdir(dri_drivers_root))
lib_name = d.expand("${MLPREFIX}mesa-megadriver")
for p in dri_pkgs:
m = re.match(r'^(.*)_dri\.so$', p)
if m:
pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
d.appendVar("RPROVIDES:%s" % lib_name, pkg_name)
d.appendVar("RCONFLICTS:%s" % lib_name, pkg_name)
d.appendVar("RREPLACES:%s" % lib_name, pkg_name)
}
PACKAGESPLITFUNCS =+ "mesa_populate_packages"
PACKAGES_DYNAMIC += "^mesa-driver-.*"
PACKAGES_DYNAMIC:class-native = "^mesa-driver-.*-native"
FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d"
FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${libdir}/libpowervr_rogue.so ${datadir}/vulkan"
FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*"
FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d"
FILES:libgbm = "${libdir}/libgbm.so.* ${libdir}/gbm/*_gbm.so"
FILES:libgallium = "${libdir}/libgallium-*.so"
FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
FILES:libgl-mesa = "${libdir}/libGL.so.*"
FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
FILES:libopencl-mesa = "${libdir}/lib*OpenCL.so* ${sysconfdir}/OpenCL/vendors/*.icd"
FILES:libglapi = "${libdir}/libglapi.so.*"
FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/GL/internal/dri_interface.h ${includedir}/vulkan ${libdir}/vdpau/*.so"
FILES:libegl-mesa-dev = "${libdir}/libEGL*.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h ${includedir}/gbm_backend_abi.h"
FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL/*.h ${libdir}/pkgconfig/gl.pc"
FILES:libglapi-dev = "${libdir}/libglapi.*"
FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${includedir}/GLES3 ${libdir}/pkgconfig/glesv2.pc"
FILES:libteflon = "${libdir}/libteflon.so"
# catch all to get all the tools and data
FILES:${PN}-tools = "${bindir} ${datadir}"
ALLOW_EMPTY:${PN}-tools = "1"
# All DRI drivers are symlinks to libdril_dri.so
INSANE_SKIP:${PN}-megadriver += "dev-so"
# OpenCL ICDs package also ship correspondig .so files, there is no -dev package
INSANE_SKIP:libopencl-mesa += "dev-so"
# Fix upgrade path from mesa to mesa-megadriver
RREPLACES:mesa-megadriver = "mesa"
RCONFLICTS:mesa-megadriver = "mesa"
RPROVIDES:mesa-megadriver = "mesa"
# Use this newer version only for rpi MACHINEs
COMPATIBLE_MACHINE = "^rpi$"
# This version doesn't have kmsro and dri3 added by
# recipes-graphics/mesa/mesa_%.bbappend
# already removed in master branch with:
# https://github.com/agherzan/meta-raspberrypi/pull/1456
# https://github.com/agherzan/meta-raspberrypi/pull/1472
PACKAGECONFIG:remove:rpi = "kmsro dri3"

View File

@@ -0,0 +1,27 @@
SUMMARY = "Collection of additional Wayland protocols"
DESCRIPTION = "Wayland protocols that add functionality not \
available in the Wayland core protocol. Such protocols either add \
completely new functionality, or extend the functionality of some other \
protocol either in Wayland core, or some other protocol in \
wayland-protocols."
HOMEPAGE = "http://wayland.freedesktop.org"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \
file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53"
SRC_URI = "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/${PV}/downloads/wayland-protocols-${PV}.tar.xz"
SRC_URI[sha256sum] = "4d2b2a9e3e099d017dc8107bf1c334d27bb87d9e4aff19a0c8d856d17cd41ef0"
UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/tags"
UPSTREAM_CHECK_REGEX = "releases/(?P<pver>.+)"
DEPENDS += "wayland-native"
inherit meson pkgconfig allarch
EXTRA_OEMESON += "-Dtests=false"
BBCLASSEXTEND = "native nativesdk"
# Use this newer version only for rpi MACHINEs
COMPATIBLE_MACHINE = "^rpi$"

View File

@@ -0,0 +1,76 @@
From 845682f33511da676bfe9237102b6979efa11f93 Mon Sep 17 00:00:00 2001
From: Gyorgy Sarvari <skandigraun@gmail.com>
Date: Fri, 21 Nov 2025 18:07:00 +0100
Subject: [PATCH] Adapt weston to 64-bit plane IDs
The raspberry pi kernel has changed the plane IDs in their drm
driver[1], which causes weston to crash upon mouse movement.
This patch adapts the relevant variable sizes from 32-bit to
64-bit.
[1]: https://github.com/raspberrypi/linux/commit/8181e682d6f4ef209845ec24f0a1eb37764d6731
Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1902]
---
libweston/backend-drm/drm-internal.h | 4 ++--
libweston/backend-drm/state-propose.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libweston/backend-drm/drm-internal.h b/libweston/backend-drm/drm-internal.h
index 48bc2432..c4391b39 100644
--- a/libweston/backend-drm/drm-internal.h
+++ b/libweston/backend-drm/drm-internal.h
@@ -410,7 +410,7 @@ struct drm_fb {
int width, height;
int fd;
- uint32_t plane_mask;
+ uint64_t plane_mask;
/* Used by gbm fbs */
struct gbm_bo *bo;
diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c
index 2b42e3dc..0793b8fe 100644
--- a/libweston/backend-drm/state-propose.c
+++ b/libweston/backend-drm/state-propose.c
@@ -393,7 +393,7 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
struct drm_fb *fb = NULL;
bool view_matches_entire_output, scanout_has_view_assigned;
- uint32_t possible_plane_mask = 0;
+ uint64_t possible_plane_mask = 0;
pnode->try_view_on_plane_failure_reasons = FAILURE_REASONS_NONE;
@@ -437,7 +437,7 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
return NULL;
}
- possible_plane_mask = (1 << output->cursor_plane->plane_idx);
+ possible_plane_mask = (1UL << output->cursor_plane->plane_idx);
} else {
if (mode == DRM_OUTPUT_PROPOSE_STATE_RENDERER_ONLY) {
drm_debug(b, "\t\t\t\t[view] not assigning view %p "
@@ -450,7 +450,7 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
continue;
if (drm_paint_node_transform_supported(pnode, plane))
- possible_plane_mask |= 1 << plane->plane_idx;
+ possible_plane_mask |= 1UL << plane->plane_idx;
}
if (!possible_plane_mask) {
@@ -483,10 +483,10 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
if (possible_plane_mask == 0)
break;
- if (!(possible_plane_mask & (1 << plane->plane_idx)))
+ if (!(possible_plane_mask & (1UL << plane->plane_idx)))
continue;
- possible_plane_mask &= ~(1 << plane->plane_idx);
+ possible_plane_mask &= ~(1UL << plane->plane_idx);
switch (plane->type) {
case WDRM_PLANE_TYPE_CURSOR:

View File

@@ -1,10 +1,4 @@
PACKAGECONFIG:remove:rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'fbdev', 'egl clients', d)}"
PACKAGECONFIG:remove:rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'egl clients', d)}"
EXTRA_OECONF:append:rpi = " \
--disable-xwayland-test \
--disable-simple-egl-clients \
${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' \
--disable-resize-optimization \
--disable-setuid-install \
', d)} \
"
FILESEXTRAPATHS:prepend := "${THISDIR}/weston:"
SRC_URI:append:rpi = " file://0001-Adapt-weston-to-64-bit-plane-IDs.patch"

View File

@@ -1,28 +0,0 @@
From b9db43e36ad0942d33cb4db5b394abd722862568 Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei.gherzan@huawei.com>
Date: Fri, 9 Sep 2022 20:28:06 +0200
Subject: [PATCH] Default 43455 firmware to standard variant
The firmware for 43455 is loaded as a symlink: brcmfmac43455-sdio.bin.
This symlink is now broken as the debian package handles the right
target of this symlink through a postinstall. We don't have that logic
here so we default to the standard variant.
Upstream-Status: Inappropriate [issue reported at https://github.com/RPi-Distro/firmware-nonfree/issues/26]
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
debian/config/brcm80211/brcm/brcmfmac43455-sdio.bin | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.bin b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.bin
index 9c39208..b914838 120000
--- a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.bin
+++ b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.bin
@@ -1 +1 @@
-../cypress/cyfmac43455-sdio.bin
\ No newline at end of file
+../cypress/cyfmac43455-sdio-standard.bin
\ No newline at end of file
--
2.25.1

View File

@@ -0,0 +1,79 @@
From 20741d848c32e0fb2e4841cf8bbc9ec3d198bb6b Mon Sep 17 00:00:00 2001
From: Omri Sarig <omri.sarig@prevas.dk>
Date: Thu, 9 Jan 2025 19:00:10 +0100
Subject: [PATCH 2/2] Default all RPi 43455 boards to standard variant
As the patch above explains, the symlink that is being used by the
brcmfmac43455-sdio.* files is one that is created by the Debian system,
which we do not have in our implementation. Therefore, when the system
tries to load these files, an error message is generated.
By changing the symlinks to be to the standard variant, the problem is
solved for the build.
The code is also working without this patch - when the driver is unable
to load the board-specific file (such as
brcmfmac43455-sdio.raspberrypi,3-model-a-plus.bin), it reverts to using
the base file (brcmfmac43455-sdio.bin), which is a correct link (as it
is fixed in the patch above). However, the driver is still generating an
error message in this case, which is being solved by linking the
board-specific files to the standard variant as well.
Upstream-Status: Inappropriate [issue reported at https://github.com/RPi-Distro/firmware-nonfree/issues/26]
Signed-off-by: Omri Sarig <omri.sarig@prevas.dk>
---
.../brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.bin | 2 +-
.../brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin | 2 +-
.../brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.bin | 2 +-
.../brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin | 2 +-
.../brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,5-model-b.bin | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.bin b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.bin
index 9c39208..b914838 120000
--- a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.bin
+++ b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.bin
@@ -1 +1 @@
-../cypress/cyfmac43455-sdio.bin
\ No newline at end of file
+../cypress/cyfmac43455-sdio-standard.bin
\ No newline at end of file
diff --git a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin
index 9c39208..b914838 120000
--- a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin
+++ b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin
@@ -1 +1 @@
-../cypress/cyfmac43455-sdio.bin
\ No newline at end of file
+../cypress/cyfmac43455-sdio-standard.bin
\ No newline at end of file
diff --git a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.bin b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.bin
index 9c39208..b914838 120000
--- a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.bin
+++ b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.bin
@@ -1 +1 @@
-../cypress/cyfmac43455-sdio.bin
\ No newline at end of file
+../cypress/cyfmac43455-sdio-standard.bin
\ No newline at end of file
diff --git a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin
index 9c39208..b914838 120000
--- a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin
+++ b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin
@@ -1 +1 @@
-../cypress/cyfmac43455-sdio.bin
\ No newline at end of file
+../cypress/cyfmac43455-sdio-standard.bin
\ No newline at end of file
diff --git a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,5-model-b.bin b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,5-model-b.bin
index 9c39208..b914838 120000
--- a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,5-model-b.bin
+++ b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.raspberrypi,5-model-b.bin
@@ -1 +1 @@
-../cypress/cyfmac43455-sdio.bin
\ No newline at end of file
+../cypress/cyfmac43455-sdio-standard.bin
\ No newline at end of file
--
2.34.1

View File

@@ -7,7 +7,7 @@ SECTION = "kernel"
LICENSE = "GPL-2.0-only & binary-redist-Cypress-rpidistro & Synaptics-rpidistro"
LIC_FILES_CHKSUM = "\
file://debian/copyright;md5=291ee5385b4cf74b10c5fb5a46a7bbc6 \
file://debian/copyright;md5=454e44c688dc909e16223e4aee63568c \
"
# Where these are no common licenses, set NO_GENERIC_LICENSE so that the
# license files will be copied from the fetched source.
@@ -16,10 +16,10 @@ NO_GENERIC_LICENSE[Synaptics-rpidistro] = "debian/copyright"
LICENSE_FLAGS = "synaptics-killswitch"
SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree;branch=bookworm;protocol=https \
file://0001-Default-43455-firmware-to-standard-variant.patch \
file://0002-Default-all-RPi-43455-boards-to-standard-variant.patch \
"
SRCREV = "223ccf3a3ddb11b3ea829749fbbba4d65b380897"
PV = "20230625-2+rpt2"
SRCREV = "c9d3ae6584ab79d19a4f94ccf701e888f9f87a53"
PV = "20240709-2~bpo12+1+rpt3"
S = "${WORKDIR}/git"
inherit allarch
@@ -27,6 +27,11 @@ inherit allarch
do_configure[noexec] = "1"
do_compile[noexec] = "1"
# The minimal firmware doesn't work with Raspberry Pi 5, so default to the
# standard firmware
CYFMAC43455_SDIO_FIRMWARE ??= "minimal"
CYFMAC43455_SDIO_FIRMWARE:raspberrypi5 ??= "standard"
do_install() {
install -d ${D}${nonarch_base_libdir}/firmware/brcm ${D}${nonarch_base_libdir}/firmware/cypress
@@ -34,6 +39,7 @@ do_install() {
for fw in \
brcmfmac43430-sdio \
brcmfmac43430b0-sdio \
brcmfmac43436-sdio \
brcmfmac43436s-sdio \
brcmfmac43455-sdio \
@@ -42,8 +48,12 @@ do_install() {
done
cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/cypress/* ${D}${nonarch_base_libdir}/firmware/cypress/
ln -s cyfmac43455-sdio-${CYFMAC43455_SDIO_FIRMWARE}.bin ${D}${nonarch_base_libdir}/firmware/cypress/cyfmac43455-sdio.bin
rm ${D}${nonarch_base_libdir}/firmware/cypress/README.txt
install -d ${D}${sysconfdir}/modprobe.d
install -m 0644 debian/rpi-brcmfmac.conf ${D}${sysconfdir}/modprobe.d/
}
PACKAGES = "\
@@ -54,6 +64,7 @@ PACKAGES = "\
${PN}-bcm43455 \
${PN}-bcm43456 \
${PN}-license \
${PN}-module-conf \
"
LICENSE:${PN}-bcm43430 = "binary-redist-Cypress-rpidistro"
@@ -69,7 +80,10 @@ FILES:${PN}-bcm43430 = " \
${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.bin \
${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.clm_blob \
"
FILES:${PN}-bcm43436 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436-*"
FILES:${PN}-bcm43436 = " \
${nonarch_base_libdir}/firmware/brcm/brcmfmac43436-* \
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430b0-* \
"
FILES:${PN}-bcm43436s = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436s*"
FILES:${PN}-bcm43439 = " \
${nonarch_base_libdir}/firmware/cypress/43439A0-7.95.49.00.combined \
@@ -81,13 +95,14 @@ FILES:${PN}-bcm43455 = " \
"
FILES:${PN}-bcm43456 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43456*"
FILES:${PN}-license = "${nonarch_base_libdir}/firmware/copyright.firmware-nonfree-rpidistro"
FILES:${PN}-module-conf = "${sysconfdir}/modprobe.d"
RDEPENDS:${PN}-bcm43430 += "${PN}-license"
RDEPENDS:${PN}-bcm43436 += "${PN}-license"
RDEPENDS:${PN}-bcm43436s += "${PN}-license"
RDEPENDS:${PN}-bcm43439 += "${PN}-license"
RDEPENDS:${PN}-bcm43455 += "${PN}-license"
RDEPENDS:${PN}-bcm43456 += "${PN}-license"
RDEPENDS:${PN}-bcm43430 += "${PN}-license ${PN}-module-conf"
RDEPENDS:${PN}-bcm43436 += "${PN}-license ${PN}-module-conf"
RDEPENDS:${PN}-bcm43436s += "${PN}-license ${PN}-module-conf"
RDEPENDS:${PN}-bcm43439 += "${PN}-license ${PN}-module-conf"
RDEPENDS:${PN}-bcm43455 += "${PN}-license ${PN}-module-conf"
RDEPENDS:${PN}-bcm43456 += "${PN}-license ${PN}-module-conf"
RCONFLICTS:${PN}-bcm43430 = "linux-firmware-raspbian-bcm43430"
RCONFLICTS:${PN}-bcm43436 = "linux-firmware-bcm43436"

View File

@@ -1,8 +1,3 @@
CONFIG_ANDROID=y
#CONFIG_ANDROID_BINDERFS is not set
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDER_DEVICES="binder"
CONFIG_ASHMEM=y

View File

@@ -1,4 +1,5 @@
CONFIG_I2C_BCM2835=y
CONFIG_I2C_BRCMSTB=y
CONFIG_DRM=y
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_VC4=y

View File

@@ -0,0 +1,6 @@
# SPDX-FileCopyrightText: Andrei Gherzan <andrei.gherzan@huawei.com>
#
# SPDX-License-Identifier: MIT
require linux-raspberrypi-v7.inc
require linux-raspberrypi_6.12.bb

View File

@@ -28,7 +28,7 @@ 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:raspberrypi3-64 ?= "bcm2711_defconfig"
KBUILD_DEFCONFIG:raspberrypi4 ?= "bcm2711_defconfig"
KBUILD_DEFCONFIG:raspberrypi4-64 ?= "bcm2711_defconfig"
KBUILD_DEFCONFIG:raspberrypi-armv7 ?= "bcm2711_defconfig"

View File

@@ -0,0 +1,31 @@
LINUX_VERSION ?= "6.12.25"
LINUX_RPI_BRANCH ?= "rpi-6.12.y"
LINUX_RPI_KMETA_BRANCH ?= "yocto-6.12"
SRCREV_machine = "3dd2c2c507c271d411fab2e82a2b3b7e0b6d3f16"
SRCREV_meta = "1f6ab68a1d86836bf1b82b791df03da3cfeacb3f"
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}"

View File

@@ -1,9 +1,9 @@
LINUX_VERSION ?= "6.6.22"
LINUX_VERSION ?= "6.6.63"
LINUX_RPI_BRANCH ?= "rpi-6.6.y"
LINUX_RPI_KMETA_BRANCH ?= "yocto-6.6"
SRCREV_machine = "c04af98514c26014a4f29ec87b3ece95626059bd"
SRCREV_meta = "6a24861d6504575a4a9f92366285332d47c7e111"
SRCREV_machine = "e442e5c1ab6bff5b5460b4fc949beb72aaf77970"
SRCREV_meta = "52ff0d75713ce61962b325a2090bd55e216f0cf3"
KMETA = "kernel-meta"