Skip to content

riscv:defconfig: enable zstd/xz support for fw loader #869

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 1 commit into from
Jun 11, 2025

Conversation

YukariChiba
Copy link
Member

@YukariChiba YukariChiba commented Jun 11, 2025

Summary by Sourcery

Enable zstd and xz support for the firmware loader in the RISC-V desktop defconfig

Enhancements:

  • Activate FW_LOADER_ZSTD in riscv64 desktop defconfig
  • Activate FW_LOADER_XZ in riscv64 desktop defconfig

@Avenger-285714
Copy link
Collaborator

  1. 请补充commit message并添加自己的signed-off
  2. CONFIG_FW_LOADER_COMPRESS_XZ也启用下,不然xz压缩的固件还是不能用吧

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables Zstandard (zstd) compression support for the firmware loader in the Deepin RISC-V64 desktop defconfig.

  • Add CONFIG_FW_LOADER_COMPRESS_ZSTD to enable zstd decompression in the firmware loader.
  • Ensures that zstd support is built alongside existing firmware compression mechanisms.
Comments suppressed due to low confidence (2)

arch/riscv/configs/deepin_riscv64_desktop_defconfig:599

  • [nitpick] Consider updating the relevant Kconfig help text or driver documentation to mention that zstd support is now available for firmware loading.
CONFIG_FW_LOADER_COMPRESS_ZSTD=y

arch/riscv/configs/deepin_riscv64_desktop_defconfig:599

  • Align the indentation of this new option with surrounding lines (add leading spaces) for consistency with other config entries.
CONFIG_FW_LOADER_COMPRESS_ZSTD=y

@deepin-ci-robot
Copy link

deepin pr auto review

在提供的代码更改中,添加了两个新的配置选项 CONFIG_FW_LOADER_COMPRESS_XZCONFIG_FW_LOADER_COMPRESS_ZSTD。这些配置选项用于启用对固件加载器(FW_LOADER)的 XZ 和 ZSTD 压缩支持。以下是针对这个更改的一些建议:

代码质量

  1. 配置文件格式:确保配置文件中的新选项格式正确,并且与现有配置项保持一致。
  2. 注释说明:在添加新配置项时,应该添加相应的注释说明,解释为什么需要启用这些压缩选项,以及它们可能带来的好处。

代码性能

  1. 压缩算法选择:确认选择 XZ 和 ZSTD 压缩算法是基于性能需求还是存储空间需求。如果是为了优化性能,应该进行基准测试,确保选择的是最适合当前系统的算法。

代码安全

  1. 固件安全性:启用压缩功能可能会增加固件加载过程中的安全风险,因为压缩文件可能更容易受到攻击。确保固件加载过程是安全的,并且压缩算法本身是安全的。

其他建议

  1. 配置项的依赖性:确认这些配置项是否依赖于其他配置项。如果它们依赖于特定的内核版本或硬件特性,应该添加相应的依赖性检查。
  2. 文档更新:如果这些更改会影响用户或开发者,应该更新相应的文档,说明如何启用和配置这些新选项。

总体来说,这个更改看起来是为了提高固件加载的性能和效率,但需要确保相关的安全性和性能测试都已经到位。

@YukariChiba YukariChiba changed the title riscv:defconfig: enable zstd support for fw loader riscv:defconfig: enable zstd/xz support for fw loader Jun 11, 2025
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: opsiff

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@opsiff opsiff merged commit ddd3316 into deepin-community:linux-6.6.y Jun 11, 2025
7 of 8 checks passed
Copy link

sourcery-ai bot commented Jun 11, 2025

Reviewer's Guide

Updates the RISC-V desktop defconfig to enable zstd and xz decompression in the firmware loader by setting the corresponding config flags.

File-Level Changes

Change Details Files
Activate zstd support in firmware loader
  • Enable CONFIG_FW_LOADER_ZSTD
arch/riscv/configs/deepin_riscv64_desktop_defconfig
Activate xz support in firmware loader
  • Enable CONFIG_FW_LOADER_XZ
arch/riscv/configs/deepin_riscv64_desktop_defconfig

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants