Skip to content

Enable to generate rootfs.cpio.gz - #754

Merged
jserv merged 2 commits into
sysprog21:masterfrom
ChinYikMing:rootfs.cpio.gz
Jul 30, 2026
Merged

Enable to generate rootfs.cpio.gz#754
jserv merged 2 commits into
sysprog21:masterfrom
ChinYikMing:rootfs.cpio.gz

Conversation

@ChinYikMing

@ChinYikMing ChinYikMing commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

This is friendly for user to store smaller size images locally.

Image Type Uncompressed Compressed (.gz) Reduction
Kernel 4.6M 2.2M 52.17%
Rootfs (cpio) 32.0M 15.0M 53.12%

Also, once the prebuilt gzipped linux images are available, the
rv32emu's bootloader can be extended to handle these images to have
more capability for wider ranges of linux images.


Summary by cubic

Adds gzip-compressed Linux images (rootfs.cpio.gz, Image.gz) to cut local storage by ~50% and pave the way for future bootloader support. The compressed files are built, copied to the output, and added to the prebuilt bundle with checksums.

  • New Features
    • Enable BR2_TARGET_ROOTFS_CPIO_GZIP in buildroot to produce rootfs.cpio.gz.
    • Copy rootfs.cpio.gz and Image.gz to output; include both in prebuilt artifacts and sha1sum-linux-image.

Written for commit 831ec5b. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tools/build-linux-image.sh">

<violation number="1" location="tools/build-linux-image.sh:281">
P2: The Linux image build does not request the `Image.gz` target before copying it. On the current RISC-V configuration, the default kernel build produces `Image`, so this copy can fail with “No such file or directory” and the gzip kernel will not be included; the unasserted failure can also be masked by the subsequent `do_simplefs` command. Building `Image.gz` explicitly and checking the copy result would make the new artifact reliable.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread tools/build-linux-image.sh
This is friendly for user to store smaller size images locally.

+---------------+--------------+-----------------+-----------+
| Image Type    | Uncompressed | Compressed(.gz) | Reduction |
+---------------+--------------+-----------------+-----------+
| Kernel        |         4.6M |           2.2M  |    52.17% |
| Rootfs (cpio) |        32.0M |          15.0M  |    53.12% |
+---------------+--------------+-----------------+-----------+

Also, once the prebuilt gzipped linux images are available, the
rv32emu's bootloader can be extended to handle these images to have
more capability for wider ranges of linux images.
@ChinYikMing
ChinYikMing requested a review from jserv July 24, 2026 18:23
@jserv jserv added this to the release-2026.2 milestone Jul 30, 2026
@jserv
jserv merged commit be42e38 into sysprog21:master Jul 30, 2026
18 checks passed
@jserv

jserv commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Thank @ChinYikMing for contributing!

@ChinYikMing
ChinYikMing deleted the rootfs.cpio.gz branch July 30, 2026 15:43
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.

2 participants