From 04a7b5bfe2d6de1dd1511a65d851bf9b70526b81 Mon Sep 17 00:00:00 2001 From: Hirrangandhi Devaraj <208949566+hirrangandhid@users.noreply.github.com> Date: Fri, 6 Feb 2026 13:05:25 +0530 Subject: [PATCH 1/4] Updated submodule changes for Native Build --- .github/workflows/native-build.yml | 14 +++-- .gitmodules | 4 ++ build_tools_workflows | 1 + cov_docker_script/run_external_build.sh | 51 ---------------- cov_docker_script/run_native_build.sh | 51 ---------------- cov_docker_script/run_setup_dependencies.sh | 67 --------------------- 6 files changed, 15 insertions(+), 173 deletions(-) create mode 100644 .gitmodules create mode 160000 build_tools_workflows delete mode 100755 cov_docker_script/run_external_build.sh delete mode 100755 cov_docker_script/run_native_build.sh delete mode 100755 cov_docker_script/run_setup_dependencies.sh diff --git a/.github/workflows/native-build.yml b/.github/workflows/native-build.yml index 5eacca66..eaf6c899 100644 --- a/.github/workflows/native-build.yml +++ b/.github/workflows/native-build.yml @@ -19,9 +19,15 @@ jobs: - name: native build run: | - chmod +x cov_docker_script/run_setup_dependencies.sh - ./cov_docker_script/run_setup_dependencies.sh - chmod +x cov_docker_script/run_native_build.sh - ./cov_docker_script/run_native_build.sh + # 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 }} diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..05128223 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "build_tools_workflows"] + path = build_tools_workflows + url = https://github.com/rdkcentral/build_tools_workflows + branch = develop diff --git a/build_tools_workflows b/build_tools_workflows new file mode 160000 index 00000000..11f19226 --- /dev/null +++ b/build_tools_workflows @@ -0,0 +1 @@ +Subproject commit 11f192263b3b4358e0d99895d57eab7bda5a8115 diff --git a/cov_docker_script/run_external_build.sh b/cov_docker_script/run_external_build.sh deleted file mode 100755 index d6e9a21e..00000000 --- a/cov_docker_script/run_external_build.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash -set -e - -################################################################################ -# External Build Wrapper Script -# Verifies build tools and runs common_external_build.sh -# Usage: ./run_external_build.sh -# Note: run_setup_dependencies.sh should be executed first -################################################################################ - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -NATIVE_COMPONENT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" -BUILD_TOOLS_REPO_URL="https://github.com/rdkcentral/build_tools_workflows" -BUILD_TOOLS_DIR="$NATIVE_COMPONENT_DIR/build_tools_workflows" - -# Basic logging functions -log() { echo "[INFO] $*"; } -ok() { echo "[OK] $*"; } -err() { echo "[ERROR] $*" >&2; } - -echo "" -echo "===== External Build Pipeline =====" -echo "" - -# Clone build_tools_workflows if it doesn't exist -if [[ ! -d "$BUILD_TOOLS_DIR" ]]; then - log "build_tools_workflows not found, cloning repository..." - cd "$NATIVE_COMPONENT_DIR" - git clone -b develop "$BUILD_TOOLS_REPO_URL" || { err "Clone failed"; exit 1; } - ok "Repository cloned successfully" -else - log "build_tools_workflows already exists" -fi - -if [[ ! -f "$BUILD_TOOLS_DIR/cov_docker_script/common_external_build.sh" ]]; then - err "common_external_build.sh not found in build_tools_workflows. Please run run_setup_dependencies.sh first." - exit 1 -fi - -log "Build script found, proceeding with build..." - -# Run common_external_build.sh from build_tools_workflows -echo "" -log "Running common_external_build.sh from build_tools_workflows..." -cd "$NATIVE_COMPONENT_DIR" -"$BUILD_TOOLS_DIR/cov_docker_script/common_external_build.sh" "$SCRIPT_DIR/component_config.json" "$NATIVE_COMPONENT_DIR" - -echo "" -ok "External build completed successfully!" - -echo "" diff --git a/cov_docker_script/run_native_build.sh b/cov_docker_script/run_native_build.sh deleted file mode 100755 index 9d3aea3b..00000000 --- a/cov_docker_script/run_native_build.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash -set -e - -################################################################################ -# Native Build Wrapper Script -# Verifies build tools and runs build_native.sh -# Usage: ./run_native_build.sh -# Note: run_setup_dependencies.sh should be executed first -################################################################################ - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -NATIVE_COMPONENT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" -BUILD_TOOLS_DIR="$NATIVE_COMPONENT_DIR/build_tools_workflows" - -# Basic logging functions -log() { echo "[INFO] $*"; } -ok() { echo "[OK] $*"; } -err() { echo "[ERROR] $*" >&2; } - -echo "" -echo "===== Native Build Pipeline =====" -echo "" - -# Verify build_tools_workflows exists (should be cloned by run_setup_dependencies.sh) -if [[ ! -d "$BUILD_TOOLS_DIR" ]]; then - err "build_tools_workflows directory not found. Please run run_setup_dependencies.sh first." - exit 1 -fi - -if [[ ! -f "$BUILD_TOOLS_DIR/cov_docker_script/build_native.sh" ]]; then - err "build_native.sh not found in build_tools_workflows. Please run run_setup_dependencies.sh first." - exit 1 -fi - -log "Build script found, proceeding with build..." - -# Run build_native.sh from build_tools_workflows -echo "" -log "Running build_native.sh from build_tools_workflows..." -cd "$NATIVE_COMPONENT_DIR" -"$BUILD_TOOLS_DIR/cov_docker_script/build_native.sh" "$SCRIPT_DIR/component_config.json" "$NATIVE_COMPONENT_DIR" - -echo "" -ok "Native build completed successfully!" - -# Cleanup build_tools_workflows directory -log "Cleaning up build_tools_workflows directory..." -rm -rf "$BUILD_TOOLS_DIR" -ok "Cleanup completed" - -echo "" diff --git a/cov_docker_script/run_setup_dependencies.sh b/cov_docker_script/run_setup_dependencies.sh deleted file mode 100755 index 5223c841..00000000 --- a/cov_docker_script/run_setup_dependencies.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env bash -set -e - -################################################################################ -# Setup Dependencies Wrapper Script -# Sets up build tools and runs setup_dependencies.sh -# Usage: ./run_setup_dependencies.sh -################################################################################ - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -NATIVE_COMPONENT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" -BUILD_TOOLS_REPO_URL="https://github.com/rdkcentral/build_tools_workflows" -BUILD_TOOLS_DIR="$NATIVE_COMPONENT_DIR/build_tools_workflows" -REQUIRED_SCRIPTS=("build_native.sh" "common_build_utils.sh" "common_external_build.sh" "setup_dependencies.sh") - -# Basic logging functions -log() { echo "[INFO] $*"; } -ok() { echo "[OK] $*"; } -err() { echo "[ERROR] $*" >&2; } - -echo "" -echo "===== Setup Dependencies Pipeline =====" -echo "" - -# Setup build tools -log "Setting up build tools..." - -# Clone build_tools_workflows -if [[ -d "$BUILD_TOOLS_DIR" ]]; then - log "build_tools_workflows already exists, skipping clone" -else - log "Cloning build_tools_workflows (develop)" - cd "$NATIVE_COMPONENT_DIR" - git clone -b develop "$BUILD_TOOLS_REPO_URL" || { err "Clone failed"; exit 1; } - ok "Repository cloned" -fi - -# Verify required scripts -[[ ! -d "$BUILD_TOOLS_DIR/cov_docker_script" ]] && { err "cov_docker_script not found"; exit 1; } - -log "Verifying required scripts..." -MISSING=() -for script in "${REQUIRED_SCRIPTS[@]}"; do - [[ -f "$BUILD_TOOLS_DIR/cov_docker_script/$script" ]] || MISSING+=("$script") -done - -if [[ ${#MISSING[@]} -gt 0 ]]; then - err "Missing scripts: ${MISSING[*]}" - exit 1 -fi -ok "All required scripts found" - -# Verify setup_dependencies.sh exists before running -if [[ ! -f "$BUILD_TOOLS_DIR/cov_docker_script/setup_dependencies.sh" ]]; then - err "setup_dependencies.sh not found in build_tools_workflows" - exit 1 -fi - -# Run setup_dependencies.sh from build_tools_workflows -echo "" -log "Running setup_dependencies.sh from build_tools_workflows..." -cd "$NATIVE_COMPONENT_DIR" -"$BUILD_TOOLS_DIR/cov_docker_script/setup_dependencies.sh" "$SCRIPT_DIR/component_config.json" - -echo "" -echo "[OK] Dependencies setup completed successfully!" -echo "" From e0b16301ff991cb16064b169cc0ef9025d2a1a3a Mon Sep 17 00:00:00 2001 From: Hirrangandhi Devaraj <208949566+hirrangandhid@users.noreply.github.com> Date: Fri, 6 Feb 2026 13:07:46 +0530 Subject: [PATCH 2/4] Updated component_config.json --- cov_docker_script/component_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cov_docker_script/component_config.json b/cov_docker_script/component_config.json index d292cdf4..6dfde135 100644 --- a/cov_docker_script/component_config.json +++ b/cov_docker_script/component_config.json @@ -193,7 +193,7 @@ ], "build": { "type": "script", - "script": "cov_docker_script/run_external_build.sh" + "script": "build_tools_workflows/cov_docker_script/common_external_build.sh" } }, { From a2b03d6d0f0e6816ed5fb939229f8edca4e6fb62 Mon Sep 17 00:00:00 2001 From: Hirrangandhi Devaraj <208949566+hirrangandhid@users.noreply.github.com> Date: Fri, 6 Feb 2026 15:12:53 +0530 Subject: [PATCH 3/4] Updated README.md --- cov_docker_script/README.md | 451 +++++++++++++++++++----------------- 1 file changed, 234 insertions(+), 217 deletions(-) diff --git a/cov_docker_script/README.md b/cov_docker_script/README.md index e06d1a2f..022c78bb 100644 --- a/cov_docker_script/README.md +++ b/cov_docker_script/README.md @@ -6,18 +6,26 @@ ## 📋 Overview -This directory contains the configuration and wrapper scripts necessary for building RDK-B components in a native (non-Yocto) environment. This setup enables Coverity static analysis and validates that components can be built with explicitly declared dependencies. +This directory contains configuration files for building RDK-B components in a native (non-Yocto) environment. This setup enables Coverity static analysis and validates that components can be built with explicitly declared dependencies. + +The build scripts are maintained in the `build_tools_workflows` repository and included as a git submodule. ### Directory Contents ``` -/cov_docker_script/ -├── README.md # This file -├── component_config.json # Dependency & build configuration -├── configure_options.conf # Autotools configure flags (optional) -├── run_setup_dependencies.sh # Wrapper: Setup build tools & dependencies -├── run_native_build.sh # Wrapper: Build main component -└── run_external_build.sh # Wrapper: For dependency builds (used in component_config.json) +/ +├── .gitmodules # Git submodule configuration +├── cov_docker_script/ +│ ├── README.md # This file +│ ├── component_config.json # Dependency & build configuration +│ └── configure_options.conf # Autotools configure flags (optional) +└── build_tools_workflows/ # Git submodule (rdkcentral/build_tools_workflows) + └── cov_docker_script/ + ├── build_native.sh # Build main component + ├── common_build_utils.sh # Utility functions for other scripts + ├── common_external_build.sh # Combined setup + build script + ├── setup_dependencies.sh # Setup build tools & dependencies + └── README.md # Detailed build tools documentation ``` ### Important: Add to .gitignore @@ -25,13 +33,32 @@ This directory contains the configuration and wrapper scripts necessary for buil Add the following to your component's `.gitignore` to exclude temporary build artifacts: ```gitignore -# Build tools (downloaded by wrapper scripts) -build_tools_workflows/ - # Dependency build artifacts build/ ``` +### Required: Add build_tools_workflows as Git Submodule + +The `build_tools_workflows` directory **must be tracked as a git submodule** in your repository. Add it using the following commands: + +```bash +# Add build_tools_workflows as a submodule +git submodule add -b develop https://github.com/rdkcentral/build_tools_workflows.git build_tools_workflows + +# Commit the .gitmodules file and submodule reference +git add .gitmodules build_tools_workflows +git commit -m "Add build_tools_workflows as submodule" +``` + +**Important:** When cloning your repository, always initialize and update submodules to ensure `build_tools_workflows` is available: + +```bash +git clone --recurse-submodules +# OR +git clone +git submodule update --init --recursive +``` + --- ## 🚀 Quick Start @@ -39,7 +66,7 @@ build/ ### Prerequisites - Docker container with [docker-rdk-ci](https://github.com/rdkcentral/docker-rdk-ci) image -- All wrapper scripts have execute permissions +- Git submodules initialized ### Build Commands @@ -49,106 +76,100 @@ build/ # From your component root directory cd /path/to/your-component -# Standard build pipeline for main component -./cov_docker_script/run_setup_dependencies.sh -./cov_docker_script/run_native_build.sh +# Initialize/update build_tools_workflows submodule +git submodule update --init --recursive --remote + +# Step 1: Setup dependencies +./build_tools_workflows/cov_docker_script/setup_dependencies.sh ./cov_docker_script/component_config.json + +# Step 2: Build component +./build_tools_workflows/cov_docker_script/build_native.sh ./cov_docker_script/component_config.json "$(pwd)" # Clean build (removes previous artifacts) -CLEAN_BUILD=true ./cov_docker_script/run_setup_dependencies.sh -./cov_docker_script/run_native_build.sh +CLEAN_BUILD=true ./build_tools_workflows/cov_docker_script/setup_dependencies.sh ./cov_docker_script/component_config.json +./build_tools_workflows/cov_docker_script/build_native.sh ./cov_docker_script/component_config.json "$(pwd)" ``` #### Alternative: Single-Script Build (All-in-One) -If you prefer to run everything in a single command: - ```bash -# Run setup dependencies + native build in one script -./cov_docker_script/run_external_build.sh +# Run setup dependencies + native build in one command +./build_tools_workflows/cov_docker_script/common_external_build.sh ./cov_docker_script/component_config.json # Clean build -CLEAN_BUILD=true ./cov_docker_script/run_external_build.sh +CLEAN_BUILD=true ./build_tools_workflows/cov_docker_script/common_external_build.sh ./cov_docker_script/component_config.json ``` -**Note:** `run_external_build.sh` performs both dependency setup and component build in one execution. While primarily designed to be invoked by the dependency setup process when specified in `component_config.json` (see [run_external_build.sh](#3-run_external_buildsh) section), it can also be used directly for the main component as a convenience script that handles the complete build pipeline. - -#### Individual Steps - -```bash -# Step 1: Setup dependencies only -./cov_docker_script/run_setup_dependencies.sh - -# Step 2: Build component only (requires Step 1 completed) -./cov_docker_script/run_native_build.sh -``` +**Note:** `common_external_build.sh` automatically detects the configuration file location and performs both dependency setup and component build in one execution. --- -## 📖 Scripts Reference +## 📖 Build Scripts Reference -### 1. run_setup_dependencies.sh +All build scripts are located in `build_tools_workflows/cov_docker_script/` and are maintained in the [rdkcentral/build_tools_workflows](https://github.com/rdkcentral/build_tools_workflows) repository. -**Purpose:** Sets up build tools and runs dependency setup. +### 1. setup_dependencies.sh -**What it does:** -1. Clones `build_tools_workflows` repository (develop branch) -2. Verifies required scripts are present -3. Runs `setup_dependencies.sh` from build_tools_workflows with config path to: - - Clone all dependency repositories - - Copy headers to `$HOME/usr/include/rdkb/` - - Build and install dependency libraries -4. Leaves build_tools_workflows in place for run_native_build.sh +**Purpose:** Clone and build all external dependencies required by the component. + +**Location:** `build_tools_workflows/cov_docker_script/setup_dependencies.sh` **Usage:** ```bash -./run_setup_dependencies.sh +./build_tools_workflows/cov_docker_script/setup_dependencies.sh -# Clean build -CLEAN_BUILD=true ./run_setup_dependencies.sh +# Example +./build_tools_workflows/cov_docker_script/setup_dependencies.sh ./cov_docker_script/component_config.json ``` -**Required files:** -- `component_config.json` (defines dependencies) - -**Outputs:** -- Downloads: `$HOME/build/` (dependency repositories) -- Headers: `$HOME/usr/include/rdkb/` -- Libraries: `$HOME/usr/local/lib/`, `$HOME/usr/lib/` -- build_tools_workflows: Remains in place for run_native_build.sh +**What it does:** +1. Reads dependency list from `component_config.json` +2. Clones all dependency repositories to `$HOME/build/` +3. Copies header files to `$HOME/usr/include/rdkb/` +4. Builds and installs dependency libraries to `$HOME/usr/local/lib/` and `$HOME/usr/lib/` **Environment Variables:** - `BUILD_DIR` - Override build directory (default: `$HOME/build`) - `USR_DIR` - Override install directory (default: `$HOME/usr`) -- `CLEAN_BUILD` - Set to `true` to remove previous builds +- `CLEAN_BUILD` - Set to `true` to remove previous builds before starting + +**Outputs:** +- Dependency source code: `$HOME/build//` +- Headers: `$HOME/usr/include/rdkb/` +- Libraries: `$HOME/usr/local/lib/` and `$HOME/usr/lib/` --- -### 2. run_native_build.sh +### 2. build_native.sh -**Purpose:** Verifies build tools and builds the component. +**Purpose:** Build the main component using autotools, cmake, or meson. -**What it does:** -1. Verifies `build_tools_workflows` directory exists (cloned by `run_setup_dependencies.sh`) -2. Verifies `build_native.sh` is present -3. Runs `build_native.sh` from build_tools_workflows with config and component paths to: - - Apply patches to source code - - Configure build environment - - Build component - - Install libraries -4. Cleans up build_tools_workflows directory +**Location:** `build_tools_workflows/cov_docker_script/build_native.sh` **Usage:** ```bash -./run_native_build.sh +./build_tools_workflows/cov_docker_script/build_native.sh + +# Example +./build_tools_workflows/cov_docker_script/build_native.sh ./cov_docker_script/component_config.json "$(pwd)" ``` +**What it does:** +1. Reads build configuration from `component_config.json` +2. Applies source patches (if configured) +3. Processes component headers +4. Reads compiler/linker flags from `configure_options.conf` +5. Runs pre-build commands (if configured) +6. Configures and builds the component (autogen/configure/make or cmake/make) +7. Installs component libraries to `$HOME/usr/local/lib/` + **Prerequisites:** -- `run_setup_dependencies.sh` must be run first (to clone build_tools_workflows) +- `setup_dependencies.sh` must be run first - All dependency headers/libraries must be available **Required files:** -- `component_config.json` (defines component build settings) -- `configure_options.conf` (autotools configuration) +- `component_config.json` - Build configuration +- `configure_options.conf` - Compiler/linker flags (for autotools builds) **Outputs:** - Component libraries in `$HOME/usr/local/lib/` @@ -156,74 +177,46 @@ CLEAN_BUILD=true ./run_setup_dependencies.sh --- -### 3. run_external_build.sh +### 3. common_external_build.sh -**Purpose:** Builds dependencies with complex build requirements (invoked from component_config.json). +**Purpose:** Combined script that runs both dependency setup and component build. -**Key Differences from run_native_build.sh:** -- Designed for **dependency repositories**, not the main component -- Invokes `common_external_build.sh` without arguments (dependencies manage their own configuration) -- Does **NOT** clean up `build_tools_workflows` (may be used by multiple dependencies) -- Typically called automatically during dependency setup, not manually - -**What it does:** -1. Clones `build_tools_workflows` if not present (or verifies it exists) -2. Verifies `common_external_build.sh` is present -3. Runs `common_external_build.sh` from build_tools_workflows -4. Preserves `build_tools_workflows` directory for subsequent use +**Location:** `build_tools_workflows/cov_docker_script/common_external_build.sh` **Usage:** ```bash -./run_external_build.sh -``` +./build_tools_workflows/cov_docker_script/common_external_build.sh [config-file] -**Prerequisites:** -- `run_setup_dependencies.sh` must be run first (to clone build_tools_workflows) -- All dependency headers/libraries must be available +# Example with explicit config +./build_tools_workflows/cov_docker_script/common_external_build.sh ./cov_docker_script/component_config.json -**Outputs:** -- Build artifacts based on common_external_build.sh implementation -- build_tools_workflows remains in place (not cleaned up) - -**Primary Use Case - Dependency Builds in component_config.json:** +# Example with auto-detection +./build_tools_workflows/cov_docker_script/common_external_build.sh +``` -This script is primarily used to build **dependency repositories** that have complex build requirements. When a dependency has its own `cov_docker_script/run_external_build.sh`, it can be invoked from the parent component's `component_config.json`. +**What it does:** +1. Auto-detects `component_config.json` location (if not provided) +2. Runs `setup_dependencies.sh` with the configuration +3. Runs `build_native.sh` with the configuration +4. Provides complete build pipeline in one command -**Example configuration in component_config.json:** +**Use Cases:** +- **Main component builds:** Simplifies the build process into a single command +- **Dependency builds:** Used when a dependency repository has complex build requirements and is referenced in a parent component's `component_config.json` with `"type": "script"` +**Example in component_config.json (for dependency builds):** ```json { "name": "Utopia", "repo": "https://github.com/rdkcentral/utopia.git", - "branch": "feature/cov_native_build", - "header_paths": [ - { "source": "source/include", "destination": "$HOME/usr/include/rdkb" } - ], + "branch": "develop", "build": { "type": "script", - "script": "cov_docker_script/run_external_build.sh" + "script": "build_tools_workflows/cov_docker_script/common_external_build.sh" } } ``` -**How it works for dependencies:** -1. The parent component's `setup_dependencies.sh` clones the dependency repository (e.g., Utopia) -2. The dependency's `run_external_build.sh` is executed from the dependency's directory -3. This script internally: - - Sets up the dependency's own build tools and dependencies - - Runs the dependency's native build process - - Produces shared libraries (`.so` files) -4. The generated shared libraries are installed to `$HOME/usr/local/lib/` or `$HOME/usr/lib/` -5. These libraries are then available for the parent component's native build - -**When to use this approach:** -- Dependency has complex multi-step build requirements -- Dependency has its own sub-dependencies that need to be built -- Dependency requires custom build logic beyond standard autotools/cmake/meson -- Dependency repository already has a `cov_docker_script/run_external_build.sh` script - -**Note:** This approach allows dependencies to manage their own complete build pipeline, producing the necessary shared libraries that the parent component links against during its native compilation. - --- ## 📝 Configuration Files @@ -305,43 +298,60 @@ See [configure_options.conf](configure_options.conf) for your component's comple ## 🔧 Build System Architecture ``` -┌─────────────────────────────────────────────────────┐ -│ run_setup_dependencies.sh │ -│ ┌──────────────────────────────────────────────┐ │ -│ │ 1. Clone build_tools_workflows │ │ -│ │ (develop branch) │ │ -│ │ │ │ -│ │ 2. Verify required scripts present │ │ -│ │ │ │ -│ │ 3. Run setup_dependencies.sh from │ │ -│ │ build_tools_workflows with config path │ │ -│ │ - Read component_config.json │ │ -│ │ - Clone dependency repos │ │ -│ │ - Copy headers │ │ -│ │ - Build & install libraries │ │ -│ └──────────────────────────────────────────────┘ │ -└─────────────────────────────────────────────────────┘ - │ - ▼ -┌─────────────────────────────────────────────────────┐ -│ run_native_build.sh │ -│ ┌──────────────────────────────────────────────┐ │ -│ │ 1. Verify build_tools_workflows exists │ │ -│ │ (cloned by run_setup_dependencies.sh) │ │ -│ │ │ │ -│ │ 2. Run build_native.sh from │ │ -│ │ build_tools_workflows with config and │ │ -│ │ component directory paths │ │ -│ │ - Process component headers │ │ -│ │ - Apply source patches (if configured) │ │ -│ │ - Read configure_options.conf │ │ -│ │ - Configure build (autogen/configure) │ │ -│ │ - Build component (make/cmake/meson) │ │ -│ │ - Install libraries │ │ -│ │ │ │ -│ │ 3. Cleanup build_tools_workflows directory │ │ -│ └──────────────────────────────────────────────┘ │ -└─────────────────────────────────────────────────────┘ +┌─────────────────────────────────────────────────────────────┐ +│ Git Submodule: build_tools_workflows (develop branch) │ +│ https://github.com/rdkcentral/build_tools_workflows │ +└─────────────────────────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ setup_dependencies.sh │ +│ build_tools_workflows/cov_docker_script/ │ +│ ┌───────────────────────────────────────────────────────┐ │ +│ │ Input: ./cov_docker_script/component_config.json │ │ +│ │ │ │ +│ │ 1. Read dependencies from component_config.json │ │ +│ │ 2. Clone dependency repositories to $HOME/build/ │ │ +│ │ 3. Copy headers to $HOME/usr/include/rdkb/ │ │ +│ │ 4. Build dependencies (autotools/cmake/meson) │ │ +│ │ 5. Install libraries to $HOME/usr/local/lib/ │ │ +│ └───────────────────────────────────────────────────────┘ │ +└─────────────────────────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ build_native.sh │ +│ build_tools_workflows/cov_docker_script/ │ +│ ┌───────────────────────────────────────────────────────┐ │ +│ │ Input: ./cov_docker_script/component_config.json │ │ +│ │ $(pwd) # Component directory │ │ +│ │ │ │ +│ │ 1. Process component headers │ │ +│ │ 2. Apply source patches (if configured) │ │ +│ │ 3. Run pre-build commands (if configured) │ │ +│ │ 4. Read configure_options.conf │ │ +│ │ 5. Configure build (autogen/configure or cmake) │ │ +│ │ 6. Build component (make) │ │ +│ │ 7. Install libraries to $HOME/usr/local/lib/ │ │ +│ └───────────────────────────────────────────────────────┘ │ +└─────────────────────────────────────────────────────────────┘ +``` + +**Alternative: Single-Command Build** + +``` +┌─────────────────────────────────────────────────────────────┐ +│ common_external_build.sh │ +│ build_tools_workflows/cov_docker_script/ │ +│ ┌───────────────────────────────────────────────────────┐ │ +│ │ Auto-detects component_config.json │ │ +│ │ │ │ +│ │ 1. Run setup_dependencies.sh │ │ +│ │ 2. Run build_native.sh │ │ +│ │ │ │ +│ │ Complete pipeline in one command │ │ +│ └───────────────────────────────────────────────────────┘ │ +└─────────────────────────────────────────────────────────────┘ ``` --- @@ -357,10 +367,10 @@ See [configure_options.conf](configure_options.conf) for your component's comple ls -la $HOME/usr/include/rdkb/ # Verify component_config.json has correct header_paths -cat component_config.json | jq '.dependencies.repos[].header_paths' +cat ./cov_docker_script/component_config.json | jq '.dependencies.repos[].header_paths' # Re-run dependency setup -CLEAN_BUILD=true ./cov_docker_script/run_setup_dependencies.sh +CLEAN_BUILD=true ./build_tools_workflows/cov_docker_script/setup_dependencies.sh ./cov_docker_script/component_config.json ``` **Problem:** Missing libraries @@ -383,22 +393,29 @@ cat build/meson-log.txt # For meson ```bash # Solution: Check configure_options.conf syntax -cat cov_docker_script/configure_options.conf +cat ./cov_docker_script/configure_options.conf # Verify flags are valid ./configure --help ``` +**Problem:** build_tools_workflows not found + +```bash +# Solution: Initialize git submodules +git submodule update --init --recursive --remote + +# Verify submodule is present +ls -la build_tools_workflows/cov_docker_script/ +``` + ### Script Errors -**Problem:** Script not found +**Problem:** Permission denied ```bash -# Solution: Ensure scripts are executable -chmod +x cov_docker_script/*.sh - -# Check if build_tools_workflows was cloned -ls -la ../build_tools_workflows/ +# Solution: Make scripts executable +chmod +x build_tools_workflows/cov_docker_script/*.sh ``` **Problem:** Permission denied @@ -406,47 +423,37 @@ ls -la ../build_tools_workflows/ ```bash # Solution: Fix container permissions # (Run on host, not in container) -sudo docker exec rdkb-builder groupadd $USER --gid=$(id -g $USER) -sudo docker exec rdkb-builder useradd -m $USER -G users \ - --uid=$(id -u $USER) --gid=$(id -g $USER) +sudo docker exec chown -R $(id -u):$(id -g) /path/to/workspace ``` --- -## 📚 Related Documentation - -- **Build Tools Repository:** [build_tools_workflows](https://github.com/rdkcentral/build_tools_workflows/tree/develop) -- **Docker Environment:** [docker-rdk-ci](https://github.com/rdkcentral/docker-rdk-ci) -- **Example Component:** [moca-agent](https://github.com/rdkcentral/moca-agent) (reference implementation) -- **Detailed Build Guide:** See `build_tools_workflows/cov_docker_script/README.md` - ---- - -## ⚠️ Important Notes - -### DO NOT Modify - -The following scripts are automatically copied from `build_tools_workflows` and **must not be modified locally**: - -- ❌ `build_native.sh` -- ❌ `common_build_utils.sh` -- ❌ `common_external_build.sh` -- ❌ `setup_dependencies.sh` - -Any changes will be overwritten when wrapper scripts run. - -### DO Modify - -The following files are component-specific and **should be customized**: +## 🔄 Workflow Integration -- ✅ `component_config.json` - Dependency and build configuration -- ✅ `configure_options.conf` - Autotools flags -- ✅ `run_setup_dependencies.sh` - Wrapper script (if needed) -- ✅ `run_native_build.sh` - Wrapper script (if needed) +### CI/CD Integration (GitHub Actions) ---- +This configuration is used by GitHub Actions to validate builds. See [.github/workflows/native-build.yml](.github/workflows/native-build.yml): -## 🔄 Workflow Integration +```yaml +- 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)" +``` ### Local Development @@ -454,34 +461,44 @@ The following files are component-specific and **should be customized**: # Make changes to source code vim source/your_component.c -# Rebuild component -CLEAN_BUILD=true ./cov_docker_script/run_native_build.sh +# Rebuild component (dependencies already built) +./build_tools_workflows/cov_docker_script/build_native.sh ./cov_docker_script/component_config.json "$(pwd)" + +# Clean rebuild (rebuild dependencies too) +CLEAN_BUILD=true ./build_tools_workflows/cov_docker_script/setup_dependencies.sh ./cov_docker_script/component_config.json +./build_tools_workflows/cov_docker_script/build_native.sh ./cov_docker_script/component_config.json "$(pwd)" ``` -### CI/CD Integration +--- -This configuration is used by GitHub Actions to validate builds: +## � Related Documentation -```yaml -- name: Setup Dependencies - run: ./cov_docker_script/run_setup_dependencies.sh +- **Build Tools Repository:** [build_tools_workflows](https://github.com/rdkcentral/build_tools_workflows/tree/develop) +- **Docker Environment:** [docker-rdk-ci](https://github.com/rdkcentral/docker-rdk-ci) +- **Detailed Build Guide:** See `build_tools_workflows/cov_docker_script/README.md` -- name: Build Component - run: ./cov_docker_script/run_native_build.sh -``` +--- -See `.github/workflows/` for complete CI configuration. +## ⚠️ Important Notes ---- +### DO NOT Modify Scripts in build_tools_workflows + +The scripts in `build_tools_workflows/` are maintained as a git submodule and **must not be modified locally**: + +- ❌ `build_tools_workflows/cov_docker_script/build_native.sh` +- ❌ `build_tools_workflows/cov_docker_script/common_build_utils.sh` +- ❌ `build_tools_workflows/cov_docker_script/common_external_build.sh` +- ❌ `build_tools_workflows/cov_docker_script/setup_dependencies.sh` -## 📞 Support +Changes to these scripts should be made in the [rdkcentral/build_tools_workflows](https://github.com/rdkcentral/build_tools_workflows) repository. -For issues or questions: +### DO Modify Component Configuration + +The following files are component-specific and **should be customized**: -1. Check [Troubleshooting](#troubleshooting) section -2. Review [build_tools_workflows README](https://github.com/rdkcentral/build_tools_workflows/blob/develop/cov_docker_script/README.md) -3. Raise issue in your component repository or [build_tools_workflows](https://github.com/rdkcentral/build_tools_workflows/issues) +- ✅ `cov_docker_script/component_config.json` - Dependency and build configuration +- ✅ `cov_docker_script/configure_options.conf` - Autotools compiler/linker flags --- -**Last Updated:** January 2026 +**Last Updated:** February 2026 From 131f8cbcbd592a57c5d93a8db8d6e7609c89633e Mon Sep 17 00:00:00 2001 From: Hirrangandhi Devaraj <208949566+hirrangandhid@users.noreply.github.com> Date: Fri, 6 Feb 2026 15:23:02 +0530 Subject: [PATCH 4/4] Removed README.md --- cov_docker_script/README.md | 504 ------------------------------------ 1 file changed, 504 deletions(-) delete mode 100644 cov_docker_script/README.md diff --git a/cov_docker_script/README.md b/cov_docker_script/README.md deleted file mode 100644 index 022c78bb..00000000 --- a/cov_docker_script/README.md +++ /dev/null @@ -1,504 +0,0 @@ -# Component Native Build Configuration - -**Coverity/Native build configuration for RDK-B components.** - ---- - -## 📋 Overview - -This directory contains configuration files for building RDK-B components in a native (non-Yocto) environment. This setup enables Coverity static analysis and validates that components can be built with explicitly declared dependencies. - -The build scripts are maintained in the `build_tools_workflows` repository and included as a git submodule. - -### Directory Contents - -``` -/ -├── .gitmodules # Git submodule configuration -├── cov_docker_script/ -│ ├── README.md # This file -│ ├── component_config.json # Dependency & build configuration -│ └── configure_options.conf # Autotools configure flags (optional) -└── build_tools_workflows/ # Git submodule (rdkcentral/build_tools_workflows) - └── cov_docker_script/ - ├── build_native.sh # Build main component - ├── common_build_utils.sh # Utility functions for other scripts - ├── common_external_build.sh # Combined setup + build script - ├── setup_dependencies.sh # Setup build tools & dependencies - └── README.md # Detailed build tools documentation -``` - -### Important: Add to .gitignore - -Add the following to your component's `.gitignore` to exclude temporary build artifacts: - -```gitignore -# Dependency build artifacts -build/ -``` - -### Required: Add build_tools_workflows as Git Submodule - -The `build_tools_workflows` directory **must be tracked as a git submodule** in your repository. Add it using the following commands: - -```bash -# Add build_tools_workflows as a submodule -git submodule add -b develop https://github.com/rdkcentral/build_tools_workflows.git build_tools_workflows - -# Commit the .gitmodules file and submodule reference -git add .gitmodules build_tools_workflows -git commit -m "Add build_tools_workflows as submodule" -``` - -**Important:** When cloning your repository, always initialize and update submodules to ensure `build_tools_workflows` is available: - -```bash -git clone --recurse-submodules -# OR -git clone -git submodule update --init --recursive -``` - ---- - -## 🚀 Quick Start - -### Prerequisites - -- Docker container with [docker-rdk-ci](https://github.com/rdkcentral/docker-rdk-ci) image -- Git submodules initialized - -### Build Commands - -#### Complete Build Pipeline - -```bash -# From your component root directory -cd /path/to/your-component - -# Initialize/update build_tools_workflows submodule -git submodule update --init --recursive --remote - -# Step 1: Setup dependencies -./build_tools_workflows/cov_docker_script/setup_dependencies.sh ./cov_docker_script/component_config.json - -# Step 2: Build component -./build_tools_workflows/cov_docker_script/build_native.sh ./cov_docker_script/component_config.json "$(pwd)" - -# Clean build (removes previous artifacts) -CLEAN_BUILD=true ./build_tools_workflows/cov_docker_script/setup_dependencies.sh ./cov_docker_script/component_config.json -./build_tools_workflows/cov_docker_script/build_native.sh ./cov_docker_script/component_config.json "$(pwd)" -``` - -#### Alternative: Single-Script Build (All-in-One) - -```bash -# Run setup dependencies + native build in one command -./build_tools_workflows/cov_docker_script/common_external_build.sh ./cov_docker_script/component_config.json - -# Clean build -CLEAN_BUILD=true ./build_tools_workflows/cov_docker_script/common_external_build.sh ./cov_docker_script/component_config.json -``` - -**Note:** `common_external_build.sh` automatically detects the configuration file location and performs both dependency setup and component build in one execution. - ---- - -## 📖 Build Scripts Reference - -All build scripts are located in `build_tools_workflows/cov_docker_script/` and are maintained in the [rdkcentral/build_tools_workflows](https://github.com/rdkcentral/build_tools_workflows) repository. - -### 1. setup_dependencies.sh - -**Purpose:** Clone and build all external dependencies required by the component. - -**Location:** `build_tools_workflows/cov_docker_script/setup_dependencies.sh` - -**Usage:** -```bash -./build_tools_workflows/cov_docker_script/setup_dependencies.sh - -# Example -./build_tools_workflows/cov_docker_script/setup_dependencies.sh ./cov_docker_script/component_config.json -``` - -**What it does:** -1. Reads dependency list from `component_config.json` -2. Clones all dependency repositories to `$HOME/build/` -3. Copies header files to `$HOME/usr/include/rdkb/` -4. Builds and installs dependency libraries to `$HOME/usr/local/lib/` and `$HOME/usr/lib/` - -**Environment Variables:** -- `BUILD_DIR` - Override build directory (default: `$HOME/build`) -- `USR_DIR` - Override install directory (default: `$HOME/usr`) -- `CLEAN_BUILD` - Set to `true` to remove previous builds before starting - -**Outputs:** -- Dependency source code: `$HOME/build//` -- Headers: `$HOME/usr/include/rdkb/` -- Libraries: `$HOME/usr/local/lib/` and `$HOME/usr/lib/` - ---- - -### 2. build_native.sh - -**Purpose:** Build the main component using autotools, cmake, or meson. - -**Location:** `build_tools_workflows/cov_docker_script/build_native.sh` - -**Usage:** -```bash -./build_tools_workflows/cov_docker_script/build_native.sh - -# Example -./build_tools_workflows/cov_docker_script/build_native.sh ./cov_docker_script/component_config.json "$(pwd)" -``` - -**What it does:** -1. Reads build configuration from `component_config.json` -2. Applies source patches (if configured) -3. Processes component headers -4. Reads compiler/linker flags from `configure_options.conf` -5. Runs pre-build commands (if configured) -6. Configures and builds the component (autogen/configure/make or cmake/make) -7. Installs component libraries to `$HOME/usr/local/lib/` - -**Prerequisites:** -- `setup_dependencies.sh` must be run first -- All dependency headers/libraries must be available - -**Required files:** -- `component_config.json` - Build configuration -- `configure_options.conf` - Compiler/linker flags (for autotools builds) - -**Outputs:** -- Component libraries in `$HOME/usr/local/lib/` -- Build artifacts in component root directory - ---- - -### 3. common_external_build.sh - -**Purpose:** Combined script that runs both dependency setup and component build. - -**Location:** `build_tools_workflows/cov_docker_script/common_external_build.sh` - -**Usage:** -```bash -./build_tools_workflows/cov_docker_script/common_external_build.sh [config-file] - -# Example with explicit config -./build_tools_workflows/cov_docker_script/common_external_build.sh ./cov_docker_script/component_config.json - -# Example with auto-detection -./build_tools_workflows/cov_docker_script/common_external_build.sh -``` - -**What it does:** -1. Auto-detects `component_config.json` location (if not provided) -2. Runs `setup_dependencies.sh` with the configuration -3. Runs `build_native.sh` with the configuration -4. Provides complete build pipeline in one command - -**Use Cases:** -- **Main component builds:** Simplifies the build process into a single command -- **Dependency builds:** Used when a dependency repository has complex build requirements and is referenced in a parent component's `component_config.json` with `"type": "script"` - -**Example in component_config.json (for dependency builds):** -```json -{ - "name": "Utopia", - "repo": "https://github.com/rdkcentral/utopia.git", - "branch": "develop", - "build": { - "type": "script", - "script": "build_tools_workflows/cov_docker_script/common_external_build.sh" - } -} -``` - ---- - -## 📝 Configuration Files - -### component_config.json - -**JSON configuration defining all dependencies and build settings.** - -**Key Sections:** - -1. **dependencies.repos[]** - External dependencies required by your component - ```json - { - "name": "rbus", - "repo": "https://github.com/rdkcentral/rbus.git", - "branch": "v2.7.0", - "header_paths": [...], - "build": {...} - } - ``` - -2. **native_component** - Component build configuration - ```json - { - "name": "your-component", - "build": { - "type": "autotools", - "configure_options_file": "cov_docker_script/configure_options.conf" - } - } - ``` - -**Example Dependencies:** -Your component may require dependencies such as: -- rbus -- rdk_logger -- safec -- common-library -- halinterface -- And other component-specific dependencies - -See [component_config.json](component_config.json) for your component's specific dependency configuration. - ---- - -### configure_options.conf - -**Autotools configuration file with preprocessor, compiler, and linker flags.** - -**Format:** -```properties -[CPPFLAGS] --I$HOME/usr/include/rdkb/ --DFEATURE_FLAG - -[CFLAGS] --Wall -Wextra - -[LDFLAGS] --L$HOME/usr/local/lib/ -``` - -**Sections:** -- `[CPPFLAGS]` - Preprocessor flags (includes `-I`, defines `-D`) -- `[CFLAGS]` - C compiler flags -- `[CXXFLAGS]` - C++ compiler flags -- `[LDFLAGS]` - Linker flags (library paths `-L`, linker options `-Wl`) - -**Component-Specific Flags:** -Customize flags based on your component's requirements: -- Platform defines: `_COSA_INTEL_USG_ARM_`, `_COSA_BCM_ARM_`, etc. -- Product defines: `_XB6_PRODUCT_REQ_`, `_XB7_PRODUCT_REQ_`, etc. -- Feature flags: `FEATURE_SUPPORT_RDKLOG`, component-specific features, etc. - -See [configure_options.conf](configure_options.conf) for your component's complete flag list. - ---- - -## 🔧 Build System Architecture - -``` -┌─────────────────────────────────────────────────────────────┐ -│ Git Submodule: build_tools_workflows (develop branch) │ -│ https://github.com/rdkcentral/build_tools_workflows │ -└─────────────────────────────────────────────────────────────┘ - │ - ▼ -┌─────────────────────────────────────────────────────────────┐ -│ setup_dependencies.sh │ -│ build_tools_workflows/cov_docker_script/ │ -│ ┌───────────────────────────────────────────────────────┐ │ -│ │ Input: ./cov_docker_script/component_config.json │ │ -│ │ │ │ -│ │ 1. Read dependencies from component_config.json │ │ -│ │ 2. Clone dependency repositories to $HOME/build/ │ │ -│ │ 3. Copy headers to $HOME/usr/include/rdkb/ │ │ -│ │ 4. Build dependencies (autotools/cmake/meson) │ │ -│ │ 5. Install libraries to $HOME/usr/local/lib/ │ │ -│ └───────────────────────────────────────────────────────┘ │ -└─────────────────────────────────────────────────────────────┘ - │ - ▼ -┌─────────────────────────────────────────────────────────────┐ -│ build_native.sh │ -│ build_tools_workflows/cov_docker_script/ │ -│ ┌───────────────────────────────────────────────────────┐ │ -│ │ Input: ./cov_docker_script/component_config.json │ │ -│ │ $(pwd) # Component directory │ │ -│ │ │ │ -│ │ 1. Process component headers │ │ -│ │ 2. Apply source patches (if configured) │ │ -│ │ 3. Run pre-build commands (if configured) │ │ -│ │ 4. Read configure_options.conf │ │ -│ │ 5. Configure build (autogen/configure or cmake) │ │ -│ │ 6. Build component (make) │ │ -│ │ 7. Install libraries to $HOME/usr/local/lib/ │ │ -│ └───────────────────────────────────────────────────────┘ │ -└─────────────────────────────────────────────────────────────┘ -``` - -**Alternative: Single-Command Build** - -``` -┌─────────────────────────────────────────────────────────────┐ -│ common_external_build.sh │ -│ build_tools_workflows/cov_docker_script/ │ -│ ┌───────────────────────────────────────────────────────┐ │ -│ │ Auto-detects component_config.json │ │ -│ │ │ │ -│ │ 1. Run setup_dependencies.sh │ │ -│ │ 2. Run build_native.sh │ │ -│ │ │ │ -│ │ Complete pipeline in one command │ │ -│ └───────────────────────────────────────────────────────┘ │ -└─────────────────────────────────────────────────────────────┘ -``` - ---- - -## 🐛 Troubleshooting - -### Build Failures - -**Problem:** Missing headers - -```bash -# Solution: Check if dependencies were installed -ls -la $HOME/usr/include/rdkb/ - -# Verify component_config.json has correct header_paths -cat ./cov_docker_script/component_config.json | jq '.dependencies.repos[].header_paths' - -# Re-run dependency setup -CLEAN_BUILD=true ./build_tools_workflows/cov_docker_script/setup_dependencies.sh ./cov_docker_script/component_config.json -``` - -**Problem:** Missing libraries - -```bash -# Solution: Check library installation -ls -la $HOME/usr/local/lib/ -ls -la $HOME/usr/lib/ - -# Verify PKG_CONFIG_PATH -echo $PKG_CONFIG_PATH - -# Check if dependency build failed -cd $HOME/build/ -cat config.log # For autotools -cat build/meson-log.txt # For meson -``` - -**Problem:** Configure errors - -```bash -# Solution: Check configure_options.conf syntax -cat ./cov_docker_script/configure_options.conf - -# Verify flags are valid -./configure --help -``` - -**Problem:** build_tools_workflows not found - -```bash -# Solution: Initialize git submodules -git submodule update --init --recursive --remote - -# Verify submodule is present -ls -la build_tools_workflows/cov_docker_script/ -``` - -### Script Errors - -**Problem:** Permission denied - -```bash -# Solution: Make scripts executable -chmod +x build_tools_workflows/cov_docker_script/*.sh -``` - -**Problem:** Permission denied - -```bash -# Solution: Fix container permissions -# (Run on host, not in container) -sudo docker exec chown -R $(id -u):$(id -g) /path/to/workspace -``` - ---- - -## 🔄 Workflow Integration - -### CI/CD Integration (GitHub Actions) - -This configuration is used by GitHub Actions to validate builds. See [.github/workflows/native-build.yml](.github/workflows/native-build.yml): - -```yaml -- 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)" -``` - -### Local Development - -```bash -# Make changes to source code -vim source/your_component.c - -# Rebuild component (dependencies already built) -./build_tools_workflows/cov_docker_script/build_native.sh ./cov_docker_script/component_config.json "$(pwd)" - -# Clean rebuild (rebuild dependencies too) -CLEAN_BUILD=true ./build_tools_workflows/cov_docker_script/setup_dependencies.sh ./cov_docker_script/component_config.json -./build_tools_workflows/cov_docker_script/build_native.sh ./cov_docker_script/component_config.json "$(pwd)" -``` - ---- - -## � Related Documentation - -- **Build Tools Repository:** [build_tools_workflows](https://github.com/rdkcentral/build_tools_workflows/tree/develop) -- **Docker Environment:** [docker-rdk-ci](https://github.com/rdkcentral/docker-rdk-ci) -- **Detailed Build Guide:** See `build_tools_workflows/cov_docker_script/README.md` - ---- - -## ⚠️ Important Notes - -### DO NOT Modify Scripts in build_tools_workflows - -The scripts in `build_tools_workflows/` are maintained as a git submodule and **must not be modified locally**: - -- ❌ `build_tools_workflows/cov_docker_script/build_native.sh` -- ❌ `build_tools_workflows/cov_docker_script/common_build_utils.sh` -- ❌ `build_tools_workflows/cov_docker_script/common_external_build.sh` -- ❌ `build_tools_workflows/cov_docker_script/setup_dependencies.sh` - -Changes to these scripts should be made in the [rdkcentral/build_tools_workflows](https://github.com/rdkcentral/build_tools_workflows) repository. - -### DO Modify Component Configuration - -The following files are component-specific and **should be customized**: - -- ✅ `cov_docker_script/component_config.json` - Dependency and build configuration -- ✅ `cov_docker_script/configure_options.conf` - Autotools compiler/linker flags - ---- - -**Last Updated:** February 2026