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

nrf_security: Fix dependency for threading_alt.h #19754

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

Vge0rge
Copy link
Contributor

@Vge0rge Vge0rge commented Jan 6, 2025

This fixes a dependency when including the threading_alt.h
from nrf_security.

The CC3XX platform library provides the implementation of the
mbedtls_mutex functions and it expects the mbedTLS mutexes to be of
type nrf_cc3xx_platform_mutex_t.
The definitions of the mutexes included in the files
nrf_cc3xx_platform_mutex_(zephyr/freertos).c

The threading_alt.c in nrf_security defines the mbedTLS mutexes
as Zephyr mutexes (k_mutex). This doesn't work when the CC3XX
platform library is used, so here this dependency is added.

Ref: NCSDK-31155

@Vge0rge Vge0rge requested review from a team as code owners January 6, 2025 12:44
@github-actions github-actions bot added manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Jan 6, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jan 6, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
nrfxlib nrfconnect/sdk-nrfxlib@3189339 nrfconnect/sdk-nrfxlib@de671be (main) nrfconnect/[email protected]

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jan 6, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 3

Inputs:

Sources:

sdk-nrf: PR head: e14a45d378fb0118153cfa3ded273583731259fc
nrfxlib: PR head: de671be0d84ffd92a7643b18a4dd64b735a4e028

more details

sdk-nrf:

PR head: e14a45d378fb0118153cfa3ded273583731259fc
merge base: 4cf924e9b70ec20f7bdcc88b61ee4abbb9ff8af6
target head (main): f38d3119502c014935538628b3305009dd0697ff
Diff

nrfxlib:

PR head: de671be0d84ffd92a7643b18a4dd64b735a4e028
merge base: 3189339e38f52a92098945a3c7f070810a067390
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (4)
nrfxlib
│  ├── crypto
│  │  ├── nrf_cc310_platform
│  │  │  ├── include
│  │  │  │  │ threading_alt.h
│  │  ├── nrf_cc312_platform
│  │  │  ├── include
│  │  │  │  │ threading_alt.h
subsys
│  ├── nrf_security
│  │  ├── src
│  │  │  ├── threading
│  │  │  │  │ threading.cmake
west.yml

Outputs:

Toolchain

Version:
Build docker image:

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain
  • ◻️ Build twister
  • ◻️ Integration tests
    • ◻️ test-fw-nrfconnect-chip
    • ◻️ test-fw-nrfconnect-nrf_crypto
    • ◻️ test-fw-nrfconnect-tfm
    • ◻️ test-fw-nrfconnect-thread
    • ◻️ test-sdk-find-my
    • ◻️ test-sdk-sidewalk
    • ◻️ test-sdk-wifi
    • ◻️ test-sdk-dfu
    • ⚠️ test-fw-nrfconnect-nrf-iot_cloud
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publish GitHub Action.

@Vge0rge Vge0rge requested a review from a team January 10, 2025 09:08
Copy link
Contributor

@tomi-font tomi-font left a comment

Choose a reason for hiding this comment

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

Seems you are missing a word or so in this sentence:

The definitions of the mutexes included in the files
nrf_cc3xx_platform_mutex_(zephyr/freertos).c

@PerMac
Copy link
Contributor

PerMac commented Jan 10, 2025

Edit: Apparently, this is another issue:
It seems to not fix the issue. I run it with twister in the docker used in the CI and got:

lto-wrapper: warning: using serial compilation of 29 LTRANS jobs
lto-wrapper: note: see the '-flto' option documentation for more information
/home/ncs/toolchains/b77d8c1312/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /tmp/ccLi0L6I.ltrans27.ltrans.o: in function `otPlatLog.constprop.0':
/home/maciej/Projects/NCS/zephyr/include/zephyr/logging/log_core.h:514: undefined reference to `z_log_msg_runtime_vcreate'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FAILED: _sysbuild/sysbuild/images/shell-prefix/src/shell-stamp/shell-build /home/maciej/Projects/NCS/twister-out/nrf7002dk_nrf5340_cpuapp/wifi/shell/sample.nrf7002.shell.otbr/_sysbuild/sysbuild/images/shell-prefix/src/shell-stamp/shell-build 
cd /home/maciej/Projects/NCS/twister-out/nrf7002dk_nrf5340_cpuapp/wifi/shell/sample.nrf7002.shell.otbr/shell && /home/ncs/toolchains/b77d8c1312/usr/local/bin/cmake --build .
ninja: build stopped: subcommand failed.

@Vge0rge
Copy link
Contributor Author

Vge0rge commented Jan 13, 2025

ping @nrfconnect/ncs-co-build-system @nrfconnect/ncs-code-owners

Updates nrfxlib which moves the threading_alt.h
to the CC3XX platform folder.

Ref: NCSDK-31155

Signed-off-by: Georgios Vasilakis <[email protected]>
This fixes a dependency when including the threading_alt.h
from nrf_security.

The CC3XX platform library provides the implementation of the
mbedtls_mutex functions and it expects the mbedTLS mutexes to be of
type nrf_cc3xx_platform_mutex_t.
The definitions of the mutexes included in the files
nrf_cc3xx_platform_mutex_(zephyr/freertos).c

The threading_alt.c in nrf_security defines the mbedTLS mutexes
as Zephyr mutexes (k_mutex). This doesn't work when the CC3XX
platform library is used, so here this dependency is added.

Ref: NCSDK-31155

Signed-off-by: Georgios Vasilakis <[email protected]>
@NordicBuilder NordicBuilder removed the DNM label Jan 14, 2025
@carlescufi carlescufi merged commit 1eef98d into nrfconnect:main Jan 14, 2025
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. manifest manifest-nrfxlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants