Skip to content

Conversation

@nordicjm
Copy link
Contributor

@nordicjm nordicjm commented Nov 13, 2024

Uses a temporary file for dts output then uses CMake to copy to the
correct file if it has changed. This prevents a ping-pong issue when
sysbuild is used of configuring and building cycle when nothing has
changed and there is sysbuild code which loads in the devicetree
data from an image

Copy link
Contributor

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

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

temporary blocking to allow further tests / investigations.

@nordicjm nordicjm force-pushed the sbdtsfile branch 2 times, most recently from f230669 to 43cac1d Compare November 13, 2024 15:33
tejlmand
tejlmand previously approved these changes Nov 14, 2024
Comment on lines 352 to 355
Copy link
Contributor

Choose a reason for hiding this comment

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

In general this is not only tied to sysbuild.

Touching any file during CMake configure time can trigger additional build steps later.
Build steps which may be unnecessary if there are no changes to the configure time generated file.

This may not only be related to dts.cmake, but can be true for other files created at configure time.
Therefore this is not fixing a sysbuild issue, sysbuild just happens to be impacted more by this fact than other parts of the system.

Long term a more general handling of such cases would be nice so that we don't regenerate a file in the first place instead of having to generate, compare and move.

@nordicjm nordicjm requested review from 57300 and tejlmand November 14, 2024 10:54
@nordicjm nordicjm changed the title cmake: dts: Use temporary file for dts.cmake with sysbuild cmake: dts: Use temporary file for dts.cmake Nov 14, 2024
57300
57300 previously approved these changes Nov 14, 2024
tejlmand
tejlmand previously approved these changes Nov 14, 2024
Uses a temporary file for dts output then uses CMake to copy to the
correct file if it has changed. This prevents a ping-pong issue when
sysbuild is used of configuring and building cycle when nothing has
changed and there is sysbuild code which loads in the devicetree
data from an image

Signed-off-by: Jamie McCrae <[email protected]>
@dkalowsk dkalowsk added this to the v4.1.0 milestone Nov 16, 2024
@nashif nashif merged commit ed8f613 into zephyrproject-rtos:main Nov 16, 2024
23 checks passed
@nordicjm nordicjm deleted the sbdtsfile branch February 26, 2025 10:43
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