@@ -80,39 +80,7 @@ function(get_board_without_ns_suffix board_in board_out)
80
80
endif ()
81
81
endfunction ()
82
82
83
- # Add an overlay file to a child image.
84
- # This can be used by a parent image to set overlay of Kconfig configuration or devicetree
85
- # in its child images. This function must be called before 'add_child_image(image)'
86
- # to have effect.
87
- #
88
- # Parameters:
89
- # 'image' - child image name
90
- # 'overlay_file' - overlay to be added to child image
91
- # 'overlay_type' - 'OVERLAY_CONFIG' or 'DTC_OVERLAY_FILE'
92
- function (add_overlay image overlay_file overlay_type)
93
- set (old_overlays ${${image} _${overlay_type} })
94
- string (FIND "${old_overlays} " "${overlay_file} " found)
95
- if (${found} EQUAL -1)
96
- set (${image} _${overlay_type} "${old_overlays} ;${overlay_file} " CACHE STRING
97
- "Extra config fragments for ${image} child image" FORCE
98
- )
99
- endif ()
100
- endfunction ()
101
-
102
- # Convenience macro to add configuration overlays to child image.
103
- macro (add_overlay_config image overlay_file)
104
- add_overlay(${image} ${overlay_file} EXTRA_CONF_FILE)
105
- endmacro ()
106
-
107
- # Convenience macro to add device tree overlays to child image.
108
- macro (add_overlay_dts image overlay_file)
109
- add_overlay(${image} ${overlay_file} EXTRA_DTC_OVERLAY_FILE)
110
- endmacro ()
111
-
112
83
# Add a partition manager configuration file to the build.
113
- # Note that is only one image is included in the build,
114
- # you must set CONFIG_PM_SINGLE_IMAGE=y for the partition manager
115
- # configuration to take effect.
116
84
function (ncs_add_partition_manager_config config_file)
117
85
get_filename_component (pm_path ${config_file} REALPATH)
118
86
get_filename_component (pm_filename ${config_file} NAME )
@@ -353,59 +321,13 @@ function(set_shared)
353
321
set (multi_args "PROPERTY" )
354
322
cmake_parse_arguments (SHARE "${flags} " "${single_args} " "${multi_args} " ${ARGN} )
355
323
356
- if (SYSBUILD)
357
- # Sysbuild can read the cache directly, no reason for an extra share file.
358
- list (POP_FRONT SHARE_PROPERTY listname)
359
- if (SHARE_APPEND)
360
- list (APPEND ${listname} ${SHARE_PROPERTY} )
361
- list (REMOVE_DUPLICATES ${listname} )
362
- set (SHARE_PROPERTY ${${listname} })
363
- endif ()
364
- set (${listname} "${SHARE_PROPERTY} " CACHE INTERNAL "shared var" )
365
- return ()
366
- endif ()
367
-
368
- check_arguments_required("set_shared" SHARE IMAGE FILE)
369
-
370
- check_arguments_exclusive("set_shared" SHARE FILE IMAGE PROPERTY APPEND )
371
- check_arguments_exclusive("set_shared" SHARE IMAGE FILE)
372
-
373
-
374
- set (prop_target ${IMAGE_NAME} _shared_property_target)
375
- if (NOT TARGET ${prop_target} )
376
- add_custom_target (${prop_target} )
377
- endif ()
378
-
379
- if (DEFINED SHARE_IMAGE)
380
- # When using IMAGE, then PROPERTY is also required.
381
- check_arguments_required("set_shared" SHARE PROPERTY)
382
-
383
- set (share_prop_target ${SHARE_IMAGE} _shared_property_target)
384
-
385
- if (SHARE_APPEND)
386
- set (SHARE_APPEND APPEND )
387
- else ()
388
- set (SHARE_APPEND)
389
- endif ()
390
-
391
- get_property (string_targets TARGET ${prop_target} PROPERTY image_targets)
392
- if (NOT "add_custom_target(${share_prop_target} )" IN_LIST string_targets)
393
- set_property (
394
- TARGET ${prop_target} APPEND PROPERTY
395
- image_targets "add_custom_target(${share_prop_target} )"
396
- )
397
- endif ()
398
-
399
- set_property (TARGET ${prop_target} APPEND_STRING PROPERTY shared_vars
400
- "set_property(TARGET ${share_prop_target} ${SHARE_APPEND} PROPERTY ${SHARE_PROPERTY} )\n "
401
- )
402
- endif ()
403
-
404
- if (DEFINED SHARE_FILE)
405
- set_property (TARGET ${prop_target} APPEND_STRING PROPERTY shared_vars
406
- "include(${SHARE_FILE} )\n "
407
- )
324
+ list (POP_FRONT SHARE_PROPERTY listname)
325
+ if (SHARE_APPEND)
326
+ list (APPEND ${listname} ${SHARE_PROPERTY} )
327
+ list (REMOVE_DUPLICATES ${listname} )
328
+ set (SHARE_PROPERTY ${${listname} })
408
329
endif ()
330
+ set (${listname} "${SHARE_PROPERTY} " CACHE INTERNAL "shared var" )
409
331
endfunction ()
410
332
411
333
# generate_shared(IMAGE <img> FILE <file>)
0 commit comments