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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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

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]>
@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

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

Name Old Revision New Revision Diff
nrfxlib nrfconnect/sdk-nrfxlib@9f5da70 (main) nrfconnect/sdk-nrfxlib#1627 nrfconnect/sdk-nrfxlib#1627/files

DNM label due to: 1 project with PR revision

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: 1

Inputs:

Sources:

sdk-nrf: PR head: 1006d6c425505c089ba0c720bd9e2c622a3ed3f6
nrfxlib: PR head: b5f6fc0556dc04f6c40ff25288a9de6cc91ff3d3

more details

sdk-nrf:

PR head: 1006d6c425505c089ba0c720bd9e2c622a3ed3f6
merge base: cac49ac985664e9357e1c30691ce1091470c528b
target head (main): cac49ac985664e9357e1c30691ce1091470c528b
Diff

nrfxlib:

PR head: b5f6fc0556dc04f6c40ff25288a9de6cc91ff3d3
merge base: 9f5da703e838ec2e2e209d432a9e9d232ef04f47
target head (main): 9f5da703e838ec2e2e209d432a9e9d232ef04f47
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: b77d8c1312
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:b77d8c1312_912848a074

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

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 1849
  • ✅ 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_lwm2m
    • 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.

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. DNM manifest manifest-nrfxlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants