Repository navigation
feat: Add ext4 image creation - #16
Merged
Merged
Conversation
These images are handy when running integration tests targeting Linux.
lurtz
force-pushed
the
add-ext4-image-creation
branch
from
August 24, 2026 13:52
976324b to
b127876
Compare
lurtz
marked this pull request as ready for review
August 25, 2026 08:19
lurtz
requested review from
AlexanderLanin,
antonkri,
dcalavrezo-qorix and
nradakovic
as code owners
August 25, 2026 08:19
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Starlark rule to build Linux ext4 filesystem images (without journaling) for use in integration tests (e.g., attaching as a secondary QEMU disk), and updates repo documentation and Bazel versioning to align with other S-CORE repos.
Changes:
- Add
ext4Bazel rule (rules/linux/ext4.bzl) to construct an ext4 image fromrules_pkginputs. - Add a Bazel
sh_testvalidating the image contents and symlink behavior viadebugfs/tune2fs. - Update documentation and Bazel version/lockfile to reflect the new rule and Bazel 8.6.0.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
rules/linux/ext4.bzl |
Adds the new ext4 rule implementation that stages files/symlinks and runs mke2fs to produce an ext4 image. |
rules/linux/BUILD |
Exports ext4.bzl for external loading. |
rules/linux/test/BUILD |
Adds a small test package that builds an ext4 image and verifies it via sh_test. |
rules/linux/test/ext4_test.sh |
Implements runtime validation of the generated ext4 image using debugfs and tune2fs. |
rules/linux/test/hello.txt |
Adds a sample rootfs file used by the ext4 image test. |
README.md |
Documents the new ext4 rule and shows a usage example. |
.bazelversion |
Bumps Bazel to 8.6.0. |
MODULE.bazel.lock |
Updates the lockfile to match the Bazel/module version bump. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: lurtz <727209+lurtz@users.noreply.github.com>
- Introduce `//toolchains/linux:ext4_toolchain_type` and `ext4_toolchain_config` so `mke2fs`/`coreutils` are resolved via toolchain resolution instead of a hardcoded call; wire it up in the `imagefs` module extension for `type = "ext4"`, auto-provisioning hermetic `coreutils` via bazel_lib. - Split the ext4 rule's image-building logic into static `//rules/linux/tools:compute_size`/`:create_image` scripts driven by argv, replacing generated-script logic. - Move `imagefs_toolchain.bzl` from `rules/qnx/` to `rules/` since it's now shared across qnx and linux toolchain types. - Add `templates/linux/BUILD.template` for generating the linux/ext4 toolchain repo, mirroring the existing qnx template. - Extract the ext4 test into a separate nested Bazel module under `tests/` (score_rules_imagefs_tests) that depends on the root module via `local_path_override`, exercising the `imagefs` extension like a real external consumer. - Update README.md to document the ext4 toolchain setup, module extension usage, and current repository layout.
lurtz
commented
Sep 1, 2026
To avoid copying files 2 times (for each action), implementation now uses only one script for generating the ext4 image type.
nradakovic
approved these changes
Sep 3, 2026
lurtz
added a commit
to eclipse-score/os_images
that referenced
this pull request
Sep 10, 2026
When running integration tests, the test data needs to be available in the virtual machine. Mounting the images automatically mimics the behavior of QNX and Docker images, where the test data is also available without extra actions. Depends on - eclipse-score/rules_imagefs#16
lurtz
added a commit
to lurtz/inc_someip_gateway
that referenced
this pull request
Sep 16, 2026
So far this repo has its own ITF QEMU plugin, which is not sustainable in the long run, because it creates more maintenance effort. The changes needed to use the ITF QEMU plugin from the itf repo are now merged to main, which enables us to remove our QEMU plugin. This requires the following pull requests to be merged: - eclipse-score/itf#123 - eclipse-score/itf#135 - eclipse-score/itf#139 - eclipse-score/rules_imagefs#16 - eclipse-score/os_images#29 - eclipse-score/os_images#19 The goal of this pull request to make the patch in the linked pull request obsolete and use the ITF code without changes.
7 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These images are handy when running integration tests targeting Linux. They can be created with user rights and given to QEMU as a second disk. This way we avoid having to modify the base image.
This also bumps bazel to version 8.6.0 to align with other S-CORE repos.