zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.42k stars 6.39k forks source link

TF-M: builds download source from external git repository #76090

Closed JordanYates closed 1 month ago

JordanYates commented 1 month ago

Describe the bug

Since the update to TFM v2.1.0, any builds of TF-M are cloning down sources from this repo: https://github.com/ARM-software/CMSIS_6

Offending commit: https://github.com/zephyrproject-rtos/trusted-firmware-m/commit/3d54aca3851590bf5ecf5f52f361b390c925e257

To Reproduce

west build -b nrf9161dk/nrf9161/ns zephyr/samples/hello_world/ -p Observe:

...
-- Build files have been written to: /home/jordan/code/zephyr/build/tfm/lib/ext/cmsis-subbuild
[1/9] Creating directories for 'cmsis-populate'
[1/9] Performing download step (git clone) for 'cmsis-populate'
Cloning into 'cmsis-src'...
remote: Enumerating objects: 28525, done.
remote: Counting objects: 100% (3662/3662), done.
remote: Compressing objects: 100% (977/977), done.
remote: Total 28525 (delta 3071), reused 3002 (delta 2624), pack-reused 24863
Receiving objects: 100% (28525/28525), 39.74 MiB | 5.76 MiB/s, done.
Resolving deltas: 100% (21001/21001), done.
HEAD is now at d0c460c1 CMSIS-Core(M): Add Cortex-M52 support : add core_m52.h
[2/9] Performing update step for 'cmsis-populate'
...

Expected behavior

Builds should not be pulling down sources from the internet. Builds should complete regardless of internet connectivity state.

Impact

"Untrusted" (Not zephyrproject) source being pulled down from the internet on each build. Unable to build TF-M applications without an internet connection. 40MB download for every TF-M build in CI. Feels like it violates some sort of Zephyr guideline, or should.

Environment (please complete the following information):

~/code/zephyr/zephyr$ git describe
v3.7.0-rc3-73-gac52bd629d7
tomi-font commented 1 month ago

https://github.com/zephyrproject-rtos/zephyr/pull/76094 is a quick fix. The proper way would be to fork the CMSIS v6 repository and add it as a new West project to Zephyr.

fabiobaltieri commented 1 month ago

cc @nashif @aescolar

henrikbrixandersen commented 1 month ago

Adding the TSC label as @d3zd3z requested this to be mentioned to the TSC.

marc-hb commented 1 month ago

This was flagged in #70215 and other places before.

tomi-font commented 1 month ago

This was flagged in #70215 and other places before.

I don't think it's the same issue there. The issue here was introduced by TF-M 2.1.0, which came way after the creation of the issue you are referencing.