Add GPT iterator
To enable a FWU configuration to be derived from the GPT created by
a platform integrator, it is necessary to iterate over GPT entries
and to identify entries that correspond to updatable firmware
partitions. This relies on the ability to read the partition type
guid to detemine the purpose of the partition. This commit adds
an iterator that allows the raw partition table to be iterated
over to make all needed information available to support FWU
configuration.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I283788fa12d999381a2e649d6b4f8ea6aea6b124
diff --git a/components/media/disk/gpt_iterator/component.cmake b/components/media/disk/gpt_iterator/component.cmake
new file mode 100644
index 0000000..a2f74c8
--- /dev/null
+++ b/components/media/disk/gpt_iterator/component.cmake
@@ -0,0 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+if (NOT DEFINED TGT)
+ message(FATAL_ERROR "mandatory parameter TGT is not defined.")
+endif()
+
+target_sources(${TGT} PRIVATE
+ "${CMAKE_CURRENT_LIST_DIR}/gpt_iterator.c"
+)
\ No newline at end of file