Commit Graph
43 Commits
Author SHA1 Message Date
Andrei Gherzan ae6dc3faee ci: mark the layer checkout safe for git in yocto-check-layer
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>
2026-10-19 04:47:51 +01:00
Andrei Gherzan bac21e1933 ci: silence dpkg progress output in yocto-builder
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2026-10-19 04:47:50 +01:00
Andrei Gherzan 5fc6bb93e0 ci: pin git-mirror-me-action to v3.0.0
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2026-10-19 04:47:48 +01:00
Andrei Gherzan fc46cbc4fb ci: prune unused sstate weekly
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>
2026-10-19 04:47:48 +01:00
Andrei Gherzan 67d7736ed4 ci: cancel superseded runs with native concurrency groups
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>
2026-10-19 04:47:47 +01:00
Andrei Gherzan 651a6a21ed ci: persist the hash equivalence database
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>
2026-10-19 04:47:46 +01:00
Andrei Gherzan df3c09e34c ci: reuse docker images across jobs
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>
2026-10-19 04:47:45 +01:00
Andrei Gherzan 26ddb68f93 ci: don't persist the checkout token
Nothing after checkout should need the GITHUB_TOKEN so persisting would only be
an extra risk.

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2026-10-19 04:47:44 +01:00
Andrei Gherzan b4dd0415ce ci: pin third-party actions to commit SHAs
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>
2026-10-19 04:47:43 +01:00
Andrei Gherzan 3efe6589e8 ci: replace tj-actions/changed-files with a local action
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>
2026-10-19 04:47:42 +01:00
Andrei Gherzan c29bfe6e74 ci: split machine coverage in tiers
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>
2026-10-19 04:47:41 +01:00
Andrei Gherzan 9bd4f13a78 ci: switch yocto-builder Dockerfile to Ubuntu 26.04
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>
2026-10-18 16:11:03 +01:00
Khem Raj b837662911 ci: Switch to using https for fetching OE/YP git repos
git protocol is broken, and anyway https is preferred way to clone from
these git sources.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-04-10 19:29:28 -07:00
Martin Jansa 9720dc611c yocto-builder/entrypoint-build.sh: Remove init configuration
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>
2026-03-20 00:08:27 -07:00
Leon Anavi 7439575078 yocto-builder/entrypoint-yocto-check-layer.sh: Replace Poky
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>
2025-11-20 14:09:11 +00:00
Leon Anavi 9806b9981a yocto-builder/entrypoint-build.sh: Replace Poky
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>
2025-11-20 14:09:11 +00:00
Gaël PORTAY 90ce848980 raspberrypi2-64.conf: add machine for Raspberry Pi 2B V1.2 (64-bit)
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>
2025-10-08 11:22:01 +01:00
Martin Jansa 03981f9365 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>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-07-17 08:28:56 -07:00
Leon Anavi 1059a239ca .github/workflows: seccomp=unconfined
Run docker without the default seccomp profile

Suggested-by: Martin Steegmanns <martin.steegmanns@govcert.etat.lu>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-05-09 08:35:55 -07:00
Leon Anavi 2aa34651a7 .github/workflows: Disable apparmor
Add --security-opt apparmor=unconfined to docker cmdline.

Suggested-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-05-09 08:35:55 -07:00
Leon Anavi 48c571a537 Dockerfile: Increase vm.max_map_count
Fix the resource exhaustion problem on the build infrastructure.

Suggested-by: Stu Westerman @stu-spp
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-05-09 08:35:55 -07:00
Leon Anavi dcf586cb7b yocto-builds.yml: Set ulimit
Add --ulimit "nofile=1024:1048576" to yocto-builds.yml.

Suggested-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-05-09 08:35:55 -07:00
Leon Anavi 54ed1f7c65 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.

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>
2025-05-09 08:35:55 -07:00
Florin Sarbu 1e7750e3c8 Add Raspberry Pi 5
Signed-off-by: Florin Sarbu <florin@balena.io>
2024-01-25 17:25:39 +00:00
Andrei Gherzan a7f7272dca ci: Add usrmerge to distro features
unmerged-usr was deprecated upstream[1]. Follow up with our CI builds.

[1] https://lore.kernel.org/all/3f2f03085301d22854e5429019fb010f27d98bc7.camel@linuxfoundation.org/t/

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2023-08-29 22:43:01 +01:00
Andrei Gherzan de9bfd04d5 ci: Fix dco-check job with newer git versions
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>
2022-11-08 08:21:47 +00:00
Andrei Gherzan 150d442a9b ci: Bump actions/checkout to v3
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>
2022-11-08 08:21:47 +00:00
Zygmunt Krynicki fc5f80a47e ci: fix apparent typo in file patterns
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
2022-10-11 18:58:35 +01:00
Andrei Gherzan f38baedb86 ci: Add raspberrypi-armv8 to the build matrix
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-09-14 20:39:18 +01:00
Andrei Gherzan fe96a4511f ci: Add raspberrypi-armv7 to the build matrix
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-09-14 20:39:18 +01:00
Andrei Gherzan 0ffe5110ec ci: Set LICENSE_FLAGS_ACCEPTED in builder docker container
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-07-31 02:16:37 +01:00
Andrei Gherzan 70191d3c87 ci: Don't run yocto builds on PRs that don't affect them
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-07-30 03:46:42 +01:00
Andrei Gherzan 05cafd056a ci: Run the mirror workflow on generic workers
No need to bottleneck on the self hosted worker(s) when this is a light
job.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-07-30 03:46:42 +01:00
Andrei Gherzan 584785bf45 ci: Run the compliance workflow on generic workers
No need to bottleneck on the self hosted worker(s) when this is a light
job.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-07-30 03:46:42 +01:00
Andrei Gherzan 1a15fefb27 ci: Run the cancel workflow on generic workers and update action
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>
2022-07-30 03:46:42 +01:00
Andrei Gherzan 260b3b97d0 ci: Migrate worflow to using latest git-mirror-me-action revision
This has full support for env variables.

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2022-07-27 11:27:00 +01:00
Andrei Gherzan 993436b0fe ci: Use test builds with the test image
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>
2022-04-21 21:41:38 +01:00
Andrei Gherzan e39a0a570c ci: Use the current stable version for the mirror action
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-02-23 00:40:39 +01:00
Andrei Gherzan 0c5c1c9b76 ci: No need for checkout step in mirror workflow
The git-mirror-me-action handles the cloning of the source.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-02-23 00:17:23 +01:00
Andrei Gherzan 45a7fd9c18 ci: Add git mirror workflow
This will resume syncing the Yocto git repository with the GitHub one.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-02-22 22:16:51 +01:00
Andrei Gherzan b7b34ecce7 ci: Add workflow to cancel redundant workflows
This is not yet baked into GitHub but can be achived using a public
action.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-02-19 09:27:59 +00:00
Andrei Gherzan 218635ea9e ci: Introduce workflow Yocto operations/builds
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>
2022-02-19 09:27:59 +00:00
Andrei Gherzan 637393827d ci: Introduce workflow for compliance
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>
2022-02-19 09:27:59 +00:00