Skip to content
Closed
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
37 changes: 37 additions & 0 deletions .github/workflows/native-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Persistent storage manager Component in Native Environment

on:
push:
branches: [ main, 'sprint/**', 'release/**', develop ]
pull_request:
branches: [ main, 'sprint/**', 'release/**', topic/RDK*, develop ]

jobs:
build-persistent-storage-manager-on-pr:
name: Build persistent-storage-manager component in github rdkcentral
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-rdk-ci:latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: native build
run: |
# Trust the workspace
git config --global --add safe.directory '*'

# Pull the latest changes for the native build system
git submodule update --init --recursive --remote

# Build and install dependencies
chmod +x build_tools_workflows/cov_docker_script/setup_dependencies.sh
./build_tools_workflows/cov_docker_script/setup_dependencies.sh ./cov_docker_script/component_config.json

# Build component
chmod +x build_tools_workflows/cov_docker_script/build_native.sh
./build_tools_workflows/cov_docker_script/build_native.sh ./cov_docker_script/component_config.json "$(pwd)"

env:
GITHUB_TOKEN: ${{ secrets.RDKCM_RDKE }}
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule ".github/workflows/build_tools_workflows"]
path = .github/workflows/build_tools_workflows
url = https://github.com/rdkcentral/build_tools_workflows
branch = develop
[submodule "build_tools_workflows"]
path = build_tools_workflows
url = https://github.com/rdkcentral/build_tools_workflows
branch = develop
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [2.2.0](https://github.com/rdkcentral/persistent-storage-manager/compare/2.1.0...2.2.0)

- RDKB-64876 RDKB-64882: Native build integration for Coverity [`#35`](https://github.com/rdkcentral/persistent-storage-manager/pull/35)
- Merge tag '2.1.0' into develop [`27905be`](https://github.com/rdkcentral/persistent-storage-manager/commit/27905bec6d5df96c7bedf0889059ced0a2626f6d)

#### [2.1.0](https://github.com/rdkcentral/persistent-storage-manager/compare/2.0.0...2.1.0)

> 7 May 2026

- LTE-2952: RDKCOM-5482 RDKBDEV-3325 Build fix [`#32`](https://github.com/rdkcentral/persistent-storage-manager/pull/32)
- RDKCOM-5482: RDKBDEV-3325:Addressed review comments for README [`#27`](https://github.com/rdkcentral/persistent-storage-manager/pull/27)
- RDKB-64590 Coverity issues in ccsp-psm component [`#30`](https://github.com/rdkcentral/persistent-storage-manager/pull/30)
- Revert "RDKB-64590 Coverity issues in ccsp-psm component" [`#29`](https://github.com/rdkcentral/persistent-storage-manager/pull/29)
- RDKB-64590 Coverity issues in ccsp-psm component [`#28`](https://github.com/rdkcentral/persistent-storage-manager/pull/28)
- Add changelog for release 2.1.0 [`8b81d85`](https://github.com/rdkcentral/persistent-storage-manager/commit/8b81d858f20cae0f0bb753eefe5ce9c2f8e570e0)
- Merge tag '2.0.0' into develop [`690d622`](https://github.com/rdkcentral/persistent-storage-manager/commit/690d622e942698482556eaffa36a1ce8a6320bb7)

### [2.0.0](https://github.com/rdkcentral/persistent-storage-manager/compare/1.0.1...2.0.0)
Expand Down
1 change: 1 addition & 0 deletions build_tools_workflows
Submodule build_tools_workflows added at 6fb1d3
3 changes: 3 additions & 0 deletions cov_docker_script/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 🔧 Coverity Native Build System for RDK-B Components

The documentation and source for the RDK-B native build system has been centralized in [rdkcentral/build_tools_workflows](https://github.com/rdkcentral/build_tools_workflows/blob/develop/cov_docker_script/README.md)
150 changes: 150 additions & 0 deletions cov_docker_script/component_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"_comment": "Component Build Configuration for Coverity/Native Builds",
"_version": "2.0",
"_description": "Defines dependencies and build settings for the native component",

"dependencies": {
"_comment": "External repositories needed by this component",

"repos": [
{
"name": "rbus",
"repo": "https://github.com/rdkcentral/rbus.git",
"branch": "v2.7.0",

"header_paths": [
{
"source": "include",
"destination": "$HOME/usr/include/rdkb/rbus"
}
],

"build": {
"type": "cmake",
"build_dir": "build",
"cmake_flags": "-DCMAKE_INSTALL_PREFIX=$HOME/usr -DCMAKE_PREFIX_PATH=/usr -DBUILD_FOR_DESKTOP=ON -DCMAKE_BUILD_TYPE=Debug"
}
},
{
"name": "rdk_logger",
"repo": "https://github.com/rdkcentral/rdk_logger.git",
"branch": "main",
"header_paths": [
{ "source": "include", "destination": "$HOME/usr/include/rdkb" }
],
"build": {
"type": "autotools"
}
},
{
"name": "libSyscallWrapper",
"repo": "https://github.com/rdkcentral/libSyscallWrapper.git",
"branch": "develop",
"header_paths": [
{ "source": "source", "destination": "$HOME/usr/include/rdkb" }
],
"build": {
"type": "autotools",
"configure_flags": "CPPFLAGS=\"-I$HOME/usr/include/rdkb\" LDFLAGS=\"-L$HOME/usr/local/lib\""
}
},
{
"name": "common-library",
"repo": "https://github.com/rdkcentral/common-library.git",
"branch": "develop",

"header_paths": [
{
"source": "source/ccsp/include",
"destination": "$HOME/usr/include/rdkb"
},
{
"source": "source/ccsp/components/include",
"destination": "$HOME/usr/include/rdkb"
},
{
"source": "source/cosa/include",
"destination": "$HOME/usr/include/rdkb"
},
{
"source": "source/cosa/include/linux",
"destination": "$HOME/usr/include/rdkb"
},
{
"source": "source/cosa/include/linux",
"destination": "$HOME/usr/include/rdkb/linux"
},
{
"source": "source/debug_api",
"destination": "$HOME/usr/include/rdkb"
},
{
"source": "source/debug_api/include/linux",
"destination": "$HOME/usr/include/rdkb"
},
{
"source": "source/cosa/package/system/include",
"destination": "$HOME/usr/include/rdkb"
},
{
"source": "source/util_api/http/include",
"destination": "$HOME/usr/include/rdkb"
},
{
"source": "source/util_api/ansc/include",
"destination": "$HOME/usr/include/rdkb"
}
],

"source_patches": [
{
"file": "source/ccsp/include/ccsp_message_bus.h",
"search": "typedef struct _CCSP_MESSAGE_BUS_CONNECTION",
"replace": "typedef struct DBusLoop DBusLoop;\n\ntypedef struct _CCSP_MESSAGE_BUS_CONNECTION"
},
{
"file": "$HOME/usr/include/rdkb/ccsp_message_bus.h",
"search": "typedef struct _CCSP_MESSAGE_BUS_CONNECTION",
"replace": "typedef struct DBusLoop DBusLoop;\n\ntypedef struct _CCSP_MESSAGE_BUS_CONNECTION"
}
],

"build": {
"type": "script",
"script": "build_tools_workflows/cov_docker_script/common_external_build.sh"
}
},
{
"name": "Utopia",
"repo": "https://github.com/rdkcentral/utopia.git",
"branch": "develop",

"header_paths": [
{
"source": "source/include/syscfg",
"destination": "$HOME/usr/include/rdkb/syscfg"
}
],

"build": {
"type": "script",
"script": "build_tools_workflows/cov_docker_script/common_external_build.sh"
}
}
]
},

"native_component": {
"_comment": "Configuration for the main component being built",

"name": "persistent-storage-manager",
"include_path": "$HOME/usr/include/rdkb/",
"lib_output_path": "$HOME/usr/local/lib/",

"build": {
"type": "autotools",
"configure_options_file": "cov_docker_script/configure_options.conf"
}
}
}

135 changes: 135 additions & 0 deletions cov_docker_script/configure_options.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# PSM Configure Options
# This file contains autotools configure options for the psm component
# Each section can be edited independently for better maintainability

# ============================================================================
# CPPFLAGS - Preprocessor flags (includes and defines)
# ============================================================================
[CPPFLAGS]

# Include paths for dependencies
-I$HOME/usr/include/rdkb
-I/usr/include/dbus-1.0
-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include
-I/usr/include/cjson

# Core system defines
-D_COSA_HAL_
-U_COSA_SIM_
-DCONFIG_SYSTEM_MOCA

# ANSC framework defines
-D_ANSC_LINUX
-D_ANSC_USER
-D_ANSC_LITTLE_ENDIAN_
-D_ANSC_USE_OPENSSL_
-D_ANSC_AES_USED_
-D_NO_ANSC_ZLIB_
-U_ANSC_IPV6_COMPATIBLE_

# CCSP/Component defines
-D_CCSP_CWMP_TCP_CONNREQ_HANDLER
-D_DSLH_STUN_
-D_NO_PKI_KB5_SUPPORT
-D_BBHM_SSE_FILE_IO
-DCCSP_SUPPORT_ENABLED

# Product/Platform defines
-D_COSA_INTEL_USG_ARM_
-D_COSA_FOR_COMCAST_
-D_COSA_BCM_ARM_
-D_XB6_PRODUCT_REQ_
-D_XB7_PRODUCT_REQ_

# Security and debugging
-DENABLE_SA_KEY
-D_NO_EXECINFO_H_
-D_DEBUG
-DINCLUDE_BREAKPAD

# System features
-DFEATURE_SUPPORT_SYSLOG
-DBUILD_WEB
-DUSE_NOTIFY_COMPONENT
-DNTPD_ENABLE
-DUTC_ENABLE
-DUTC_ENABLE_ATOM
-DXDNS_ENABLE

# MoCA features
-DMOCA_HOME_ISOLATION
-DMOCA_DIAGONISTIC

# Network features
-DENABLE_ETH_WAN
-DEROUTER_DHCP_OPTION_MTA
-DETH_4_PORTS
-D_2_5G_ETHERNET_SUPPORT_
-D_MACSEC_SUPPORT_
-D_BRIDGE_UTILS_BIN_
-DAUTOWAN_ENABLE
-DENABLE_WANMODECHANGE_NOREBOOT
-DFEATURE_RDKB_WAN_MANAGER
-DFEATURE_RDKB_CONFIGURABLE_WAN_INTERFACE
-DWAN_MANAGER_UNIFICATION_ENABLED
-DWAN_FAILOVER_SUPPORTED
-DGATEWAY_FAILOVER_SUPPORTED
-DFEATURE_RDKB_DHCP_MANAGER

# WiFi features
-D_ENABLE_BAND_STEERING_
-D_BEACONRATE_SUPPORT
-D_WIFI_AX_SUPPORT_
-D_WIFI_CONSOLIDATED_STANDARDS_
-DWIFI_HAL_VERSION_3
-DFEATURE_SUPPORT_MESH
-DFEATURE_SUPPORT_WEBCONFIG
-DFEATURE_SUPPORT_INTERWORKING
-DFEATURE_SUPPORT_PASSPOINT
-DWIFI_STATS_DISABLE_SPEEDTEST_RUNNING
-DFEATURE_SUPPORT_RADIUSGREYLIST
-DFEATURE_SUPPORT_ACL_SELFHEAL
-DFEATURE_CSI
-DFEATURE_SUPPORT_ONBOARD_LOGGING
-DFEATURE_OFF_CHANNEL_SCAN_5G
-DRDK_ONEWIFI
-DWIFI_MANAGE_SUPPORTED
-DFEATURE_SUPPORT_WIFIDB

# Advanced features
-D_PSM_TRANS_RDK_TRIGG_
-DFEATURE_RDKB_INTER_DEVICE_MANAGER
-DFEATURE_SUPPORT_MAPT_NAT46
-DMAPT_UNIFICATION_ENABLED
-DSPEED_BOOST_SUPPORTED
-DAMENITIES_NETWORK_ENABLED

# Test/Development
-DCOLUMBO_HWTEST

# Build system
-DRBUS_BUILD_FLAG_ENABLE

# ============================================================================
# CFLAGS - Compiler flags
# ============================================================================
[CFLAGS]
-fno-exceptions
-ffunction-sections
-fdata-sections
-fomit-frame-pointer
-fno-strict-aliasing

# ============================================================================
# LDFLAGS - Linker flags
# ============================================================================
[LDFLAGS]

# Library paths for dependencies
-L$HOME/usr/lib
-L$HOME/usr/local/lib

# Linker options
-Wl,--allow-shlib-undefined
-Wl,--unresolved-symbols=ignore-all

Loading