code-update: Add interface for MultipartUpdate

This commit adds interface to identify the multi part update
to delegate the code update with the multi part image when no
firmware targets are specified.

The design doc update on how to handle multi part image when
no firmware targets are specified.
https://gerrit.openbmc.org/c/openbmc/docs/+/76645

Change-Id: I34581dedf2cf9c21619c64a7f07e531578cf317c
Signed-off-by: Tom Joseph <rushtotom@gmail.com>
diff --git a/gen/xyz/openbmc_project/Software/MultipartUpdate/meson.build b/gen/xyz/openbmc_project/Software/MultipartUpdate/meson.build
new file mode 100644
index 0000000..6266158
--- /dev/null
+++ b/gen/xyz/openbmc_project/Software/MultipartUpdate/meson.build
@@ -0,0 +1,40 @@
+# Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Software/MultipartUpdate'
+
+generated_sources += custom_target(
+    'xyz/openbmc_project/Software/MultipartUpdate__cpp'.underscorify(),
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/Software/MultipartUpdate.interface.yaml',
+    ],
+    output: [
+        'common.hpp',
+        'server.hpp',
+        'server.cpp',
+        'aserver.hpp',
+        'client.hpp',
+    ],
+    depend_files: sdbusplusplus_depfiles,
+    command: [
+        sdbuspp_gen_meson_prog,
+        '--command',
+        'cpp',
+        '--output',
+        meson.current_build_dir(),
+        '--tool',
+        sdbusplusplus_prog,
+        '--directory',
+        meson.current_source_dir() / '../../../../../yaml',
+        'xyz/openbmc_project/Software/MultipartUpdate',
+    ],
+    install: should_generate_cpp,
+    install_dir: [
+        get_option('includedir') / sdbusplus_current_path,
+        get_option('includedir') / sdbusplus_current_path,
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+        get_option('includedir') / sdbusplus_current_path,
+    ],
+    build_by_default: should_generate_cpp,
+)
+
diff --git a/gen/xyz/openbmc_project/Software/meson.build b/gen/xyz/openbmc_project/Software/meson.build
index 96ba49b..1237155 100644
--- a/gen/xyz/openbmc_project/Software/meson.build
+++ b/gen/xyz/openbmc_project/Software/meson.build
@@ -8,6 +8,7 @@
 subdir('ExtendedVersion')
 subdir('Image')
 subdir('MinimumVersion')
+subdir('MultipartUpdate')
 subdir('RedundancyPriority')
 subdir('RequestedRedundancyPriority')
 subdir('Settings')
@@ -231,6 +232,30 @@
 )
 
 generated_markdown += custom_target(
+    'xyz/openbmc_project/Software/MultipartUpdate__markdown'.underscorify(),
+    input: [
+        '../../../../yaml/xyz/openbmc_project/Software/MultipartUpdate.interface.yaml',
+    ],
+    output: ['MultipartUpdate.md'],
+    depend_files: sdbusplusplus_depfiles,
+    command: [
+        sdbuspp_gen_meson_prog,
+        '--command',
+        'markdown',
+        '--output',
+        meson.current_build_dir(),
+        '--tool',
+        sdbusplusplus_prog,
+        '--directory',
+        meson.current_source_dir() / '../../../../yaml',
+        'xyz/openbmc_project/Software/MultipartUpdate',
+    ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
+)
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/Software/RedundancyPriority__markdown'.underscorify(),
     input: [
         '../../../../yaml/xyz/openbmc_project/Software/RedundancyPriority.interface.yaml',
diff --git a/yaml/xyz/openbmc_project/Software/MultipartUpdate.interface.yaml b/yaml/xyz/openbmc_project/Software/MultipartUpdate.interface.yaml
new file mode 100644
index 0000000..67d66ba
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Software/MultipartUpdate.interface.yaml
@@ -0,0 +1,12 @@
+description: >
+    Implementing this interface allows clients to identify the multi part
+    updater, which will process a multi part image and orchestrate the code
+    update process. A multi part image is a collection of individual images
+    bundled together using a defined encoding format; the multi part updater
+    interprets this format to perform code updates across various firmware
+    entities. Implementing this interface is optional and required only if the
+    client needs to delegate the code update using a multi part image without
+    specifying a particular firmware target. Implementations must also provide
+    the xyz.openbmc_project.Software.Update interface for the client to transfer
+    the multi part image. Only one instance of the MultiPartUpdate exists on the
+    BMC.