Skip to content

Commit

Permalink
doc: Remove documentation for child/parent image
Browse files Browse the repository at this point in the history
Removes documentation for this now removed feature

Signed-off-by: Jamie McCrae <[email protected]>
  • Loading branch information
nordicjm committed Jan 21, 2025
1 parent 42ebbf2 commit 9ba8d6e
Show file tree
Hide file tree
Showing 76 changed files with 257 additions and 1,292 deletions.
2 changes: 1 addition & 1 deletion applications/nrf5340_audio/tools/buildprog/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __populate_uicr(dev):
def _program_cores(dev: DeviceConf) -> int:
if dev.core_net_programmed == SelectFlags.TBD:
if not path.isfile(dev.hex_path_net):
print("NET core hex not found. Built as APP core child image.")
print("NET core hex not found. Built as APP core image.")
return 1

print(f"Programming net core on: {dev}")
Expand Down
4 changes: 2 additions & 2 deletions cmake/extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ endfunction()
#
# NCS file function extension.
# This function extends the zephyr_file(CONF_FILES <arg>) function to support
# switching BOARD for child images.
# switching BOARD for images.
#
# It also supports lookup of static partition manager files for based on
# the board name, revision, and the current build type.
Expand Down Expand Up @@ -349,7 +349,7 @@ endfunction()
# Usage
# get_shared(<var> IMAGE <img> PROPERTY <property>)
#
# Get a property value defined by the child image or domain <img> if it exists.
# Get a property value defined by an image or domain <img> if it exists.
# The property value will be returned in the variable referenced by <var>.
#
# Example usage 'get_shared(prop_value IMAGE child PROPERTY property_in_child)'
Expand Down
159 changes: 1 addition & 158 deletions cmake/sysbuild/partition_manager.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -366,32 +366,19 @@ function(update_runner)
sysbuild_cache(CREATE APPLICATION ${RUNNER_IMAGE})
endfunction()


# APP is a special domain which is handled differently.
# Remove it from the list.
get_property(PM_DOMAINS GLOBAL PROPERTY PM_DOMAINS)
list(REMOVE_ITEM PM_DOMAINS APP)

## Check if current image is the dynamic partition in its domain.
## I.E. it is the only partition without a statically configured size in this
## domain. This is equivalent to the 'app' partition in the root domain.
##
## The dynamic partition is specified by the parent domain (i.e. the domain
## which creates the current domain through 'create_domain_image()'.
#if(DEFINED ${DOMAIN}_PM_DOMAIN_DYNAMIC_PARTITION
# AND "${IMAGE_NAME}" STREQUAL "${${DOMAIN}_PM_DOMAIN_DYNAMIC_PARTITION}"
#)
# set(is_dynamic_partition_in_domain TRUE)
#endif()

get_property(PM_IMAGES GLOBAL PROPERTY PM_IMAGES)
get_property(PM_SUBSYS_PREPROCESSED GLOBAL PROPERTY PM_SUBSYS_PREPROCESSED)

# This file is executed once per domain.
#
# It will be executed if one of the following criteria is true for the
# current image:
# - It's a child image, and is the dynamic partition in the domain
# - It's a secondary image, and is the dynamic partition in the domain
# - It's the root image, and a static configuration has been provided
# - It's the root image, and PM_IMAGES is populated.
# - It's the root image, and other domains exist.
Expand All @@ -410,24 +397,8 @@ else()
)
endif()

# Image files, those should be queried from actual image.
# Add the dynamic partition as an image partition.
#set_property(GLOBAL PROPERTY
# ${dynamic_partition}_PM_HEX_FILE
# ${PROJECT_BINARY_DIR}/${KERNEL_HEX_NAME}
# )
#
#set_property(GLOBAL PROPERTY
# ${dynamic_partition}_PM_TARGET
# ${logical_target_for_zephyr_elf}
# )

# Prepare the input_files, header_files, and images lists
set(generated_path include/generated)
# ToDo: In child image, this happens to each domain parent.
# In parent image, it only happen to direct children, not children of children.
# This must be adjusted into:
# Explicitly add the main dynamic partition image
sysbuild_get(${DEFAULT_IMAGE}_input_files IMAGE ${DEFAULT_IMAGE} VAR PM_YML_FILES CACHE)
sysbuild_get(${DEFAULT_IMAGE}_binary_dir IMAGE ${DEFAULT_IMAGE} VAR ZEPHYR_BINARY_DIR CACHE)
list(APPEND prefixed_images ":${dynamic_partition}")
Expand Down Expand Up @@ -568,8 +539,6 @@ foreach(d APP ${PM_DOMAINS})
DEFAULT_DRIVER_KCONFIG ${soc_nvs_controller_driver_kc}
DOMAIN ${d}
)


endforeach()

sysbuild_get(ext_flash_enabled IMAGE ${DEFAULT_IMAGE} VAR CONFIG_PM_EXTERNAL_FLASH_ENABLED KCONFIG)
Expand Down Expand Up @@ -623,38 +592,8 @@ partition_manager(IN_FILES ${input_files} REGIONS ${regions})
foreach(d ${PM_DOMAINS})
get_property(image_name GLOBAL PROPERTY DOMAIN_APP_${d})
partition_manager(DOMAIN ${d} IN_FILES ${${d}_input_files} REGIONS ${${d}_regions})

# foreach(d ${PM_DOMAINS})
# # Should list be adjust to domain image list ?
# # In files must be adjust according to image being built/
# partition_manager(DOMAIN ${d} IN_FILES ${${d}_input_files} REGIONS ${domain_regions})
# endforeach()
endforeach()

# Start - Code related to network core update. Multi image updates are part of NCSDK-17807
#if (CONFIG_SECURE_BOOT AND CONFIG_BOOTLOADER_MCUBOOT)
# # Create symbols for the offsets required for moving test update hex files
# # to MCUBoots secondary slot. This is needed because objcopy does not
# # support arithmetic expressions as argument (e.g. '0x100+0x200'), and all
# # of the symbols used to generate the offset is only available as a
# # generator expression when MCUBoots cmake code exectues. This because
# # partition manager is performed as the last step in the configuration stage.
# math(EXPR s0_offset "${PM_MCUBOOT_SECONDARY_ADDRESS} - ${PM_S0_ADDRESS}")
# math(EXPR s1_offset "${PM_MCUBOOT_SECONDARY_ADDRESS} - ${PM_S1_ADDRESS}")
#
# set_property(
# TARGET partition_manager
# PROPERTY s0_TO_SECONDARY
# ${s0_offset}
# )
# set_property(
# TARGET partition_manager
# PROPERTY s1_TO_SECONDARY
# ${s1_offset}
# )
#endif()
# End - Code related to network core update. Multi image updates are part of NCSDK-17807

# Always add main partition file to list.
list(APPEND pm_out_partition_file ${APPLICATION_BINARY_DIR}/partitions.yml)
list(APPEND pm_out_region_file ${APPLICATION_BINARY_DIR}/regions.yml)
Expand Down Expand Up @@ -719,78 +658,6 @@ else()
endif()
endforeach()

# Start - Code related to network core update. Multi image updates are part of NCSDK-17807
# if (CONFIG_BOOTLOADER_MCUBOOT)
# # Create symbols for the offset required for moving the signed network
# # core application to MCUBoots secondary slot. This is needed
# # because objcopy does not support arithmetic expressions as argument
# # (e.g. '0x100+0x200'), and all of the symbols used to generate the
# # offset are only available as a generator expression when MCUBoots
# # cmake code executes.
#
# # Check if a signed version of the network core application is defined.
# # If so, this indicates that we need to support firmware updates on the
# # network core. This again means that we should generate the required
# # hex files.
# get_shared(cpunet_signed_app_hex IMAGE CPUNET PROPERTY PM_SIGNED_APP_HEX)
#
# if (CONFIG_NRF53_UPGRADE_NETWORK_CORE
# AND DEFINED cpunet_signed_app_hex)
# # The address coming from other domains are not available in this scope
# # since it is imported by a different domain. Hence, it must be fetched
# # through the 'partition_manager' target.
# get_target_property(net_app_addr partition_manager CPUNET_PM_APP_ADDRESS)
#
# get_shared(
# mcuboot_NRF53_MULTI_IMAGE_UPDATE
# IMAGE mcuboot
# PROPERTY NRF53_MULTI_IMAGE_UPDATE
# )
#
# # Check if multi image updates are enabled, in which case we need
# # to use the "_1" variant of the secondary partition for the network core.
# if(DEFINED mcuboot_NRF53_MULTI_IMAGE_UPDATE)
# set(sec_slot_idx "_1")
# endif()
#
# # Calculate the offset from the address which the net/app core app is linked
# # against to the secondary slot. We need these values to generate hex files
# # which targets the secondary slot.
# math(EXPR net_app_to_secondary
# "${xip_addr} \
# + ${PM_MCUBOOT_SECONDARY${sec_slot_idx}_ADDRESS} \
# - ${net_app_addr} \
# + ${PM_MCUBOOT_PAD_SIZE}"
# )
#
# set_property(
# TARGET partition_manager
# PROPERTY net_app_TO_SECONDARY
# ${net_app_to_secondary}
# )
#
# # This value is needed by `imgtool.py` which is used to sign the images.
# set_property(
# TARGET partition_manager
# PROPERTY net_app_slot_size
# ${PM_MCUBOOT_SECONDARY${sec_slot_idx}_SIZE}
# )
# endif()
#
# math(EXPR app_to_secondary
# "${xip_addr} \
# + ${PM_MCUBOOT_SECONDARY_ADDRESS} \
# - ${PM_MCUBOOT_PRIMARY_ADDRESS}"
# )
#
# set_property(
# TARGET partition_manager
# PROPERTY app_TO_SECONDARY
# ${app_to_secondary}
# )
# endif()
# End - Code related to network core update. Multi image updates are part of NCSDK-17807

# Explicitly add the root image domain hex file to the list
list(APPEND domain_hex_files ${CMAKE_BINARY_DIR}/${merged}.hex)
list(APPEND global_hex_depends ${merged}_hex)
Expand Down Expand Up @@ -838,30 +705,6 @@ else()
COMMAND_EXPAND_LISTS
)

# ToDo: do we still want to merge hex files for all the domains ?
# if (PM_DOMAINS)
# # For convenience, generate global hex file containing all domains' hex
# # files.
# set(final_merged ${PROJECT_BINARY_DIR}/merged_domains.hex)
#
# # Add command to merge files.
# add_custom_command(
# OUTPUT ${final_merged}
# COMMAND
# ${PYTHON_EXECUTABLE}
# ${ZEPHYR_BASE}/scripts/build/mergehex.py
# -o ${final_merged}
# ${domain_hex_files}
# DEPENDS
# ${domain_hex_files}
# ${global_hex_depends}
# )
#
# # Wrapper target for the merge command.
# add_custom_target(merged_domains_hex ALL DEPENDS ${final_merged})
# endif()

set(ZEPHYR_RUNNER_CONFIG_KERNEL_HEX "${final_merged}"
CACHE STRING "Path to merged image in Intel Hex format" FORCE)

endif()
10 changes: 0 additions & 10 deletions doc/_utils/redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@
("config_and_build/companion_components", "app_dev/companion_components"), # Using companion components
("config_and_build/output_build_files", "app_dev/config_and_build/output_build_files"), # Output build files (image files)
("config_and_build/configuring_app/output_build_files", "app_dev/config_and_build/output_build_files"),
("ug_multi_image", "app_dev/config_and_build/multi_image"), # Multi-image build using child and parent images
("app_dev/multi_image/index", "app_dev/config_and_build/multi_image"),
("config_and_build/multi_image", "app_dev/config_and_build/multi_image"),
("ug_fw_update", "app_dev/bootloaders_dfu/index"), # Firmware updates (removed after 2.5.0)
("app_dev/bootloaders_and_dfu/fw_update", "app_dev/bootloaders_dfu/index"),
("config_and_build/bootloaders_and_dfu/fw_update", "app_dev/bootloaders_dfu/index"),
Expand All @@ -104,19 +101,13 @@
("config_and_build/bootloaders_and_dfu/index", "app_dev/bootloaders_dfu/index"),
("config_and_build/bootloaders_dfu/index", "app_dev/bootloaders_dfu/index"),
("config_and_build/bootloaders_dfu/mcuboot_nsib/bootloader_mcuboot_nsib", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_mcuboot_nsib"), # MCUboot and NSIB (landing)
("ug_bootloader_testing", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_mcuboot_nsib"), # Testing the bootloader chain (removed after 2.7.0)
("app_dev/bootloaders_and_dfu/bootloader_testing", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_mcuboot_nsib"),
("config_and_build/bootloaders_and_dfu/bootloader_testing", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_mcuboot_nsib"),
("config_and_build/bootloaders/bootloader_testing", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_mcuboot_nsib"),
("config_and_build/bootloaders/bootloader_quick_start", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_quick_start"), # Quick start guide
("config_and_build/bootloaders_dfu/mcuboot_nsib/bootloader_quick_start", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_quick_start"),
("config_and_build/bootloaders/bootloader_adding_sysbuild", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_adding_sysbuild"), # Enabling a bootloader chain using sysbuild
("config_and_build/bootloaders_dfu/mcuboot_nsib/bootloader_adding_sysbuild", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_adding_sysbuild"),
("ug_bootloader_adding", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_adding"), # "Enabling a bootloader chain using child and parent images (deprecated)"
("app_dev/bootloaders_and_dfu/bootloader_adding", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_adding"),
("config_and_build/bootloaders_and_dfu/bootloader_adding", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_adding"),
("config_and_build/bootloaders/bootloader_adding", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_adding"),
("config_and_build/bootloaders_dfu/mcuboot_nsib/bootloader_adding", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_adding"),
("ug_bootloader", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader"), # Secure bootloader chain
("app_dev/bootloaders_and_dfu/bootloader", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader"),
("config_and_build/bootloaders_and_dfu/bootloader", "app_dev/bootloaders_dfu/mcuboot_nsib/bootloader"),
Expand Down Expand Up @@ -222,7 +213,6 @@
("device_guides/nrf53/features_nrf53", "app_dev/device_guides/nrf53/features_nrf53"), # Features of nRF53 Series
("device_guides/nrf53/building_nrf53", "app_dev/device_guides/nrf53/building_nrf53"), # Building and programming with nRF53 Series
("device_guides/nrf53/fota_update_nrf5340", "app_dev/device_guides/nrf53/fota_update_nrf5340"), # FOTA updates with nRF5340 DK
("device_guides/nrf53/multi_image_nrf5340", "app_dev/device_guides/nrf53/multi_image_nrf5340"), # Multi-image builds on the nRF5340 DK using child and parent images
("device_guides/nrf53/simultaneous_multi_image_dfu_nrf5340", "app_dev/device_guides/nrf53/simultaneous_multi_image_dfu_nrf5340"), # Simultaneous multi-image DFU with nRF5340 DK
("device_guides/nrf53/serial_recovery", "app_dev/device_guides/nrf53/serial_recovery"), # MCUboot’s serial recovery of the networking core image
("device_guides/nrf53/logging_nrf5340", "app_dev/device_guides/nrf53/logging_nrf5340"), # Getting logging output with nRF5340 DK
Expand Down
1 change: 0 additions & 1 deletion doc/_zoomin/ncs.tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ mapping_topics:
- nrf/app_dev/device_guides/nrf53/building_nrf53.html: ["nrf5340", "development-kits",
"nrf-connect-vsc"]
- nrf/app_dev/device_guides/nrf53/fota_update_nrf5340.html: ["nrf5340", "development-kits"]
- nrf/app_dev/device_guides/nrf53/multi_image_nrf5340.html: ["nrf5340", "development-kits"]
- nrf/app_dev/device_guides/nrf53/simultaneous_multi_image_dfu_nrf5340.html: ["nrf5340",
"development-kits"]
- /nrf/app_dev/device_guides/nrf53/serial_recovery.html: ["nrf5340", "development-kits"]
Expand Down
5 changes: 2 additions & 3 deletions doc/nrf/app_dev/bootloaders_dfu/mcuboot_nsib/bootloader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ The |NCS| currently supports two implementations:
.. figure:: ../images/bootloader_memory_layout.svg
:alt: Memory layout

By default, building an application with any bootloader configuration creates a :ref:`multi-image build <ug_multi_image>`, where the :ref:`partition_manager` manages its memory partitions.
In this case, bootloaders are built as child images.
By default, building an application with any bootloader configuration used :ref:`sysbuild` to build multiple image, where the :ref:`partition_manager` manages its memory partitions.
When building an application with :ref:`Cortex-M Security Extensions (CMSE) enabled <app_boards_spe_nspe_cpuapp_ns>`, then :ref:`Trusted Firmware-M (TF-M) <ug_tfm>` is built with the image automatically.
From the bootloader perspective, the TF-M is part of the booted application image.

Expand Down Expand Up @@ -96,7 +95,7 @@ More specifically, the immutable bootloader always performs the following steps

The next stage in the boot chain can either be an application or another bootloader.
Firmware images have a version number, and the bootloader will select the slot with the latest firmware.
For more information about creating a second-stage bootloader, see :ref:`ug_bootloader_adding_upgradable`.
For more information about creating a second-stage bootloader, see :ref:`ug_bootloader_adding_sysbuild_upgradable`.

#. Verification of the next stage in the boot chain.

Expand Down
Loading

0 comments on commit 9ba8d6e

Please sign in to comment.