Skip to content

Conversation

@Wassasin
Copy link
Contributor

@Wassasin Wassasin commented Aug 22, 2025

This PR pulls in ec-slimloader-descriptors and a bootloader-tool. The concept of descriptors on a fixed memory address has been dropped in favor of hardcoded slot layouts. We employ the NXP MBI container format to encode image length and destination address.

Several TODOs remain:

  • Update README's.
  • Add example with user button interaction to showcase A/B mode.
  • Implement pure-Rust MBI such that it is ready for HSM integration.
  • Fix CI pipelines

@jerrysxie
Copy link
Contributor

@Wassasin This repo's policy is a bit out of dated. I created this PR: #20 to remove per commit checking and update repo policy to allow squashing. This should make dealing with CI a lot easier. Please rebase on top.

@JamesHuard Please review #20

@Wassasin Wassasin force-pushed the feature/mbi-and-combined branch from e501c7c to 335c184 Compare August 27, 2025 09:48
@Wassasin Wassasin force-pushed the feature/mbi-and-combined branch 2 times, most recently from 78d7026 to 07bcae4 Compare September 10, 2025 15:20
@Wassasin Wassasin force-pushed the feature/mbi-and-combined branch from 0f74d68 to 97f11fd Compare September 30, 2025 15:25
@jeffglaum jeffglaum moved this to In review in Embedded Controller Sep 30, 2025
@jerrysxie jerrysxie requested a review from Copilot September 30, 2025 15:52
Copy link

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 pull request completely rewrites the ec-slimloader project to use a persistent state journal system and ROM authentication instead of the previous descriptor-based approach. The PR transitions from a fixed memory address descriptor system to hardcoded slot layouts, employs the NXP MBI container format for image encoding, and introduces a comprehensive bootloader toolchain.

  • Replaces descriptor-based bootloader with state journal and ROM authentication
  • Introduces new library structure with separate concerns for state management, ROM APIs, and iMXRT support
  • Adds a complete bootloader toolchain for signing and managing images

Reviewed Changes

Copilot reviewed 84 out of 86 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/main.rs Completely removed old bootloader entry point
libs/ec-slimloader/src/lib.rs New async bootloader framework with Board trait
libs/ec-slimloader-state/src/state.rs State management with CRC-protected boot status
libs/ec-slimloader-imxrt/src/lib.rs iMXRT-specific Board implementation with authentication
bootloader-tool/src/main.rs New CLI toolchain for image signing and management
examples/rt685s/ Complete example implementation for RT685S EVK

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jerrysxie jerrysxie marked this pull request as ready for review October 1, 2025 14:25
@jerrysxie jerrysxie requested a review from a team as a code owner October 1, 2025 14:25
@jerrysxie jerrysxie marked this pull request as draft October 1, 2025 14:25
@jerrysxie jerrysxie marked this pull request as ready for review October 2, 2025 17:19
Copy link
Contributor

@jerrysxie jerrysxie left a comment

Choose a reason for hiding this comment

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

bootloader-tool is still missing CI coverage and README needs to be updated. But the core library looks good. Let's merge it in for now to unblock our partners and create issues to follow up.

bootloader-tool is marked as experimental and README is marked as outdated.

@jerrysxie jerrysxie merged commit eaa36d0 into OpenDevicePartnership:main Oct 2, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Embedded Controller Oct 2, 2025
jerrysxie added a commit that referenced this pull request Oct 8, 2025
Processing feedback from PR #19:
- [x] Fixed issue with `log` feature not compiling for /libs (added to
CI as well)
- [x] Renamed anonymous `N` const parameter to `BLOCK_SIZE` and
explained what it is for.
- [x] Reverted hard-copy `device-driver` generated manifest and fixed
building in CI.
- [x] Fix clippy warnings and formatting for `bootloader-tool`.
- [x] Added `bootloader-tool` to CI, with exception of `cargo deny`.
- [x] Moved away from `serde_yaml` and use `serde_json` instead for
`bootloader-tool`. (we are only serializing, and yaml is a superset of
json)

---------

Co-authored-by: Jerry Xie <139205137+jerrysxie@users.noreply.github.com>
jerrysxie added a commit that referenced this pull request Oct 13, 2025
With #19 the README's became vastly outdated. This short PR brings them
up to parity at least.

Co-authored-by: Jerry Xie <139205137+jerrysxie@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants