Skip to content

feat: Seek firmware from path specified in kernel parameter path filesystem#2

Merged
federicobozzini merged 8 commits into
arm:mainfrom
yejseo01:firmware_path
Oct 29, 2025
Merged

feat: Seek firmware from path specified in kernel parameter path filesystem#2
federicobozzini merged 8 commits into
arm:mainfrom
yejseo01:firmware_path

Conversation

@yejseo01

@yejseo01 yejseo01 commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

Changes

  • Documentation change on root-dir so that /lib/firmware is not assumed by the users
  • Test changes to check the firmware directory based on what is inside /sys/module/firmware_class/parameters/path
  • Change e2e test to create firmware based on readings of /sys/module/firmware_class/parameters/path
  • Update the filesystem manager to keep the /sys/module/firmware_class/parameters/path and the actual firmware path
  • Verify firmware's existence based on the path pointed by /sys/module/firmware_class/parameters/path
  • Add helper file mkfile() which would make all the parent folder of a path and make a file with the basename of the path

Checklist

  • 🤖 This change is covered by tests as required.
  • 🤹 All required manual testing has been performed.
  • 📖 All documentation updates are complete.

@yejseo01
yejseo01 requested a review from Copilot October 28, 2025 09:37

Copilot AI 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.

Pull Request Overview

This PR updates the firmware loading mechanism to read the firmware directory path from /sys/module/firmware_class/parameters/path instead of hardcoding /lib/firmware. This makes the simulator more flexible and aligned with how Linux actually determines firmware locations.

Key changes:

  • Modified FileSystemManager to track and create the firmware path configuration file
  • Updated tests to dynamically read firmware directory from the system parameter file
  • Added mkfile() helper to create parent directories and files atomically

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
pkg/simulator/filesystem.go Added firmware path file tracking, mkfile() helper, and verification logic to read firmware directory from system parameters
e2e/running_firmware_test.go Updated test to read firmware directory from system parameter file instead of hardcoded path
e2e/boostrapping_test.go Modified bootstrapping test to verify firmware directory based on system parameter file
cmd/remoteproc-simulator/main.go Updated documentation to remove assumption about /lib directory creation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/simulator/filesystem.go Outdated
Comment thread pkg/simulator/filesystem.go Outdated
Comment thread pkg/simulator/filesystem.go
Comment thread e2e/running_firmware_test.go Outdated
Comment thread pkg/simulator/filesystem.go Outdated
Comment thread pkg/simulator/filesystem.go Outdated
Comment thread pkg/simulator/filesystem.go Outdated
Comment thread pkg/simulator/filesystem.go Outdated
Comment thread pkg/simulator/filesystem.go
Comment thread pkg/simulator/filesystem.go Outdated
Comment thread e2e/running_firmware_test.go Outdated
Comment thread e2e/boostrapping_test.go
Comment thread pkg/simulator/filesystem.go
Comment thread e2e/running_firmware_test.go Outdated

@Luke-Parkin Luke-Parkin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Happy with this.

I am a bit concerned about us making files in the real /sys/ (which appears to be the default state) but this is probably something for another ticket/pr.

…/parameters/path

Signed-off-by: Yejin Seo <yejseo01@arm.com>
Signed-off-by: Yejin Seo <yejseo01@arm.com>
Signed-off-by: Yejin Seo <yejseo01@arm.com>
Signed-off-by: Yejin Seo <yejseo01@arm.com>
Signed-off-by: Yejin Seo <yejseo01@arm.com>
Signed-off-by: Yejin Seo <yejseo01@arm.com>
Signed-off-by: Yejin Seo <yejseo01@arm.com>
@yejseo01 yejseo01 changed the title feat: Seek firmware from path specified in /sys/module/firmware_class… feat: Seek firmware from path specified in kernel parameter path filesystem Oct 29, 2025
@federicobozzini
federicobozzini merged commit 9f5a290 into arm:main Oct 29, 2025
5 checks passed
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.

5 participants