Skip to content
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

Move SFDP to blockdevice #13917

Merged
merged 3 commits into from
Dec 10, 2020
Merged

Move SFDP to blockdevice #13917

merged 3 commits into from
Dec 10, 2020

Conversation

LDong-Arm
Copy link
Contributor

@LDong-Arm LDong-Arm commented Nov 18, 2020

Summary of changes

As SFDP is only used by [Q/O]SPIFBlockdevice, it should really belong to blockdevice.

Having SFDP removed from drivers, there's no need to have blockdevice in bare-metal anymore. But for compatibility with existing projects (e.g. mbed-bootloader), we don't do this clean up.

Impact of changes

Bare metal does not depend on blockdevice anymore.

Migration actions required

If a bare metal application uses blockdevice, it now needs to be listed in the requires field of mbed_app.json - it's not provided by baremetal anymore.

Documentation

None.


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@ARMmbed/mbed-os-core


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Nov 18, 2020
@ciarmcom ciarmcom requested review from a team November 18, 2020 11:30
@ciarmcom
Copy link
Member

@LDong-Arm, thank you for your changes.
@ARMmbed/mbed-os-core @ARMmbed/mbed-os-hal @ARMmbed/mbed-os-test @ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@evedon evedon left a comment

Choose a reason for hiding this comment

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

+1 for the cleanup but this should be treated as a breaking change.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 18, 2020

We already produced 6.5.0rc1 that includes f4b7f44#diff-490d1b3086e6701d59e391718c24ac8ed7d54c36490461ae9a6c22c8b6d3b6b2 . This partially reverts it? I wonder if this should be in rc2 or it goes in to the next release?

@LDong-Arm
Copy link
Contributor Author

LDong-Arm commented Nov 18, 2020

+1 for the cleanup but this should be treated as a breaking change.

What affects users is if they use BlockDevice, they need to ensure "blockdevice" is listed in "requires" in mbed_app.json. Is this enough to change the PR type to "major update"?

We already produced 6.5.0rc1 that includes f4b7f44#diff-490d1b3086e6701d59e391718c24ac8ed7d54c36490461ae9a6c22c8b6d3b6b2 . This partially reverts it? I wonder if this should be in rc2 or it goes in to the next release?

When will be RC2? If we still have some time, maybe we can review & merge this PR (should be a simple one) for RC2, then I'll update the CMake part in #13908 assuming it'll be in the next release?

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 18, 2020

rc2 only if we find critical issue during testing now. If yes, please talk to @adbridge

I assume this will be in the next release along with CMake updates to storage library.

@LDong-Arm
Copy link
Contributor Author

This is not a critical issue, so we can wait until the next release.

@evedon
Copy link
Contributor

evedon commented Nov 19, 2020

We already produced 6.5.0rc1 that includes f4b7f44#diff-490d1b3086e6701d59e391718c24ac8ed7d54c36490461ae9a6c22c8b6d3b6b2 . This partially reverts it? I wonder if this should be in rc2 or it goes in to the next release?

That change did not have an impact as it removed an implicit library dependency and converted it into an explicit dependency.

This new PR has an impact on bare metal since "blockdevice" is no longer listed in mbed_app.json. As Lingkai says, it will affect bare metal applications that use BlockDevice.

@LDong-Arm
Copy link
Contributor Author

Updated PR type and migration action in the description.

evedon
evedon previously approved these changes Nov 19, 2020
@mergify mergify bot added needs: CI and removed needs: work labels Nov 19, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 20, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Nov 20, 2020

Jenkins CI Test : ❌ FAILED

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest

@mergify mergify bot added needs: work and removed needs: CI labels Nov 20, 2020
LDong-Arm added a commit to LDong-Arm/mbed-bootloader that referenced this pull request Nov 20, 2020
Update BlockDevice dependency according to ARMmbed/mbed-os/pull/13917
LDong-Arm added a commit to LDong-Arm/mbed-bootloader that referenced this pull request Nov 20, 2020
Update BlockDevice dependency according to ARMmbed/mbed-os/pull/13917
@LDong-Arm
Copy link
Contributor Author

CI failures:

@mergify
Copy link

mergify bot commented Nov 26, 2020

This PR cannot be merged due to conflicts. Please rebase to resolve them.

@LDong-Arm LDong-Arm changed the title Move SFDP to blockdevice, remove bare metal's dependency on blockdevice Move SFDP to blockdevice Nov 26, 2020
@mergify mergify bot dismissed evedon’s stale review November 26, 2020 17:38

Pull request has been modified.

@LDong-Arm
Copy link
Contributor Author

I've updated the PR to not remove blockdevice from bare-metal, for computability reasons. So now this PR has nothing to do with bare-metal anymore.

0xc0170
0xc0170 previously approved these changes Dec 3, 2020
@mergify mergify bot added needs: CI and removed needs: work labels Dec 3, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Dec 7, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 7, 2020

Jenkins CI Test : ❌ FAILED

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️

@LDong-Arm
Copy link
Contributor Author

I need to move unit tests too

@LDong-Arm
Copy link
Contributor Author

Unit tests fixed

@mergify mergify bot dismissed 0xc0170’s stale review December 7, 2020 12:07

Pull request has been modified.

@mbed-ci
Copy link

mbed-ci commented Dec 9, 2020

Jenkins CI Test : ✔️ SUCCESS

Build Number: 3 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

Now that SFDP is in blockdevice, why not device key? it's the last piece in the drivers.

@LDong-Arm
Copy link
Contributor Author

Now that SFDP is in blockdevice, why not device key? it's the last piece in the drivers.

SFDP is an internal utility so we are free to move it around, but DeviceKey is a public API and we don't want to introduce breaking changes. In my opinion, DeviceKey is also a kind of platform feature, and the best place for it is debatable.

@0xc0170 0xc0170 merged commit be295e4 into ARMmbed:master Dec 10, 2020
@mergify mergify bot removed the ready for merge label Dec 10, 2020
@mbedmain mbedmain added release-version: 6.6.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants