The checkout is owned by the runner user while the container runs as ci, so
git refuses to read /work. Mark it as a safe directory, as the DCO check
already does.
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
Nothing removes artifacts from the runner's SSTATE_DIR, so it grows without
bound. Delete sstate files not touched in 30 days. bitbake touches sstate files
whenever a build checks or unpacks them, so mtime tracks last use across all
branches.
DL_DIR is not pruned. Download stamps are only touched by do_fetch, which
sstate-restored recipes skip, so their age doesn't reflect whether a rebuild
would need them.
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
cancel-redundant-workflows.yml had some overhead as it was spawning an extra
workflow_run job per workflow. With concurrency groups, a new push cancels the
PR's previous run directly.
A cancelled step can leave its docker container running against the shared
sstate. Label containers with the runner name and remove them in the cleanup
step. Rename docker-prune-images to docker-cleanup accordingly.
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
BB_HASHSERVE defaults to "auto", which stores hashserv.db in the build
directory. CI builds in a temporary build directory, so the database was
discarded after every job and equivalent outputs from previous builds were
never matched.
Store it in SSTATE_DIR, next to the artifacts it references. This also aligns
to bitbake-setup default behaviour.
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
We were rebuilding Docker images from scratch with --no-cache, tagged by PR
number. With this, we were building multiple images per PR for the same
context.
This change tags the images by the git tree hash of the build context and only
build if the tag is missing. This naturally covers rebuilding on build context
changes.
Finally, this change handles refreshing images every 7 days (for example to
refresh OS packages) and prune by CI label after 14 days. The gap ensures an
image a running job just picked up isn't pruned under it.
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
Bump actions/checkout from v3 to v7.0.1, as v3 runs on the deprecated node16
runtime. Bump fsfe/reuse-action from v1 to v6.0.0.
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
Drop the dependency on tj-actions/changed-files and replace it with a local
composite action. Especially given it was compromised in the past - see
CVE-2025-30066.
The action diffs HEAD^1..HEAD of the PR merge commit that actions/checkout
checks out by default. It fails if HEAD is not a merge commit, so a change to
the checkout ref can't silently diff the wrong range.
With this in place, both of the workflows can share a consistent list of paths.
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
Full builds of 16 machines run serially on one runner and take 5-17h per PR.
Most of them share tune, defconfig and DTBs with another machine.
Build rpi-test-image only for raspberrypi0-wifi, raspberrypi-armv7,
raspberrypi-armv8, raspberrypi3-64, raspberrypi4-64 and raspberrypi5, which
together cover every tune, defconfig and kernel recipe.
Run yocto-check-layer with every machine in conf/machine. Its BSP machine
tests were skipped until now as no machines were passed. The machines are
listed from the layer, so new ones are checked without workflow changes.
Also trigger yocto-layer.yml on changes to itself.
Fixes#1633
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
pseudo on oe-core master now wraps open_tree_attr(), which needs
struct mount_attr from the system headers. Ubuntu 22.04 (glibc 2.35)
doesn't provide it, so pseudo-native fails to build:
error: conflicting types for 'real_open_tree_attr'
Move the builder to Ubuntu 26.04.
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
The init configuration is usually taken care of by setting INIT_MANAGER
and systemd is the default since:
https://git.openembedded.org/openembedded-core/commit/?id=0b4061c5d50261f826d0edb4b478d2d305274b7c
so none of this should be needed, hopefully it will fix CI runs which currently fail with:
https://github.com/agherzan/meta-raspberrypi/actions/runs/23234236947/job/67698405693
ERROR: Nothing PROVIDES 'systemd' (but /tmp/tmp.aSbUL7oQb7/openembedded-core/meta/recipes-core/psplash/psplash_git.bb DEPENDS on or otherwise requires it)
systemd was skipped: conflicting distro feature 'sysvinit' (in DISTRO_FEATURES)
NOTE: Runtime target 'psplash' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['psplash', 'systemd']
ERROR: Required build target 'rpi-test-image' has no buildable providers.
Missing or unbuildable dependency chain was: ['rpi-test-image', 'psplash', 'systemd']
Summary: There was 1 WARNING message.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
But I don't see where sysvinit would be getting into DISTRO_FEATURES here.
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Following the recent major breaking change with the introduction of
bitbake-setup because of which the Poky repository master branch is
no longer being updated, the Poky git repository has to be replaced
by bitbake and openembedded-core. This fixes the GitHub workflow
with branch master of meta-raspberrypi for yocto-check-layer test.
This work was sponsored by GOVCERT.LU.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Following the recent major breaking change with the introduction of
bitbake-setup because of which the Poky repository master branch is
no longer being updated, the Poky git repository has to be replaced
by bitbake, openembedded-core and meta-yocto which provides layers
meta-poky and meta-yocto-bsp. This fixes the GitHub workflows with
branch master of meta-raspberrypi and allows running auto checks.
This work was sponsored by GOVCERT.LU.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
This machine configuration is for the Raspberry Pi 2B V1.2 (64-bit).
Note: Raspberry Pi 2 Model B V1.2[1] switched from BCM2836[2] (V1.0,
V1.1) to BCM2837[3] that is 64-bit CPU used in Raspberry Pi 3 Model B.
BCM2836[2]
The Broadcom chip used in the Raspberry Pi 2 Model B. The
underlying architecture in BCM2836 is identical to BCM2835. The
only significant difference is the removal of the ARM1176JZF-S
processor and replacement with a quad-core Cortex-A7 cluster.
BCM2837[3]
This is the Broadcom chip used in the Raspberry Pi 3 Model B,
later models of the Raspberry Pi 2 Model B, and the Raspberry Pi
Compute Module 3. The underlying architecture of the BCM2837 is
identical to the BCM2836. The only significant difference is the
replacement of the ARMv7 quad core cluster with a quad-core ARM
Cortex A53 (ARMv8) cluster.
The ARM cores run at 1.2GHz, making the device about 50% faster
than the Raspberry Pi 2. The VideoCore IV runs at 400MHz.
See:
Poky (Yocto Project Reference Distro) 5.2.99+snapshot-cfbb00657ab961a3c3a8e6619fc08a2a3f4255c7 raspberrypi2-64 ttyAMA0
raspberrypi2-64 login: root
WARNING: Poky is a reference Yocto Project distribution that should be used for testing and development purposes only. It is recommended that you create your own distribution for production use.
root@raspberrypi2-64:~# uname -a
Linux raspberrypi2-64 6.12.41-v8 #1 SMP PREEMPT Thu Aug 7 16:48:46 UTC 2025 aarch64 GNU/Linux
root@raspberrypi2-64:~# cat /proc/device-tree/compatible
raspberrypi,2-model-b-rev2brcm,bcm2837
root@raspberrypi2-64:~# tty
/dev/ttyAMA0
root@raspberrypi2-64:~# dmesg | head
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.12.41-v8 (oe-user@oe-host) (aarch64-poky-linux-gcc (GCC) 15.2.0, GNU ld (GNU Binutils) 2.45.0.20250908) #1 SMP PREEMPT Thu Aug 7 16:48:46 UTC 2025
[ 0.000000] KASLR enabled
[ 0.000000] random: crng init done
[ 0.000000] Machine model: Raspberry Pi 2 Model B Rev 1.2
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000001ec00000, size 256 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x000000001ec00000..0x000000002ebfffff (262144 KiB) map reusable linux,cma
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000003b3fffff]
[1]: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#flagship-series
[2]: https://www.raspberrypi.com/documentation/computers/processors.html#bcm2836
[3]: https://www.raspberrypi.com/documentation/computers/processors.html#bcm2837
Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
Fix the resource exhaustion problem on the build infrastructure.
Suggested-by: Stu Westerman @stu-spp
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Upgrade to Ubuntu 22.04 because it is compatible with the Yocto
Project release Walnascar and provides a newer Python version.
Fixes:
RuntimeError: Sorry, python 3.9.0 or later is required for this version of bitbake
This work was sponsored by GOVCERT.LU.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Due to https://nvd.nist.gov/vuln/detail/cve-2022-24765, git introduced a
feature where without explicitly allowing it, it won't parse or consider
hooks that are owned by another git user while erroring out with:
fatal: detected dubious ownership in repository at [...]
This won't be an issue in our setup due to how we guard the code via PRs
so we configure git to avoid this check.
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
This addresses warnings like:
Node.js 12 actions are deprecated. [...] Please update the following
actions to use Node.js 16: actions/checkout, actions/checkout
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
No need to bottleneck on the self hosted worker(s) when this is a light
job that needs to run as soon as possible so that it can cancel early.
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
rpi-test-image is based on core-image-base but includes more packages
that this layer provides. In this way we can have CI test more recipe
updates.
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
We include a workflow for checking yocto compliance using the poky
provided script and also a matrix workflow for building the CI supported
build configurations.
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
It includes jobs for checking DCO and reuse. The latter is set to allow
fails as the repository is not yet reuse compliant. When that is done,
we can switch it.
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>