You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Introduction

  • Need to add one tab(DAC Demo) in left panel in landing page of RDKB WebUI(http://10.0.0.1).
  • Upon clicking "DAC Demo" tab, new page should be loaded in right panel.
  • New page should have a Text field and a button.
  • On clicking the Execute button, the script mentioned in the text field should be executed in the running target and the result should be notified in local WebUI (perhaps through alert).

Build Procedure

             Need to flash base build as rdkb rpi3 build ,

rpi3-repo commands
$ mkdir <workspace dir>
$ cd <workspace dir>
$ repo init -u https://code.rdkcentral.com/r/manifests -b dunfell -m rdkb-extsrc.xml
$ repo sync -j`nproc` --no-clone-bundle

Add Dobby package in RDK-B build -  meta-cmf-raspberrypi/recipes-core/packagegroups/packagegroup-rdk-ccsp-broadband.bbappend 


Dobby Package
+++ b/recipes-core/packagegroups/packagegroup-rdk-ccsp-broadband.bbappend
@@ -6,6 +6,9 @@ RDEPENDS_packagegroup-rdk-ccsp-broadband_append = "\
     libseshat \
     notify-comp \
     start-parodus \
+    dobby \
+    crun \
     \
 "
Build steps
$ MACHINE=raspberrypi-rdk-broadband source meta-cmf-raspberrypi/setup-environment
$ bitbake rdk-generic-broadband-image

Flashing Procedure :  RPI 3B/3B+ Model Reference Platform

Create an OCI image for a sample application using meta-dac-sdk(Ex: helloworld-test)

Please refer the below link,

Containerization using META DAC SDK in RDK-B RPI

Note : For helloworld-test , we can use below config.json (by default config.json is not worked)


config.json - helloworld-test
root@RaspberryPi-Gateway:/dac#$ cat /rpi3_reference-dac-image-helloworld-test-raspberrypi-rdk-broadband-20230403072115.rootfs-oci-latest-arm-linux.oci-image/config.json 
{
    "ociVersion": "1.0.2-dobby",
    "process": {
        "terminal": true,
        "user": {
            "uid": 0,
            "gid": 0
        },
        "args": [
            "/usr/libexec/DobbyInit",
            "/usr/bin/helloworld-test"
        ],
        "env": [
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
        ],
        "cwd": "/",
        "capabilities": {
            "bounding": [ ],
            "effective": [ ],
            "inheritable": [ ],
            "permitted": [ ],
            "ambient": [ ]
        },
        "rlimits": [ ],
        "noNewPrivileges": true
    },
    "root": {
        "path": "rootfs"
    },
    "hostname": "umoci-default",
    "mounts": [
        {
            "destination": "/proc",
            "type": "proc",
            "source": "proc"
        },
        {
            "destination": "/dev",
            "type": "tmpfs",
            "source": "tmpfs",
            "options": [
                "nosuid",
                "strictatime",
                "mode=755",
                "size=65536k"
            ]
        },
        {
            "destination": "/dev/pts",
            "type": "devpts",
            "source": "devpts",
            "options": [
                "nosuid",
                "noexec",
                "newinstance",
                "ptmxmode=0666",
                "mode=0620"
            ]
        },
        {
            "destination": "/dev/shm",
            "type": "tmpfs",
            "source": "shm",
            "options": [
                "nosuid",
                "noexec",
                "nodev",
                "mode=1777",
                "size=65536k"
            ]
        },
        {
            "destination": "/sys",
            "type": "bind",
            "source": "/sys",
            "options": [
                "rbind",
                "nosuid",
                "noexec",
                "nodev",
                "ro"
            ]
        },
        {
            "destination": "/etc/resolv.conf",
            "type": "bind",
            "source": "/etc/resolv.conf",
            "options": [
                "noexec",
                "nosuid",
                "nodev",
                "rbind",
                "ro"
            ]
        },
        {
            "source": "/usr/libexec/DobbyInit",
            "destination": "/usr/libexec/DobbyInit",
            "type": "bind",
            "options": [
                "rbind",
                "nosuid",
                "nodev",
                "ro"
            ]
        },
        {
            "source": "/usr/share/",
            "destination": "/usr/share/",
            "type": "bind",
            "options": [
                "rbind",
                "nosuid",
                "nodev",
                "ro",
                "X-mount.mkdir"
            ]
        }
    ],
    "annotations": {
        "org.opencontainers.image.architecture": "arm",
        "org.opencontainers.image.author": "info@lgi.com",
        "org.opencontainers.image.created": "2023-03-24T08:33:59Z",
        "org.opencontainers.image.exposedPorts": "",
        "org.opencontainers.image.os": "linux",
        "org.opencontainers.image.stopSignal": "",
        "run.oci.hooks.stderr": "/dev/stderr",
        "run.oci.hooks.stdout": "/dev/stdout"
    },
    "linux": {
        "namespaces": [
            {
                "type": "pid"
            },
            {
                "type": "ipc"
            },
            {
                "type": "uts"
            },
            {
                "type": "mount"
            }
        ],
        "maskedPaths": [
        ],
        "readonlyPaths": [
        ],
        "resources": {
            "devices": [ ]
        },
        "devices": [ ]
    },
    "rdkPlugins": {
        "networking": {
            "required": true,
            "data": {
                "type": "open"
            }
        },
        "logging": {
            "required": true,
            "data": {
                "sink": "file",
                "fileOptions": {
                    "path": "/var/log/rpi3_reference-dac-image-helloworld-test-raspberrypi-rdk-broadband-20230324083330.rootfs-oci-latest-arm-linux.oci-image.log"
                }
            }
        }
    }
}





  • No labels