Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ CXXFLAGS:append = " \
SRC_URI:append = " \
file://ccsp_vendor.h \
file://utopia.service \
file://ethwan_intf.sh \
file://brlan0_check.sh \
file://brlan0_check.service \
file://onewifi.service \
file://psmssp.service \
"

# Some systemd unit files invoke through '/bin/sh -c (...)' which causes
Expand All @@ -32,6 +32,12 @@ SRC_URI:append = " file://0002-systemd_units-correct-wan_started-path-for-read-o
# Remove call to migration_to_psm.sh, utopiaInitCheck.sh and log_psm_db.sh
SRC_URI:append = " file://0003-meta-rdk-bsp-arm-only-remove-pre-and-post-start-call.patch"

# Call pre-init script for CcspEthAgent (see ccsp-eth-agent.bbappend)
SRC_URI:append = " file://0004-meta-rdk-bsp-arm-only-systemd-CcspEthAgent-bring-up-.patch"

# Remove mkdir in CcspCrSsp unit file (not required, causes error on read-only rootfs)
SRC_URI:append = " file://0004-CcspCrSsp-remove-mkdir-rdklogs.patch"

do_configure:prepend:aarch64() {
sed -e '/len/ s/^\/*/\/\//' -i ${S}/source/ccsp/components/common/DataModel/dml/components/DslhObjRecord/dslh_objro_access.c
}
Expand Down Expand Up @@ -59,7 +65,8 @@ do_install:append:class-target () {
install -d ${D}${systemd_unitdir}/system
install -D -m 0644 ${S}/systemd_units/CcspCrSsp.service ${D}${systemd_unitdir}/system/CcspCrSsp.service
install -D -m 0644 ${S}/systemd_units/CcspPandMSsp.service ${D}${systemd_unitdir}/system/CcspPandMSsp.service
install -D -m 0644 ${S}/systemd_units/PsmSsp.service ${D}${systemd_unitdir}/system/PsmSsp.service
#install -D -m 0644 ${S}/systemd_units/PsmSsp.service ${D}${systemd_unitdir}/system/PsmSsp.service
install -D -m 0644 ${WORKDIR}/psmssp.service ${D}${systemd_unitdir}/system/PsmSsp.service
install -D -m 0644 ${S}/systemd_units/rdkbLogMonitor.service ${D}${systemd_unitdir}/system/rdkbLogMonitor.service
install -D -m 0644 ${S}/systemd_units/CcspTandDSsp.service ${D}${systemd_unitdir}/system/CcspTandDSsp.service
install -D -m 0644 ${S}/systemd_units/CcspLMLite.service ${D}${systemd_unitdir}/system/CcspLMLite.service
Expand Down Expand Up @@ -108,7 +115,6 @@ do_install:append:class-target () {
install -D -m 0644 ${S}/systemd_units/CcspXdnsSsp.service ${D}${systemd_unitdir}/system/CcspXdnsSsp.service

install -d ${D}${base_libdir}/rdk
install -m 755 ${WORKDIR}/ethwan_intf.sh ${D}${base_libdir}/rdk/
install -m 755 ${WORKDIR}/brlan0_check.sh ${D}${base_libdir}/rdk/
#WanManager - RdkWanManager.service
DISTRO_WAN_ENABLED="${@bb.utils.contains('DISTRO_FEATURES','rdkb_wan_manager','true','false',d)}"
Expand Down Expand Up @@ -181,7 +187,6 @@ FILES:${PN}:append = " \
/usr/ccsp/utopiaInitCheck.sh \
/usr/ccsp/ccspPAMCPCheck.sh \
/usr/ccsp/ProcessResetCheck.sh \
${base_libdir}/rdk/ethwan_intf.sh \
${base_libdir}/rdk/brlan0_check.sh \
${systemd_unitdir}/system/brlan0_check.service \
${systemd_unitdir}/system/CcspCrSsp.service \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 29933d25342902578ccea1e6aa82fa0462798219 Mon Sep 17 00:00:00 2001
From: Mathew McBride <[email protected]>
Date: Tue, 17 Feb 2026 12:08:25 +1100
Subject: [PATCH] (meta-rdk-bsp-arm only) CcspCrSsp: remove 'mkdir
/rdklogs/logs'

This will fail under a read-only rootfs environment
---
systemd_units/CcspCrSsp.service | 1 -
1 file changed, 1 deletion(-)

diff --git a/systemd_units/CcspCrSsp.service b/systemd_units/CcspCrSsp.service
index a73813c..99383c6 100644
--- a/systemd_units/CcspCrSsp.service
+++ b/systemd_units/CcspCrSsp.service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cr is not used anymore with RBUS

@@ -27,7 +27,6 @@ WorkingDirectory=/usr/ccsp
Environment="Subsys=eRT."
Environment="LOG4C_RCPATH=/etc"
EnvironmentFile=/etc/device.properties
-ExecStartPre=-/bin/sh -c 'mkdir -p /rdklogs/logs/'
ExecStartPre=/bin/sh -c '(/usr/ccsp/ccspSysConfigEarly.sh)'
ExecStart=/bin/sh -c '/usr/bin/CcspCrSsp -subsys $Subsys'
ExecStopPost=/bin/sh -c 'echo 0 >> /tmp/CcspCrSsp_Restarted'
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From ef84fe084564e149c15855c67ecb267498353f44 Mon Sep 17 00:00:00 2001
From: Mathew McBride <[email protected]>
Date: Tue, 3 Feb 2026 00:28:01 +0000
Subject: [PATCH] (meta-rdk-bsp-arm only) systemd: CcspEthAgent: bring up all
ethX before starting

This is so WAN Manager will consider them as eligible interfaces in
it's selection policy.

Signed-off-by: Mathew McBride <[email protected]>
---
systemd_units/CcspEthAgent.service | 1 +
1 file changed, 1 insertion(+)

diff --git a/systemd_units/CcspEthAgent.service b/systemd_units/CcspEthAgent.service
index 260ac94..d548aa5 100644
--- a/systemd_units/CcspEthAgent.service
+++ b/systemd_units/CcspEthAgent.service
@@ -28,6 +28,7 @@ Environment="Subsys=eRT."
Environment="LOG4C_RCPATH=/etc"
EnvironmentFile=/etc/device.properties
ExecStart=/bin/sh -c '/usr/bin/CcspEthAgent -subsys $Subsys'
+ExecStartPre=/bin/sh -c '/lib/rdk/bring_up_all_eth.sh'
ExecStopPost=/bin/sh -c 'echo "`date`: Stopping/Restarting CcspEthAgent" >> ${PROCESS_RESTART_LOG}'
SyslogIdentifier=CcspEthAgent
Restart=always
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[Unit]
Description=PsmSsp service

After=CcspCrSsp.service

[Service]
Type=forking
PIDFile=/var/tmp/PsmSsp.pid
WorkingDirectory=/usr/ccsp
Environment="Subsys=eRT."
Environment="LOG4C_RCPATH=/etc"
EnvironmentFile=/etc/device.properties
ExecStart=/bin/sh -c '/usr/bin/PsmSsp -subsys $Subsys'
ExecStartPre="/usr/ccsp/psm/copy_config.sh"
ExecStopPost=/bin/sh -c 'echo "`date`: Stopping/Restarting PsmSsp" >> ${PROCESS_RESTART_LOG}'
Restart=always
SyslogIdentifier=PsmSsp

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ After=mount-nonvol.service
Type=forking
WorkingDirectory=/etc/utopia
EnvironmentFile=/etc/device.properties
ExecStartPre=/bin/sh /lib/rdk/ethwan_intf.sh
ExecStart=/bin/sh /etc/utopia/utopia_init.sh
ExecStop=/bin/sh -c 'echo "Stopping/Restarting utopia_init.sh" >> ${PROCESS_RESTART_LOG}'
SyslogIdentifier=Utopia
Expand Down
11 changes: 11 additions & 0 deletions meta-rdk-broadband/recipes-ccsp/ccsp/ccsp-eth-agent.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,19 @@ SRC_URI:remove = "${CMF_GITHUB_ROOT}/ethernet-agent;protocol=https;nobranch=1"
SRC_URI = "git://github.com/rdkcentral/ethernet-agent.git;protocol=https;branch=develop"
SRCREV_pn-ccsp-eth-agent = "3a0058c9699a15f9190fbdc02e411c9a541294f5"

EROUTER0_COMPAT_PATCH = "${@bb.utils.contains('DISTRO_FEATURES', 'erouter0_compatibility', 'file://RDKBACCL-1082-erouter0-compat-patch.patch', ' ', d)}"

SRC_URI:append = "\
file://0001-genericarm-increase-maximum-number-of-Ethernet-interfaces.patch \
file://0002-cosa_ethernet_internal-force-CcspHalEthSw_RegisterLink.patch \
${EROUTER0_COMPAT_PATCH} \
file://bring_up_all_eth.sh \
"


do_install:append() {
install -d ${D}/lib/rdk/
install -m 755 ${WORKDIR}/bring_up_all_eth.sh ${D}/lib/rdk/
}

FILES:${PN}:append = " /lib/rdk/bring_up_all_eth.sh"
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
From 45c33e46dacceb6afb083454157e48ba71acdcd5 Mon Sep 17 00:00:00 2001
From: mahanteshchitt <[email protected]>
Date: Mon, 1 Dec 2025 17:57:16 +0530
Subject: [PATCH] RDKBACCL-1082:Make wan interface name generic (erouter0) in
arm system ready image.

Reason for Change:Getting the Wan interface name from the hal_ethsw.
Test Procedure:On boot-up erouter0 inetrface should IP.
Risks:Low

Signed-off-by: mahanteshchitt <[email protected]>
---
source/TR-181/board_sbapi/cosa_ethernet_apis.c | 14 ++++++++++----
source/TR-181/board_sbapi/cosa_ethernet_manager.c | 2 +-
.../middle_layer_src/cosa_ethernet_internal.c | 5 +++--
3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/source/TR-181/board_sbapi/cosa_ethernet_apis.c b/source/TR-181/board_sbapi/cosa_ethernet_apis.c
index a810f95..5441b4e 100755
--- a/source/TR-181/board_sbapi/cosa_ethernet_apis.c
+++ b/source/TR-181/board_sbapi/cosa_ethernet_apis.c
@@ -672,6 +672,8 @@ COSA_DML_IF_STATUS getIfStatus(const PUCHAR name, struct ifreq *pIfr)
#define ETHWAN_DEF_INTF_NAME "eth5"
#elif defined (_PLATFORM_BANANAPI_R4_)
#define ETHWAN_DEF_INTF_NAME "lan0"
+#elif defined (_PLATFORM_GENERICARM_)
+#define ETHWAN_DEF_INTF_NAME "eth3"
#else
#define ETHWAN_DEF_INTF_NAME "eth0"
#endif
@@ -3463,9 +3465,9 @@ CosaDmlEthInit(
}
}
#else
- #if defined(_PLATFORM_RASPBERRYPI_) || defined(_PLATFORM_TURRIS_) || defined(_PLATFORM_BANANAPI_R4_)
+ #if defined(_PLATFORM_RASPBERRYPI_) || defined(_PLATFORM_TURRIS_) || defined(_PLATFORM_BANANAPI_R4_) || defined(_PLATFORM_GENERICARM_)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TURRIS should be eliminated is not supported anymore


- char wanPhyName[20] = {0},out_value[20] = {0};
+ char wanPhyName[20] = {0},out_value[20] = {0},wan_interface_name[20] ={0};

sysevent_get(sysevent_fd, sysevent_token, "wan_ifname", out_value, sizeof(out_value));
if (out_value[0] != '\0')
@@ -3480,12 +3482,16 @@ CosaDmlEthInit(
}
#ifdef CORE_NET_LIB
libnet_status status;
- status=interface_down(ETHWAN_DEF_INTF_NAME);
+ if (GWP_GetEthWanInterfaceName((unsigned char*)wan_interface_name, sizeof(wan_interface_name)) != RETURN_OK) {
+ CcspTraceError(("Failed to get WAN interface name via GWP_GetEthWanInterfaceName\n"));
+ return -1;
+ }
+ status=interface_down(wan_interface_name);
if(status != CNL_STATUS_SUCCESS)
{
CcspTraceInfo(("Failed to down the interface %s\n",ETHWAN_DEF_INTF_NAME));
}
- status=interface_rename(ETHWAN_DEF_INTF_NAME,wanPhyName);
+ status=interface_rename(wan_interface_name,wanPhyName);
if(status != CNL_STATUS_SUCCESS)
{
CcspTraceInfo(("Failed to rename the interface %s with %s\n",ETHWAN_DEF_INTF_NAME,wanPhyName));
diff --git a/source/TR-181/board_sbapi/cosa_ethernet_manager.c b/source/TR-181/board_sbapi/cosa_ethernet_manager.c
index fe97d7f..5ee855a 100644
--- a/source/TR-181/board_sbapi/cosa_ethernet_manager.c
+++ b/source/TR-181/board_sbapi/cosa_ethernet_manager.c
@@ -375,7 +375,7 @@ static ethSmState_t Transition_EthWanLinkFound(PETH_SM_PRIVATE_INFO pstInfo)
#if defined(FEATURE_RDKB_WAN_AGENT)
if (ANSC_STATUS_SUCCESS != CosaDmlEthCreateEthLink(pstInfo->Name, stGlobalInfo.Path))
#elif defined(FEATURE_RDKB_WAN_MANAGER)
- #if defined(_PLATFORM_RASPBERRYPI_) || defined(_PLATFORM_TURRIS_) || defined(_PLATFORM_BANANAPI_R4_)
+ #if defined(_PLATFORM_RASPBERRYPI_) || defined(_PLATFORM_TURRIS_) || defined(_PLATFORM_BANANAPI_R4_) || defined(_PLATFORM_GENERICARM_)
CHAR wanPhyName[20] = {0},out_value[20] = {0};
if (!syscfg_get(NULL, "wan_physical_ifname", out_value, sizeof(out_value)))
{
diff --git a/source/TR-181/middle_layer_src/cosa_ethernet_internal.c b/source/TR-181/middle_layer_src/cosa_ethernet_internal.c
index e48d018..329bbef 100644
--- a/source/TR-181/middle_layer_src/cosa_ethernet_internal.c
+++ b/source/TR-181/middle_layer_src/cosa_ethernet_internal.c
@@ -83,7 +83,7 @@
#endif
#endif //#if defined (FEATURE_RDKB_WAN_MANAGER)

-#if defined (WAN_FAILOVER_SUPPORTED) || defined(RBUS_BUILD_FLAG_ENABLE) || defined (_HUB4_PRODUCT_REQ_) || defined(_PLATFORM_RASPBERRYPI_) || defined(_PLATFORM_BANANAPI_R4_)
+#if defined (WAN_FAILOVER_SUPPORTED) || defined(RBUS_BUILD_FLAG_ENABLE) || defined (_HUB4_PRODUCT_REQ_) || defined(_PLATFORM_RASPBERRYPI_) || defined(_PLATFORM_BANANAPI_R4_) || defined(_PLATFORM_GENERICARM_)
#include "cosa_rbus_handler_apis.h"
#endif

@@ -370,7 +370,7 @@ CosaEthernetInitialize

#if defined(FEATURE_RDKB_WAN_MANAGER)

-#if defined (WAN_FAILOVER_SUPPORTED) || defined(RBUS_BUILD_FLAG_ENABLE) || defined (_HUB4_PRODUCT_REQ_) || defined(_PLATFORM_RASPBERRYPI_) || defined(_PLATFORM_BANANAPI_R4_)
+#if defined (WAN_FAILOVER_SUPPORTED) || defined(RBUS_BUILD_FLAG_ENABLE) || defined (_HUB4_PRODUCT_REQ_) || defined(_PLATFORM_RASPBERRYPI_) || defined(_PLATFORM_BANANAPI_R4_) || defined(_PLATFORM_GENERICARM_)
ethAgentRbusInit();
#endif
#if defined (WAN_FAILOVER_SUPPORTED)
@@ -384,6 +384,7 @@ CosaEthernetInitialize
GWP_RegisterEthWan_Callback ( &obj );
//Initialise global data and initalise hal
CosaDmlEthInit(NULL, (PANSC_HANDLE)pMyObject);
+
#if defined (WAN_FAILOVER_SUPPORTED)
// The below case might occur, when box crashed/reboot before timeout or conditional signaled
// Check if EWan failover simulation test file is exist or not.
--
2.51.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh
##################################################################################
# If not stated otherwise in this file or this component's LICENSE file the
# following copyright and licenses apply:
#
# Copyright 2024 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##################################################################################

set -e

# Bring up all Ethernet interfaces before EthAgent starts
for x in $(find /sys/class/net -name 'eth*'); do
# Ignore any interface that is not originating from
# a "real" device (for example, no veth pairs)
if [ ! -d "${x}/device" ]; then
continue
fi
eth_intf_name=$(basename "${x}")
echo "Bringing ${eth_intf_name} up"
ip link set "${eth_intf_name}" up
done
17 changes: 14 additions & 3 deletions meta-rdk-broadband/recipes-ccsp/ccsp/ccsp-psm.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@ require ccsp_common_genericarm.inc

FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

SRC_URI:append = " file://bbhm_def_cfg_ten64.xml"
SRC_URI:append = " file://bbhm_def_cfg_ten64.xml \
file://bbhm_def_cfg_ten64-4.xml \
file://bbhm_def_cfg_default.xml \
file://copy_config.sh"

do_install:append() {
# Config files and scripts
install -d ${D}/usr/ccsp/config
install -m 644 ${WORKDIR}/bbhm_def_cfg_ten64.xml ${D}/usr/ccsp/config/bbhm_def_cfg.xml
install -m 755 ${S}/scripts/bbhm_patch.sh ${D}/usr/ccsp/psm/bbhm_patch.sh
install -d ${D}/usr/ccsp/machine_configs
cp ${WORKDIR}/bbhm_def_cfg_ten64.xml ${D}/usr/ccsp/machine_configs/traverse_ten64.xml
cp ${WORKDIR}/bbhm_def_cfg_ten64-4.xml ${D}/usr/ccsp/machine_configs/traverse_ten64-4.xml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a more generic name for the configuration

cp ${WORKDIR}/bbhm_def_cfg_default.xml ${D}/usr/ccsp/machine_configs/default.xml

install -m 755 ${WORKDIR}/copy_config.sh ${D}/usr/ccsp/psm/copy_config.sh
}

FILES:${PN}:append = " /usr/ccsp/config \
/usr/ccsp/machine_configs \
/usr/ccsp/machine_configs/traverse_ten64.xml \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use generic name

/usr/ccsp/machine_configs/default.xml"
Loading