Webinars
Special Interest Groups
RDK-B Working Groups
RDK-V Working Groups
UI-UX Research and Development
DAC
Conferences
[Leadership Update]
[Global Summit]
[Technology Summit]
In order to upstream DAC (the DSM and Dobby stack) to a mainline release of RDK-B we need to create a distro feature which enables DAC functionality
This new distro feature "dac" should result in DSM and Dobby being installed on the image with correct kernel config when enabled.
The bitbake function bb.utils.contains can be used to conditionally add the DAC components to an existing broadband package group, such as rdk-oss-broadband.
For example, this could be done by adding the following to meta-rdk-broadband/recipes-core/packagegroups/packagegroup-rdk-oss-broadband.bbappend
example listing of packagegroup-rdk-oss-broadband.bbappend:
. . RDEPENDS_packagegroup-rdk-oss-broadband_append_dunfell = "${@bb.utils.contains('DISTRO_FEATURES', 'dac',' dobby', '', d)}" RDEPENDS_packagegroup-rdk-oss-broadband_append_dunfell += "${@bb.utils.contains('DISTRO_FEATURES', 'dac',' dsm', '', d)}"
Then in the local workspace's local.conf file (or a custom distro definition file) the feature can be enabled like so:
. . DISTRO_FEATURES_append += " dac"
Enabling the feature will add Dobby and DSM to the rdk-oss-broadband package group, which is installed as part of an RDK-B build.
This section covers the implementation of the necessary kernel changes when DAC is enabled in an RDK-B Build.
When the 'dac' distro feature is enabled, the following kernel changes must be in place:
The line ' CMDLINE_append = "cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1" ' must be added to the linux-raspberrypi.inc file
These changes are added based on the distro feature like so:
linux-raspberrypi.inc
Append the following line to the file:
. . CMDLINE_append = "${@bb.utils.contains('DISTRO_FEATURES', 'dac', 'cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1', '', d)}"
container.cfg
Adding the file will not cause any changes unless it's explicitly added to the kernel recipe so it can just be added without any condition on the distro feature
linux-raspberrypi_5.4.bb
The container.cfg needs to be appended to the kernel's SRC_URI list when the distro feature is enabled.
Append the following line to the recipe:
. . SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'dac', 'file://container.cfg', '', d)}"
These changes can be applied to a build using the attached patchfile:
This patch was made using the 22q3 source code but has been tested successfully on 22q1 also.
In the DAC implementation (and also RDK-V) crun is configured into the build via a runtime dependency from dobby. The dobby recipe contains no build time dependency on crun (since it makes its crun calls via the binary) but does contain a runtime dependency which simply causes crun to be installed on the image with dobby.
Dobby also specifies a restriction on what versions of crun are compatible:
RDEPENDS_${PN} = "crun (>= 0.14.1)... "
In 22qX RDK-B there are two versions of crun available:
given the restriction set in the dobby recipe, bitbake will select v1.4.2 (It will also just select the newest if no other restriction is given).
To summarise, crun does not need any special additions to configure it behind the distro feature. So long as dobby is configured behind the distro feature, it will cause an appropriate version of crun to be installed alongside it.
Recipes for dobby already exist in the RDK-B source. These recipes appear to come directly from RDK-V and include the Dobby Thunder plugin for json rpc. The dobby recipe has a runtime dependency on the thunder plugin which causes the build to fail as RDK-B does not have all the necessary dependencies for thunder ("nothing provides wpeframework-clientlibraries"). As we instead intend to control dobby with DSM, this plugin is not needed for DAC.
Different releases of RDK-B contain varying versions of Dobby for example:
It is likely best to use the newest version available. In this case v3.5.
As mentioned, the current dobby recipe doesn't successfully build due to a missing dependency for the thunder plugin. We do not use thunder so it is acceptable to remove this dependency (which gives a successful dobby build).
There are a few options for mainlining this change:
Due to the fact that the meta-rdk layer is shared between RDK-V and RDK-V, option 3 is preferred.
Delivering these changes can either be done via a pull request or a patch set. Depending on which approach is taken.
With a sufficient recipe for dobby it can be added conditionally to the rdk-oss-broadband packagegroup based on the distro feature.