smbios-mdr: Update 0003-Add-GRPC... and delete upstreamed patches
Tested: Builds on a non GRPC_BLOB enabled platform
Google-Bug-Id: 314874024
Google-Bug-Id: 291660556
Google-Bug-Id: 300011331
Google-Bug-Id: 301192077
Change-Id: I26681c6812d83172c772f9cae92ab1c1d9380768
Signed-off-by: Brandon Kim <brandonkim@google.com>
(cherry picked from commit f6a434c1a742313b675a4d9ffd564080a9ca24fb)
Signed-off-by: Josh Lehan <krellan@google.com>
diff --git a/recipes-phosphor/smbios/smbios-mdr/0003-Add-GRPC_BLOB-option-to-mdrv2_main.patch b/recipes-phosphor/smbios/smbios-mdr/0003-Add-GRPC_BLOB-option-to-mdrv2_main.patch
index dfd1f7a..1028c01 100644
--- a/recipes-phosphor/smbios/smbios-mdr/0003-Add-GRPC_BLOB-option-to-mdrv2_main.patch
+++ b/recipes-phosphor/smbios/smbios-mdr/0003-Add-GRPC_BLOB-option-to-mdrv2_main.patch
@@ -1,4 +1,4 @@
-From c0b1e684a561f9321ee02460e8c07182c279b1b1 Mon Sep 17 00:00:00 2001
+From 15bd3c300b918339cb56970aa55190e16d67998e Mon Sep 17 00:00:00 2001
From: Josh Lehan <krellan@google.com>
Date: Fri, 8 Sep 2023 06:33:45 -0700
Subject: [PATCH 3/4] Add GRPC_BLOB option to mdrv2_main
@@ -22,14 +22,14 @@
Change-Id: I71511f5a88c50e3b1bad90543a2a3a97c7d0bede
Signed-off-by: Josh Lehan <krellan@google.com>
---
- src/mdrv2_main.cpp | 22 ++++++++++++++++++----
- 1 file changed, 18 insertions(+), 4 deletions(-)
+ src/mdrv2_main.cpp | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
diff --git a/src/mdrv2_main.cpp b/src/mdrv2_main.cpp
-index 06a51cb..643afae 100644
+index 8dad1d1..b895c8b 100644
--- a/src/mdrv2_main.cpp
+++ b/src/mdrv2_main.cpp
-@@ -16,14 +16,18 @@
+@@ -16,6 +16,10 @@
#include "mdrv2.hpp"
@@ -40,38 +40,24 @@
#include <boost/asio/io_context.hpp>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/elog.hpp>
- #include <sdbusplus/asio/connection.hpp>
- #include <sdbusplus/asio/object_server.hpp>
+@@ -39,7 +43,17 @@ int main()
+ phosphor::smbios::defaultObjectPath,
+ phosphor::smbios::defaultInventoryPath);
--boost::asio::io_context io;
--auto connection = std::make_shared<sdbusplus::asio::connection>(io);
-+auto io = std::make_shared<boost::asio::io_context>();
-+auto connection = std::make_shared<sdbusplus::asio::connection>(*io);
- auto objServer = sdbusplus::asio::object_server(connection);
-
- sdbusplus::asio::object_server& getObjectServer(void)
-@@ -39,9 +43,19 @@ int main(void)
-
- bus.request_name("xyz.openbmc_project.Smbios.MDR_V2");
-
-- phosphor::smbios::MDRV2 mdrV2(bus, phosphor::smbios::mdrV2Path, io);
-+ phosphor::smbios::MDRV2 mdrV2(bus, phosphor::smbios::mdrV2Path, *io);
-+
+#ifdef GRPC_BLOB
+ blobs::SmbiosGrpcServer smbiosGrpcServer(io);
+
+ smbiosGrpcServer.start();
+#endif
+
-+ io->run();
+ io->run();
-- io.run();
+#ifdef GRPC_BLOB
+ smbiosGrpcServer.stop();
+#endif
-
++
return 0;
}
--
-2.42.0.283.g2d96d420d3-goog
+2.43.0.rc2.451.g8631bc7472-goog
diff --git a/recipes-phosphor/smbios/smbios-mdr_%.bbappend b/recipes-phosphor/smbios/smbios-mdr_%.bbappend
index 83f983c..6098044 100644
--- a/recipes-phosphor/smbios/smbios-mdr_%.bbappend
+++ b/recipes-phosphor/smbios/smbios-mdr_%.bbappend
@@ -7,11 +7,9 @@
file://0004-Save-gRPC-blob-to-file-and-restore-it-at-start.patch\
file://0006-Update-gRPC-blobs-to-make-use-of-file-support.patch\
file://0008-Add-Meson-support-for-gRPC-blobs-feature.patch\
- file://0009-Refactored-MDRV2-class-to-allow-more-than-one.patch\
file://0009-Meson-option-smbios-grpc-inv-suffix-now-accepted.patch\
file://0010-Corrected-file-format-of-gRPC-cache-file.patch\
file://0011-Completed-implementation-of-gRPC-blobs-handler.patch\
- file://0012-Entered-remaining-CPU-family-text-strings.patch\
file://0001-Add-support-for-google-oem-cpu-link-structure.patch\
file://0001-Add-assoc-trim-path-option-and-Board-match.patch\
file://0001-Clean-up-some-buffer-allocations.patch\