Skip to content

Eliminate Linux SUBLEVEL bump and decouple Linux image build CI #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 27, 2025

Conversation

ChinYikMing
Copy link
Collaborator

@ChinYikMing ChinYikMing commented Feb 22, 2025

Add SHA256SUM as a new checksum verifier for downloading Linux tarballs since the latest Linux tarball is available at https://cdn.kernel.org/pub/linux/kernel/v6.x/, and the official SHA256 values can be found at https://cdn.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc. To maintain compatibility with SHA1SUM, the verify function in mk/external.mk has been modified to support multiple SHA algorithms. With these changes, the Linux kernel SUBLEVEL bump is no longer necessary and builds can be triggered via a workflow dispatch event. Afterwards, version updates of Linux will only apply to the VERSION and PATCHLEVEL.

Separate the Linux image build process from the build-artifact CI. The Linux image is now majorly built via a workflow dispatch event while ELF artifacts do not need to be built in the same event, thus decoupling these processes ensures that ELF artifacts are not unnecessarily rebuilt. This modular approach improves the flexibility of the artifact building workflow.

Summary by Bito

This pull request enhances the Linux image build process by replacing SHA1SUM with SHA256SUM for improved security. It modifies the verify function to support multiple SHA algorithms and decouples the build processes for Linux images and ELF artifacts, streamlining workflows and enhancing verification accuracy.

Unit tests added: False

Estimated effort to review (1-5, lower is better): 2

@ChinYikMing ChinYikMing mentioned this pull request Feb 22, 2025
@ChinYikMing
Copy link
Collaborator Author

The workflow_dispatch event should be manually triggered periodically to build the latest Linux image. After these are merged, only the VERSION and PATCHLEVEL of the Linux kernel and the VERSION of Buildroot are needed to be bumped.

@ChinYikMing
Copy link
Collaborator Author

The Doom and Quake patches shall be applied when building rootfs.cpio by Buildroot. The patches could stored at rv32emu-prebuilt. Will do in future PR.

@ChinYikMing ChinYikMing marked this pull request as draft February 22, 2025 17:34
Copy link

Code Review Agent Run Status

  • Limitations and other issues: ❌ Failure - The AI Code Review Agent skipped reviewing this change because it is configured to exclude certain pull requests based on the source/target branch or the pull request status. You can change the settings here, or contact the agent instance creator at [email protected].

@ChinYikMing ChinYikMing marked this pull request as ready for review February 22, 2025 18:50
Add SHA256SUM as a new checksum verifier for downloading Linux tarballs
since the latest Linux tarball is available at
https://cdn.kernel.org/pub/linux/kernel/v6.x/ and the official SHA256
values can be found at
https://cdn.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc. To maintain
compatibility with SHA1SUM, the verify function in mk/external.mk has
been modified to support multiple SHA commands. Additionally,
strip-components option has been added to ensure correct extraction when
using tar to address variations in top-level directory structures such
as the Linux tarball including a top-level directory while the Timidity
tarball does not.

With these changes, the Linux kernel SUBLEVEL bump is
no longer necessary, and builds can be triggered via a workflow dispatch
event. Afterwards, version updates of Linux will only apply to the
VERSION and PATCHLEVEL.
Separate the Linux image build process from the build-artifact CI. The
Linux image is now majorly built via a workflow dispatch event while ELF
artifacts do not need to be built in the same event, thus decoupling
these processes ensures that ELF artifacts are not unnecessarily
rebuilt. This modular approach improves the flexibility of the artifact
building workflow.
Copy link

Code Review Agent Run Status

  • Limitations and other issues: ❌ Failure - The AI Code Review Agent skipped reviewing this change because it is configured to exclude certain pull requests based on the source/target branch or the pull request status. You can change the settings here, or contact the agent instance creator at [email protected].

Copy link
Collaborator

@vacantron vacantron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jserv jserv merged commit 798ffcd into sysprog21:master Feb 27, 2025
8 checks passed
@ChinYikMing ChinYikMing deleted the ci-build-linux-img branch February 27, 2025 18:53
@jserv
Copy link
Contributor

jserv commented Feb 27, 2025

Thank @ChinYikMing for contributing!

@jserv jserv added this to the release-2025.1 milestone Mar 6, 2025
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.

3 participants