Modernize EC to embedded-services main#4
Open
dymk wants to merge 1 commit into
Open
Conversation
8d43637 to
aef5429
Compare
Bump the embedded-services git pin off the stale 62d4ea9 onto current
main (6d7dbbf, which carries the new default_mctp_serial constructor),
porting the shared mock to the new battery Registration model and the
new spawn_service! init-closure form.
platform-common/src/mock:
- battery.rs: rewrite to the fuel-gauge Registration model. The OEM
owns a Mutex<GlobalRawMutex, MockFuelGauge> and drives it directly;
the service is bs::Service::new(ArrayRegistration{..}). Replaces the
removed Device / MockBattery / execute_event API.
- thermal.rs: wrap the sensor and fan spawn_service! args in the new
|resources| Service::new(resources, InitParams{..}) closures.
- time_alarm.rs: switch to the positional tas::Service::new closure.
- mod.rs: update the relay-handler battery type argument.
Bump all five platform locks (dev-mec was at 5cc395f1) and add
crc / crc-catalog / embedded-mcu-hal 0.3.0 cargo-vet exemptions to the
four CI platforms (dev-mec has no supply-chain store). No per-platform
code changes: every platform consumes platform_common::mock only.
dev-qemu unifies embedded-mcu-hal on crates.io: time-alarm-service
(from embedded-services main), embassy-qemu-riscv, and dev-qemu's own
HID dep all use the crates.io 0.3.0 rather than mixing crates.io and
git sources of the identical crate, which collide on defmt's derive
symbols under LTO (surfaces only in the release build, not cargo check).
Unblocks dropping the F1.1 fork [patch] override.
Assisted-by: GitHub Copilot:claude-opus-4.8
aef5429 to
3563771
Compare
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.
What
Bump
odp-embedded-controlleroff the staleembedded-services@62d4ea9pin onto currentmain(6d7dbbf, which carries F1.0'sdefault_mctp_serialconstructor from OpenDevicePartnership/embedded-services#906), porting the shared mock to:bs::Service::new(ArrayRegistration{ fuel_gauges: [&Mutex<GlobalRawMutex, MockFuelGauge>] }); the OEM drives the fuel gauge directly viaupdate_dynamic_data()), replacing the removedDevice/MockBattery/execute_eventAPI; andspawn_service!init-closure form (|resources| Service::new(resources, InitParams{..})) for the thermal sensor/fan and time-alarm services.Why
The EC was 8 commits behind
embedded-servicesmain and could not consume the newdefault_mctp_serialconstructor. This bump unblocks dropping the temporary fork[patch]override in the dev-qemusp-serialwork.Scope
platform/platform-common/src/mock/{battery,thermal,time_alarm,mod}.rs.dev-qemu,dev-npcx,dev-imxrt,dev-mcxa,dev-mec); cargo-vet exemptions (crc 3.4.0,crc-catalog 2.5.0,embedded-mcu-hal 0.3.0) on the 4 CI platforms. No per-platform code changes — every platform consumesplatform_common::mockonly.dev-mec(not in the CI matrix) is lock-bumped for local-build consistency but has nosupply-chain/store, so it gets no exemptions.Verification
cargo check --locked+cargo clippy --locked: clean on all 5 platforms (host).cargo fmt --check: clean.cargo vet,cargo deny, feature-powerset, and thedev-qemuintegration-test.Note for follow-up
The battery mock now emits
MockFuelGaugevalues (3S Li-ion pack ~80%) rather than the oldMockBatteryconstants. The current green two-QEMU e2e asserts only thermalGetTmp(MockSensorvalues unchanged), so there's no regression; a future Battery two-QEMU e2e must assert against theMockFuelGaugevalues.Assisted-by: GitHub Copilot:claude-opus-4.8