Skip to content

tools: update: also update the Linux Kernel#341

Open
hnez wants to merge 10 commits intolinux-automation:whinlatterfrom
hnez:linux-auto-stable
Open

tools: update: also update the Linux Kernel#341
hnez wants to merge 10 commits intolinux-automation:whinlatterfrom
hnez:linux-auto-stable

Conversation

@hnez
Copy link
Copy Markdown
Member

@hnez hnez commented Mar 5, 2026

This updates the tools/update/update.py script so we can also auto-update the Linux Kernel.

What makes the Kernel so special that we can not use the script as is? Its very heavy git history.
Cloning the kernel - even without BLOB objects is quite an expensive operation and a bit rude to do on a regular basis to whoever is hosting the respective mirror.
Since we are just interested in the current list of git tags, we can skip just about everything that a real clone involves and just implement the first step of the http git protocol by hand instead. The first step of a clone is getting a mapping from refs on the server to commit hashes - i.e. everything we need.

I have implemented that, but only use it for the Linux kernel. The other projects are not as heavy and it is quite nice to also have information like the release date (we get that from git commits) in the recipes - something we do not have with the lightweight backend.

As of now we just update to the most recent mainline release or stable release based on semver. For meta-lxatac stable release branches we will likely want to update the version_pattern so we only update to new stable releases of the same kernel.

@hnez hnez force-pushed the linux-auto-stable branch 6 times, most recently from 0b781ce to f31dd00 Compare March 10, 2026 06:20
Comment thread tools/update/update.py Outdated
@hnez hnez force-pushed the linux-auto-stable branch from f31dd00 to 672cf9c Compare March 17, 2026 09:31
@hnez hnez force-pushed the linux-auto-stable branch 2 times, most recently from 971ad27 to 192d478 Compare March 27, 2026 06:54
@hnez
Copy link
Copy Markdown
Member Author

hnez commented Mar 27, 2026

I have canceled the build since actions/runs/23634863412 is currently running, and will run for a few hours. That job will generate new sstate relevant to this job.

hnez added 9 commits April 13, 2026 10:43
Only run on our main repository and for forks that are configured to run
updates.

Also accept manually running the action via `workflow_dispatch` for forks
by default.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
This makes it easier to add features in the future, like e.g. a basic mode
where we do not actually have to clone the repository.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
When a recipe is configured for the `basic` mode the repo will not be
cloned. Instead we just ask the server for its list of refs via
`git ls-remote --refs` and don't include any information that requires
looking at commits.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
We only carry a single patch on the Linux kernel. This makes still using
UMPF a bit overkill. Stop using UMPF and just carry the patch normall.
This prepares us for a patch-free world and for updating via an auto
updater script.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
This is the most recent Linux release at the moment, across all mainline
and stable releases.
The next update will jump to either the next 6.19 stable release or the
7.0 mainline release - whichever comes first.

To stick to a specific release and its stable updates change the
`version_pattern` in `tools/update/recipes.yaml` to e.g.: `^v6.19.\\d+$`.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
This does not affect us in meta-lxatac, but does happen in other layers
that I want to use this script in.
Fix it here so I can safely copy the script where I need it.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
In our case this means downloading the barebox tarball just once instead
of twice.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
@hnez hnez force-pushed the linux-auto-stable branch from fc65f4c to 6244dcb Compare April 13, 2026 08:44
This required a manual adjustment to the download URL due to
the 6.x -> 7.x change.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
@hnez hnez force-pushed the linux-auto-stable branch from 6244dcb to 4edb1dc Compare April 13, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant