Skip to content

Commit

Permalink
Allow setting COBALT_PLATFORM_NAME
Browse files Browse the repository at this point in the history
With Cobalt 22 integration new metadata is needed.  Therefore setting
COBALT_PLATFORM_NAME through Cobalt plugin is added.
  • Loading branch information
404ag committed Nov 27, 2023
1 parent 0f8e176 commit 9cdb0d4
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions configs/explora_bcm7267_wpe_ml_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ BR2_PACKAGE_WPEFRAMEWORK_COBALT_FIRMWARE_VERSION="1.2"
BR2_PACKAGE_WPEFRAMEWORK_COBALT_MODEL_NAME="Ultra"
BR2_PACKAGE_WPEFRAMEWORK_COBALT_MODEL_YEAR="2020"
BR2_PACKAGE_WPEFRAMEWORK_COBALT_OPERATOR_NAME="DStv-Explora"
BR2_PACKAGE_WPEFRAMEWORK_COBALT_PLATFORM_NAME="Linux"
BR2_PACKAGE_WPEFRAMEWORK_COBALT_FRIENDLY_NAME="Thunder"
BR2_PACKAGE_WPEFRAMEWORK_COMPOSITOR=y
BR2_PACKAGE_WPEFRAMEWORK_COMPOSITOR_OUTOFPROCESS=y
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
From 90ced6aadfaf76db153b0c123f04cbb10f8863df Mon Sep 17 00:00:00 2001
From: Artur Gebicz <[email protected]>
Date: Mon, 27 Nov 2023 10:27:39 +0000
Subject: [PATCH] Cobalt: Allow setting COBALT_PLATFORM_NAME

---
Cobalt/Cobalt.config | 3 +++
Cobalt/CobaltImplementation.cpp | 6 ++++++
2 files changed, 9 insertions(+)

diff --git a/Cobalt/Cobalt.config b/Cobalt/Cobalt.config
index 276cc149..72e25df1 100644
--- a/Cobalt/Cobalt.config
+++ b/Cobalt/Cobalt.config
@@ -40,6 +40,9 @@ map()
if(PLUGIN_COBALT_OPERATOR_NAME)
kv(operatorname ${PLUGIN_COBALT_OPERATOR_NAME})
endif()
+ if(PLUGIN_COBALT_PLATFORM_NAME)
+ kv(platformname ${PLUGIN_COBALT_PLATFORM_NAME})
+ endif()
if(PLUGIN_COBALT_FRIENDLY_NAME)
kv(friendlyname ${PLUGIN_COBALT_FRIENDLY_NAME})
endif()
diff --git a/Cobalt/CobaltImplementation.cpp b/Cobalt/CobaltImplementation.cpp
index 30246b17..7f06d334 100644
--- a/Cobalt/CobaltImplementation.cpp
+++ b/Cobalt/CobaltImplementation.cpp
@@ -81,6 +81,7 @@ private:
Add(_T("modelname"), &ModelName);
Add(_T("modelyear"), &ModelYear);
Add(_T("operatorname"), &OperatorName);
+ Add(_T("platformname"), &PlatformName);
Add(_T("friendlyname"), &FriendlyName);
Add(_T("scope"), &CertificationScope);
Add(_T("secret"), &CertificationSecret);
@@ -105,6 +106,7 @@ private:
Core::JSON::String ModelName;
Core::JSON::String ModelYear;
Core::JSON::String OperatorName;
+ Core::JSON::String PlatformName;
Core::JSON::String FriendlyName;
Core::JSON::String CertificationScope;
Core::JSON::String CertificationSecret;
@@ -247,6 +249,10 @@ private:
Core::SystemInfo::SetEnvironment(_T("COBALT_OPERATOR_NAME"), config.OperatorName.Value());
}

+ if (config.PlatformName.IsSet() == true) {
+ Core::SystemInfo::SetEnvironment(_T("COBALT_PLATFORM_NAME"), config.PlatformName.Value());
+ }
+
if (config.FriendlyName.IsSet() == true) {
Core::SystemInfo::SetEnvironment(_T("COBALT_FRIENDLY_NAME"), config.FriendlyName.Value());
}
--
2.17.1

4 changes: 4 additions & 0 deletions package/wpe/wpeframework-plugins/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ config BR2_PACKAGE_WPEFRAMEWORK_COBALT_OPERATOR_NAME
string "operatorname"
default ""

config BR2_PACKAGE_WPEFRAMEWORK_COBALT_PLATFORM_NAME
string "platformname"
default ""

config BR2_PACKAGE_WPEFRAMEWORK_COBALT_FRIENDLY_NAME
string "friendlyname"
default ""
Expand Down
3 changes: 3 additions & 0 deletions package/wpe/wpeframework-plugins/wpeframework-plugins.mk
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ endif
ifneq ($(BR2_PACKAGE_WPEFRAMEWORK_COBALT_OPERATOR_NAME),)
WPEFRAMEWORK_PLUGINS_CONF_OPTS += -DPLUGIN_COBALT_OPERATOR_NAME=$(BR2_PACKAGE_WPEFRAMEWORK_COBALT_OPERATOR_NAME)
endif
ifneq ($(BR2_PACKAGE_WPEFRAMEWORK_COBALT_PLATFORM_NAME),)
WPEFRAMEWORK_PLUGINS_CONF_OPTS += -DPLUGIN_COBALT_PLATFORM_NAME=$(BR2_PACKAGE_WPEFRAMEWORK_COBALT_PLATFORM_NAME)
endif
ifneq ($(BR2_PACKAGE_WPEFRAMEWORK_COBALT_FRIENDLY_NAME),)
WPEFRAMEWORK_PLUGINS_CONF_OPTS += -DPLUGIN_COBALT_FRIENDLY_NAME=$(BR2_PACKAGE_WPEFRAMEWORK_COBALT_FRIENDLY_NAME)
endif
Expand Down

0 comments on commit 9cdb0d4

Please sign in to comment.