Skip to content

Restructure Mbed TLS #13385

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 7 commits into from
Aug 12, 2020
Merged

Restructure Mbed TLS #13385

merged 7 commits into from
Aug 12, 2020

Conversation

gpsimenos
Copy link
Contributor

@gpsimenos gpsimenos commented Jul 31, 2020

Summary of changes

mbed-os/features/mbedtls directory moved to mbed-os/connectivity/mbedtls and restructured according to the internal proposal.

  • Public headers moved into mbed-os/connectivity/mbedtls/include/mbedtls
  • Greentea tests moved into mbed-os/connectivity/mbedtls/tests/TESTS
  • src renamed to source
  • inc renamed to include
  • Paths updated where necessary

This is one of a series of PRs aiming to clean up the mbed-os directory structure. The intention is to create a consistent tree among mbed components, following the below structure:

[component name]
├── mbed_lib.json                     // Each component comes with their own config that's appended to the App/System ├── config 
├── CMakeList.txt                     // This depends on the build system choices, part of another PREQ
├── README.md
├── include                           // The top-level include path
│   └── [component name]              // Public headers that can be accessed by the developers - `#include [component name]/*.h`
│       └── internal                  // Internal headers that implement or are included by a public header or are needed by other Mbed OS libraries - `#include [component name]/internal/*.h`
├── source                            // Source files and private headers, available only inside the component's source directory
└── tests
    ├── <framework>                   // <framework> test folder (for example CPPUTEST)
    │   └── <test suite one>          // Can be either source file or a directory
    ├── UNITTESTS                     // Unit tests (previously in UNITTESTS) folder using googletest framework (to be renamed to gtest at a later stage)
    │   └── <unit test suite one>     // Can be either source file or a directory
    └── TESTS                         // Greentea tests (previously in TESTS) folder (to be renamed to greentea at a later stage)
        └── <greentea test suite one> // Can be either source file or a directory
 
mbed-os
└── TESTS (to be renamed to greentea at a later stage)
    ├── integration   
    └── system

Impact of changes

None

Migration actions required

None


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
Build successes:
  * K64F::GCC_ARM::CONNECTIVITY-MBEDTLS-TESTS-TESTS-MBEDTLS-MULTI
  * K64F::GCC_ARM::CONNECTIVITY-MBEDTLS-TESTS-TESTS-MBEDTLS-SELFTEST

Reviewers

@evedon
@ashok-rao


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Jul 31, 2020
@ciarmcom ciarmcom requested review from ashok-rao and evedon July 31, 2020 15:00
@ciarmcom
Copy link
Member

@gpsimenos, thank you for your changes.
@ashok-rao @evedon @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested a review from a team July 31, 2020 15:00
Copy link
Contributor

@rajkan01 rajkan01 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

Generally target-specifc code goes into connectivity/drivers/. We didn't explicitly document this one but connectivity/mbedtls/targets/TARGET_* should be in connectivity/drivers/mbedtls/ IMO. And we'll need to add a number of missing mbed_lib.jsons to avoid issues on bare metal, like https://github.com/ARMmbed/mbed-os/pull/13379/files.

We can do this now or in the future in which case we need a ticket.

.astyleignore Outdated
@@ -10,7 +10,7 @@
^features/frameworks
^features/lwipstack/lwip
^features/lwipstack/lwip-sys
^features/mbedtls
^connectivity/mbedtls
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you reorder this alphabetically

@mergify
Copy link

mergify bot commented Aug 5, 2020

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

@gpsimenos
Copy link
Contributor Author

Conflicts resolved 😃
Let's run CI @adbridge

Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

LGTM

@adbridge
Copy link
Contributor

adbridge commented Aug 6, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Aug 6, 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_build-ARM
jenkins-ci/mbed-os-ci_build-GCC_ARM

@adbridge
Copy link
Contributor

adbridge commented Aug 6, 2020

@gpsimenos looks like related errors:

Compile [  0.2%]: aesni.c
[Fatal Error] platform_mbed.h@47,10: 'mbedtls_device.h' file not found
[ERROR] In file included from ./connectivity/mbedtls/source/aesni.c:28:
In file included from ./connectivity/mbedtls/include/mbedtls/config.h:31:
./connectivity/mbedtls/platform/inc/platform_mbed.h:47:10: fatal error: 'mbedtls_device.h' file not found
#include "mbedtls_device.h"
         ^~~~~~~~~~~~~~~~~~
1 error generated.

This was one baremetal build . Check the logs for further details.

@gpsimenos
Copy link
Contributor Author

@adbridge CI should pass now with fix above 🤞

@mergify
Copy link

mergify bot commented Aug 7, 2020

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

@adbridge
Copy link
Contributor

adbridge commented Aug 7, 2020

@gpsimenos looks like you now need a rebase...

@gpsimenos
Copy link
Contributor Author

@gpsimenos looks like you now need a rebase...

Done.

@LDong-Arm
Copy link
Contributor

Still looks good to me after the rebase, we just need another CI run. @adbridge

@adbridge
Copy link
Contributor

CI started

@mbed-ci
Copy link

mbed-ci commented Aug 10, 2020

Jenkins CI Test : ✔️ SUCCESS

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_build-ARM ✔️
jenkins-ci/mbed-os-ci_build-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️
jenkins-ci/mbed-os-ci_wisun-mesh-test ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@mergify
Copy link

mergify bot commented Aug 11, 2020

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

@gpsimenos
Copy link
Contributor Author

Rebased.

Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

LGTM

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 11, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Aug 11, 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_build-ARM ✔️
jenkins-ci/mbed-os-ci_build-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_wisun-mesh-test ✔️

@gpsimenos
Copy link
Contributor Author

Let's merge @0xc0170

@0xc0170 0xc0170 merged commit d32000d into ARMmbed:master Aug 12, 2020
@mergify mergify bot removed the ready for merge label Aug 12, 2020
@mbedmain mbedmain added release-version: 6.2.1 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Aug 16, 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.

8 participants