DAC is based of 3 stages in BPIR4


Introduction

DAC on Broadband is an enabling technology the purpose of which is to support the flexibility required by the next generation of "smart" routers. DAC on Broadband allows operators to remotely manage the life cycle of containerized applications and services. This negates the need for monolithic system image updates and allows for varied set of deployed services across the customer base where one size does not fit all.
Detailed info is mentioned in wiki page:  DAC on Broadband

Dac functionality in BPIR4.

For dac validation we need dobby, crun and dsm functionalities in the BPIR4 device. So all mentioned functionality has been brought to BPIR4 platform by including "dac" distro feature into the build, for reference follow mentioned jira. RDKBACCL-318 - Getting issue details... STATUS

OCI image generation.

OCI image generation is specifically for broadband application developers, in which they can create their application irrespective of platform. That image will be compatible with all the platforms but only difference is developer need to define the arch of the platform like 32 bit or 64 bit.
Generic meta layer for the generation of OCI image will meta-dac-sdk-broadband.(https://github.com/rdkcentral/meta-dac-sdk-broadband)
Build instructions are mentioned below for oci image generation, as of now we are offering "iperf3 application" in meta-dac-sdk-broadband. For any query you can refer mentioned jira. RDKBACCL-325 - Getting issue details... STATUS

OCI Build instructions for aarch64
#following repo commands will required meta-layers see manifest of BPIR4
repo init -u https://code.rdkcentral.com/r/manifests -b kirkstone -m rdkb-bpi-extsrc.xml  

#execute the below command to clone the projects
sed -i '/oe-layers.xml/a  \ \ \ \ <project name="rdkcentral/meta-dac-sdk-broadband" remote="github" path="meta-dac-sdk-broadband" revision="main" /> \n\ \ \ \ <project name="yoctoproject/poky" remote="github" path="." revision="1e0d58c53b7d9c3feb631e46666ae7a3e3614253" upstream="kirkstone"/>' .repo/manifests/rdkb-bpi-extsrc.xml

#Below command to sync all the code to the folder.
repo sync -j `nproc` --no-clone-bundle

#cherrypick the below link to overcome the old syntax override issue
cd bitbake && git fetch https://code.rdkcentral.com/r/rdk/components/opensource/oe/bitbake refs/changes/35/85335/3 && git cherry-pick FETCH_HEAD && cd .. 
 
#Add below lines to "oe-init-build-env".
TOP_DIR="$(pwd)/.."
internal_link='gerrit\.mediatek\.inc\/openwrt\/feeds\/mtk_openwrt_feeds'
external_link='git01\.mediatek\.com\/openwrt\/feeds\/mtk-openwrt-feeds'    
sed -i "s/$internal_link/$external_link/" $TOP_DIR/meta-filogic/recipes-netsys/pce/pce.bb
sed -i "s/$internal_link/$external_link/" $TOP_DIR/meta-filogic/recipes-netsys/eip-197/eip-197.bb

. ./oe-init-build-env

cp ../meta-dac-sdk-broadband/manifests/bblayers.conf conf/

sed -i "s/meta-raspberrypi/meta-filogic/" conf/bblayers.conf

#Add below lines in conf/local.conf
require conf/machine/include/arm/armv8a/tune-cortexa53.inc
DISTRO_FEATURES_append = " kirkstone"
MACHINE = "filogic"
BBMASK .= "|meta-filogic/recipes-ccsp/hal"
BBMASK .= "|meta-filogic/recipes-wifi/"
 
# Building Iperf DAC app
bitbake dac-image-iperf3 

Instructions for on-boarding new applications to meta-dac-sdk-broadband .

As of now we are offering iperf application in meta-dac-sdk-broadband, So taking Iperf as reference for this steps.

1)At initial create a recipe wrt application, where we will be including all the info for compilation.

 eg: Iperf application recipe file path and info.
         meta-dac-sdk-broadband/recipes-example/example/iperf3/iperf3_3.11.bb .

2)Create and include application dependent parameters info in <application Name>-appmetadata.json file.

eg: meta data file for iperf application.
       meta-dac-sdk-broadband/recipes-example/images/metadatas/iperf3-appmetadata.json .

3)Create application specific image bb file which is responsible for combining all the depended component to generate final OCI image for application.

eg: Image bb file for iperf application
       meta-dac-sdk-broadband/recipes-example/images/dac-image-iperf3.bb .

4)Create bbclass file for the application to inherit all the changes to application wrt to oci image supported packages.

eg: bbclass file for iperf application.
      meta-dac-sdk-broadband/classes/dac-image-iperf3.bbclass

5)After completing all the above mentioned steps you can follow osi image build instructions which are mentioned above with specified application name to bitbake command.

eg: bitbake command for iperf oci image generation.
       bitbake dac-image-iperf3.

Bundle Creation for BPIR4.

After OCI image gets generated we need to generate bundlegen for the generated oci image to make that application platform compatible. (https://github.com/rdkcentral/BundleGen.git)
For BPIR4 we are having below mentioned templates.
            1)bpir4_reference.json
            2)bpir4_reference_libs.json
Before generating bundlegen make sure that you are having supported packages in your local machine(linux machine) for bundlegen support.

Bundlegen steps for BPIR4 Platform.
git clone https://github.com/rdkcentral/BundleGen.git  (clone Bundlegen code.) 
cd BundleGen 
python3 setup.py build 
python3 setup.py install 
export PYTHONPATH=/usr/lib/python3.8/site:$PYTHONPATH
# Copy generated oci image to this folder.
chmod 777 dac-image-iperf3-filogic-20250523063607.bin-oci.tar
tar -xvf dac-image-iperf3-filogic-20250523063607.bin-oci.tar
chmod 777 dac-image-iperf3-filogic-20250523063607.bin-oci
bundlegen generate --platform bpir4_reference oci:dac-image-iperf3-filogic-20250523063607.bin-oci ~/iperf3filogic (creates the iperf3filogic.tar.gz bundle file)

   Bundlegen Jira for reference.
          RDKBACCL-326 - Getting issue details... STATUS

Iperf3 DAC Bundle - iperf3-DAC-Bundle-9Dec25.tar.gz

DAC application validation.

Testing with UspPa

  1. Verify the Device.SoftwareModules using below cmd
root@Filogic-GW:~/destination#  dmcli eRT getv Device.SoftwareModules.
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
Execution succeed.
Parameter    1 name: Device.SoftwareModules.ExecEnv.1.CurrentRunLevel
               type:        int,    value: 5 
Parameter    2 name: Device.SoftwareModules.ExecEnv.1.Enable
               type:       bool,    value: true 
Parameter    3 name: Device.SoftwareModules.ExecEnv.1.InitialRunLevel
               type:        int,    value: 5 
Parameter    4 name: Device.SoftwareModules.ExecEnv.1.Name
               type:     string,    value: default 
Parameter    5 name: Device.SoftwareModules.ExecEnv.1.Status
               type:     string,    value: Up 
Parameter    6 name: Device.SoftwareModules.ExecEnv.2.CurrentRunLevel
               type:        int,    value: 5 
Parameter    7 name: Device.SoftwareModules.ExecEnv.2.Enable
               type:       bool,    value: true 
Parameter    8 name: Device.SoftwareModules.ExecEnv.2.InitialRunLevel
               type:        int,    value: 5 
Parameter    9 name: Device.SoftwareModules.ExecEnv.2.Name
               type:     string,    value: test 
Parameter   10 name: Device.SoftwareModules.ExecEnv.2.Status
               type:     string,    value: Up 
Parameter   11 name: Device.SoftwareModules.ExecEnv.3.CurrentRunLevel
               type:        int,    value: 5 
Parameter   12 name: Device.SoftwareModules.ExecEnv.3.Enable
               type:       bool,    value: true 
Parameter   13 name: Device.SoftwareModules.ExecEnv.3.InitialRunLevel
               type:        int,    value: 5 
Parameter   14 name: Device.SoftwareModules.ExecEnv.3.Name
               type:     string,    value: user 
Parameter   15 name: Device.SoftwareModules.ExecEnv.3.Status
               type:     string,    value: Up 

2. Bundle Installation - Host iperf bundle on local HTTP apache server and give the HTTP URL in the install command

root@Filogic-GW:~# UspPa -c operate "Device.SoftwareModules.InstallDU(URL=http://192.168.29.199/dec9iperf3.tar.gz)"
Asynchronous Operation (Device.SoftwareModules.InstallDU()) Started successfully.
Device.LocalAgent.Request.1 created.
See log for output arguments of operation

3. Check the Software Modules, Installing should be successful and ExecutionUnit should created and should in Idle state.

root@Filogic-GW:~# dmcli eRT getv Device.SoftwareModules.
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
Execution succeed.
Parameter    1 name: Device.SoftwareModules.DeploymentUnit.1.ExecutionEnvRef
               type:     string,    value: Device.SoftwareModules.ExecEnv.1 
Parameter    2 name: Device.SoftwareModules.DeploymentUnit.1.ExecutionUnitList
               type:     string,    value: Device.SoftwareModules.ExecutionUnit.1 
Parameter    3 name: Device.SoftwareModules.DeploymentUnit.1.Status
               type:     string,    value: Installed 
Parameter    4 name: Device.SoftwareModules.DeploymentUnit.1.URL
               type:     string,    value: http://192.168.29.199/dec9iperf3.tar.gz 
Parameter    5 name: Device.SoftwareModules.ExecEnv.1.CurrentRunLevel
               type:        int,    value: 5 
Parameter    6 name: Device.SoftwareModules.ExecEnv.1.Enable
               type:       bool,    value: true 
Parameter    7 name: Device.SoftwareModules.ExecEnv.1.InitialRunLevel
               type:        int,    value: 5 
Parameter    8 name: Device.SoftwareModules.ExecEnv.1.Name
               type:     string,    value: default 
Parameter    9 name: Device.SoftwareModules.ExecEnv.1.Status
               type:     string,    value: Up 
Parameter   10 name: Device.SoftwareModules.ExecEnv.2.CurrentRunLevel
               type:        int,    value: 5 
Parameter   11 name: Device.SoftwareModules.ExecEnv.2.Enable
               type:       bool,    value: true 
Parameter   12 name: Device.SoftwareModules.ExecEnv.2.InitialRunLevel
               type:        int,    value: 5 
Parameter   13 name: Device.SoftwareModules.ExecEnv.2.Name
               type:     string,    value: test 
Parameter   14 name: Device.SoftwareModules.ExecEnv.2.Status
               type:     string,    value: Up 
Parameter   15 name: Device.SoftwareModules.ExecEnv.3.CurrentRunLevel
               type:        int,    value: 5 
Parameter   16 name: Device.SoftwareModules.ExecEnv.3.Enable
               type:       bool,    value: true 
Parameter   17 name: Device.SoftwareModules.ExecEnv.3.InitialRunLevel
               type:        int,    value: 5 
Parameter   18 name: Device.SoftwareModules.ExecEnv.3.Name
               type:     string,    value: user 
Parameter   19 name: Device.SoftwareModules.ExecEnv.3.Status
               type:     string,    value: Up 
Parameter   20 name: Device.SoftwareModules.ExecutionUnit.1.Name
               type:     string,    value: Kn 
Parameter   21 name: Device.SoftwareModules.ExecutionUnit.1.Status
               type:     string,    value: Idle 

4. Start iperf3 -s (server) on any Ubuntu PC and then Go to iperf bundle config.json file on BPi and give the local iperf3 server IP.

root@Filogic-GW:~/destination# cat dec9iperf3/config.json 
{
    "ociVersion": "1.0.2-dobby",
    "process": {
        "terminal": true,
        "user": {
            "uid": 0,
            "gid": 0
        },
        "args": [
            "/usr/libexec/DobbyInit",
            "/usr/bin/iperf3",
            "-c",
            "192.168.29.199", - iperf3 server IP to be edited here with local server IP.
            "-t",
            "60",
            "-b",
            "100M",
            "-P",
            "4"
        ],

5. Now Set the ExecutionUnit to Active using below cmd 

root@Filogic-GW:~/destination# UspPa -c operate "Device.SoftwareModules.ExecutionUnit.1.SetRequestedState(RequestedState=Active)"
Synchronous Operation (Device.SoftwareModules.ExecutionUnit.1.SetRequestedState()) completed successfully.
Output Arguments:-
   Ret => "Starting EU"

6. Check the Software Modules, ExecutionUnit status should become Active.  

root@Filogic-GW:~/destination#  dmcli eRT getv Device.SoftwareModules.
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
Execution succeed.
Parameter    1 name: Device.SoftwareModules.DeploymentUnit.1.ExecutionEnvRef
               type:     string,    value: Device.SoftwareModules.ExecEnv.1 
Parameter    2 name: Device.SoftwareModules.DeploymentUnit.1.ExecutionUnitList
               type:     string,    value: Device.SoftwareModules.ExecutionUnit.1 
Parameter    3 name: Device.SoftwareModules.DeploymentUnit.1.Status
               type:     string,    value: Installed 
Parameter    4 name: Device.SoftwareModules.DeploymentUnit.1.URL
               type:     string,    value: http://192.168.x.x/dec9iperf3.tar.gz 
Parameter    5 name: Device.SoftwareModules.DeploymentUnit.2.ExecutionEnvRef
               type:     string,    value: Device.SoftwareModules.ExecEnv.2 
Parameter    6 name: Device.SoftwareModules.DeploymentUnit.2.ExecutionUnitList
               type:     string,    value: Device.SoftwareModules.ExecutionUnit.2 
Parameter    7 name: Device.SoftwareModules.DeploymentUnit.2.Status
               type:     string,    value: Installed 
Parameter    8 name: Device.SoftwareModules.DeploymentUnit.2.URL
               type:     string,    value: http://192.168.29.199/dec9iperf3.tar.gz 
Parameter    9 name: Device.SoftwareModules.ExecEnv.1.CurrentRunLevel
               type:        int,    value: 5 
Parameter   10 name: Device.SoftwareModules.ExecEnv.1.Enable
               type:       bool,    value: true 
Parameter   11 name: Device.SoftwareModules.ExecEnv.1.InitialRunLevel
               type:        int,    value: 5 
Parameter   12 name: Device.SoftwareModules.ExecEnv.1.Name
               type:     string,    value: default 
Parameter   13 name: Device.SoftwareModules.ExecEnv.1.Status
               type:     string,    value: Up 
Parameter   14 name: Device.SoftwareModules.ExecEnv.2.CurrentRunLevel
               type:        int,    value: 5 
Parameter   15 name: Device.SoftwareModules.ExecEnv.2.Enable
               type:       bool,    value: true 
Parameter   16 name: Device.SoftwareModules.ExecEnv.2.InitialRunLevel
               type:        int,    value: 5 
Parameter   17 name: Device.SoftwareModules.ExecEnv.2.Name
               type:     string,    value: test 
Parameter   18 name: Device.SoftwareModules.ExecEnv.2.Status
               type:     string,    value: Up 
Parameter   19 name: Device.SoftwareModules.ExecEnv.3.CurrentRunLevel
               type:        int,    value: 5 
Parameter   20 name: Device.SoftwareModules.ExecEnv.3.Enable
               type:       bool,    value: true 
Parameter   21 name: Device.SoftwareModules.ExecEnv.3.InitialRunLevel
               type:        int,    value: 5 
Parameter   22 name: Device.SoftwareModules.ExecEnv.3.Name
               type:     string,    value: user 
Parameter   23 name: Device.SoftwareModules.ExecEnv.3.Status
               type:     string,    value: Up 
Parameter   24 name: Device.SoftwareModules.ExecutionUnit.1.Name
               type:     string,    value: Kn 
Parameter   25 name: Device.SoftwareModules.ExecutionUnit.1.Status
               type:     string,    value: Active 

7. Now verify DobbyTool & check for the traffic flow between gateway device (cat /var/log/com.rdk.iperf3.log) and local iperf server

root@Filogic-GW:~/destination# DobbyTool list
 descriptor | id                               | state
------------|----------------------------------|-------------
        734 | Kn                               | running

root@Filogic-GW:~/destination# cat /var/log/com.rdk.iperf3.log
0000000387.244349 <T-15418> MIL: < M:Main.cpp F:main L:494 > Running hook createRuntime for container 'Kn'
---------------------------------------------
Connecting to host 192.168.29.199, port 5201
[  5] local 192.168.29.76 port 58810 connected to 192.168.29.199 port 5201
[  7] local 192.168.29.76 port 58812 connected to 192.168.29.199 port 5201
[  9] local 192.168.29.76 port 58824 connected to 192.168.29.199 port 5201
[ 11] local 192.168.29.76 port 58840 connected to 192.168.29.199 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  12.0 MBytes   101 Mbits/sec    1    505 KBytes       
[  7]   0.00-1.00   sec  12.0 MBytes   101 Mbits/sec    0    646 KBytes       
[  9]   0.00-1.00   sec  12.0 MBytes   101 Mbits/sec    0   1.94 MBytes       
[ 11]   0.00-1.00   sec  12.0 MBytes   101 Mbits/sec    0    666 KBytes       
[SUM]   0.00-1.00   sec  48.0 MBytes   403 Mbits/sec    1             
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   1.00-2.00   sec  11.9 MBytes  99.6 Mbits/sec    0    980 KBytes       
[  7]   1.00-2.00   sec  11.9 MBytes  99.6 Mbits/sec    0   1.06 MBytes       
[  9]   1.00-2.00   sec  11.9 MBytes  99.6 Mbits/sec    0   2.69 MBytes       
[ 11]   1.00-2.00   sec  11.9 MBytes  99.6 Mbits/sec    0   1.05 MBytes       
[SUM]   1.00-2.00   sec  47.5 MBytes   398 Mbits/sec    0             
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   2.00-3.00   sec  12.0 MBytes   101 Mbits/sec    0   1.01 MBytes       
[  7]   2.00-3.00   sec  12.0 MBytes   101 Mbits/sec    0   1.17 MBytes       
[  9]   2.00-3.00   sec  12.0 MBytes   101 Mbits/sec    0   2.69 MBytes       
[ 11]   2.00-3.00   sec  12.0 MBytes   101 Mbits/sec    0   1.16 MBytes       
[SUM]   2.00-3.00   sec  48.0 MBytes   403 Mbits/sec    0             

shilpa@BLTSL08096:~$ iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.29.76, port 58796
[  5] local 192.168.29.199 port 5201 connected to 192.168.29.76 port 58810
[  8] local 192.168.29.199 port 5201 connected to 192.168.29.76 port 58812
[ 10] local 192.168.29.199 port 5201 connected to 192.168.29.76 port 58824
[ 12] local 192.168.29.199 port 5201 connected to 192.168.29.76 port 58840
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.01   sec  11.1 MBytes  92.2 Mbits/sec                  
[  8]   0.00-1.01   sec  11.0 MBytes  91.2 Mbits/sec                  
[ 10]   0.00-1.01   sec  11.0 MBytes  91.2 Mbits/sec                  
[ 12]   0.00-1.01   sec  11.0 MBytes  91.2 Mbits/sec                  
[SUM]   0.00-1.01   sec  44.1 MBytes   366 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   1.01-2.01   sec  12.1 MBytes   102 Mbits/sec                  
[  8]   1.01-2.01   sec  12.2 MBytes   103 Mbits/sec                  
[ 10]   1.01-2.01   sec  12.2 MBytes   103 Mbits/sec                  
[ 12]   1.01-2.01   sec  12.2 MBytes   103 Mbits/sec                  
[SUM]   1.01-2.01   sec  48.9 MBytes   413 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -    

8. Below cmd to stop the Execution unit & make the status to Idle 

root@Filogic-GW:~/destination# UspPa -c operate "Device.SoftwareModules.ExecutionUnit.1.SetRequestedState(RequestedState=Idle)"
Synchronous Operation (Device.SoftwareModules.ExecutionUnit.1.SetRequestedState()) completed successfully.
Output Arguments:-
   Ret => "Stopping EU"

9. Uninstall the module using below cmd. Uninstall should be successful and bundle files should be erased for the fresh installation to work. Verify the softwaremodules, it should not contain any Execution unit after uninstallation

root@Filogic-GW:~/destination# ls
dec9iperf3  dec9iperf3.tar.gz.json
root@Filogic-GW:~/destination# UspPa -c operate "Device.SoftwareModules.DeploymentUnit.1.Uninstall()"
Asynchronous Operation (Device.SoftwareModules.DeploymentUnit.1.Uninstall()) Started successfully.
Device.LocalAgent.Request.1 created.
See log for output arguments of operation
root@Filogic-GW:~/destination# 
root@Filogic-GW:~/destination# ls
root@Filogic-GW:~/destination# 
root@Filogic-GW:~/destination# dmcli eRT getv Device.SoftwareModules.
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
Execution succeed.
Parameter    1 name: Device.SoftwareModules.ExecEnv.1.CurrentRunLevel
               type:        int,    value: 5 
Parameter    2 name: Device.SoftwareModules.ExecEnv.1.Enable
               type:       bool,    value: true 
Parameter    3 name: Device.SoftwareModules.ExecEnv.1.InitialRunLevel
               type:        int,    value: 5 
Parameter    4 name: Device.SoftwareModules.ExecEnv.1.Name
               type:     string,    value: default 
Parameter    5 name: Device.SoftwareModules.ExecEnv.1.Status
               type:     string,    value: Up 
Parameter    6 name: Device.SoftwareModules.ExecEnv.2.CurrentRunLevel
               type:        int,    value: 5 
Parameter    7 name: Device.SoftwareModules.ExecEnv.2.Enable
               type:       bool,    value: true 
Parameter    8 name: Device.SoftwareModules.ExecEnv.2.InitialRunLevel
               type:        int,    value: 5 
Parameter    9 name: Device.SoftwareModules.ExecEnv.2.Name
               type:     string,    value: test 
Parameter   10 name: Device.SoftwareModules.ExecEnv.2.Status
               type:     string,    value: Up 
Parameter   11 name: Device.SoftwareModules.ExecEnv.3.CurrentRunLevel
               type:        int,    value: 5 
Parameter   12 name: Device.SoftwareModules.ExecEnv.3.Enable
               type:       bool,    value: true 
Parameter   13 name: Device.SoftwareModules.ExecEnv.3.InitialRunLevel
               type:        int,    value: 5 
Parameter   14 name: Device.SoftwareModules.ExecEnv.3.Name
               type:     string,    value: user 
Parameter   15 name: Device.SoftwareModules.ExecEnv.3.Status
               type:     string,    value: Up 


  • No labels