From 15b26a05028cba0fed47f5d19bbbc609c976b871 Mon Sep 17 00:00:00 2001 From: ap934 Date: Tue, 12 May 2026 14:57:48 +0530 Subject: [PATCH 1/2] RDKBACCL-1777: Remove ARM SystemReady Specific Patches and Upstream to Generic code Reason for change: Upstreaming the patches from meta-rdk-bsp-arm layer. Test procedure: Build should pass and all functionality should work Risks: low Signed-off-by: ap934 --- source/EthSsp/ssp_main.c | 2 ++ source/TR-181/board_sbapi/cosa_ethernet_apis.c | 6 ++++-- source/TR-181/middle_layer_src/plugin_main_apis.c | 7 +++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/source/EthSsp/ssp_main.c b/source/EthSsp/ssp_main.c index f87704e..7802975 100644 --- a/source/EthSsp/ssp_main.c +++ b/source/EthSsp/ssp_main.c @@ -321,8 +321,10 @@ int main(int argc, char* argv[]) pComponentName = CCSP_COMPONENT_NAME_ETHAGENT; +#if !(defined(_PLATFORM_GENERICARM_) && defined(USE_SYSTEMD_NOTIFICATIONS)) if ( bRunAsDaemon ) daemonize(); +#endif CcspTraceInfo(("\nAfter daemonize before signal\n")); diff --git a/source/TR-181/board_sbapi/cosa_ethernet_apis.c b/source/TR-181/board_sbapi/cosa_ethernet_apis.c index b5d8017..a02819c 100755 --- a/source/TR-181/board_sbapi/cosa_ethernet_apis.c +++ b/source/TR-181/board_sbapi/cosa_ethernet_apis.c @@ -164,7 +164,9 @@ extern char g_Subsystem[BUFLEN_32]; #include "cosa_ethernet_manager.h" #endif #if defined (FEATURE_RDKB_WAN_MANAGER) -#if defined (_CBR2_PRODUCT_REQ_) +#if defined (_PLATFORM_GENERICARM_) +#define TOTAL_NUMBER_OF_INTERNAL_INTERFACES 10 +#elif defined (_CBR2_PRODUCT_REQ_) #define TOTAL_NUMBER_OF_INTERNAL_INTERFACES 6 #elif defined (_XER5_PRODUCT_REQ_) || defined(_SCER11BEL_PRODUCT_REQ_) || defined(_SCXF11BFL_PRODUCT_REQ_) #define TOTAL_NUMBER_OF_INTERNAL_INTERFACES 5 @@ -3947,7 +3949,7 @@ ANSC_STATUS CosaDmlTriggerExternalEthPortLinkStatus(char *ifname, BOOL status) { ANSC_STATUS retStatus; INT IfIndex = -1; - CcspTraceInfo(("%s.%d Enter \n",__FUNCTION__,__LINE__)); + CcspTraceInfo(("%s.%d Enter (ifname=%s)\n",__FUNCTION__,__LINE__,ifname)); if (ifname == NULL) { CcspTraceError(("%s Invalid data \n", __FUNCTION__)); diff --git a/source/TR-181/middle_layer_src/plugin_main_apis.c b/source/TR-181/middle_layer_src/plugin_main_apis.c index 9961260..ff8974d 100644 --- a/source/TR-181/middle_layer_src/plugin_main_apis.c +++ b/source/TR-181/middle_layer_src/plugin_main_apis.c @@ -77,6 +77,10 @@ extern int sock; #endif +#if defined(_PLATFORM_GENERICARM_) && defined(USE_SYSTEMD_NOTIFICATIONS) +#include +#endif + /********************************************************************** caller: owner of the object @@ -173,6 +177,9 @@ CosaBackEndManagerInitialize printf("CosaEthInferface initialization done!\n"); +#if defined(_PLATFORM_GENERICARM_) && defined(USE_SYSTEMD_NOTIFICATIONS) + sd_notify(0,"READY=1"); +#endif return returnStatus; } From 276c0e247c9c7cdbd89b65de738bfe8c5ec27d4d Mon Sep 17 00:00:00 2001 From: ap934 Date: Fri, 17 Jul 2026 13:11:28 +0530 Subject: [PATCH 2/2] Add a Null check in print Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- source/TR-181/board_sbapi/cosa_ethernet_apis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/TR-181/board_sbapi/cosa_ethernet_apis.c b/source/TR-181/board_sbapi/cosa_ethernet_apis.c index a02819c..25122da 100755 --- a/source/TR-181/board_sbapi/cosa_ethernet_apis.c +++ b/source/TR-181/board_sbapi/cosa_ethernet_apis.c @@ -3949,7 +3949,7 @@ ANSC_STATUS CosaDmlTriggerExternalEthPortLinkStatus(char *ifname, BOOL status) { ANSC_STATUS retStatus; INT IfIndex = -1; - CcspTraceInfo(("%s.%d Enter (ifname=%s)\n",__FUNCTION__,__LINE__,ifname)); + CcspTraceInfo(("%s.%d Enter (ifname=%s)\n", __FUNCTION__, __LINE__, ifname ? ifname : "(null)")); if (ifname == NULL) { CcspTraceError(("%s Invalid data \n", __FUNCTION__));