Adding a New Application to RDK-7 RPi4 Build
- Zoltan Kuscsik

- 4 days ago
- 2 min read
With the latest RDK-7 release, the various software layers, like Application, Middleware, OSS, and Vendor layers are separated. This brings some additional complexities of building and combining multiple layers using an assembler layer into a single package, but it also speeds up the builds by needing to build only the layers that require modification.
In this post we will explore how to add a new application to an RPi4 RDK-V build. The guide requires that the build machine has already configured RDK credentials (.netrc/ssh access). You also need an SD Card with at least 8GB capacity and a Raspberry Pi 4.
Setup the Build Environment
Clone the non-official RDK-7 docker build scripts and setup your container environment:
git clone https://github.com/zoltan-ongithub/rdk7-docker-builder
cd rdk7-docker-builder/
./rdk7-docker.sh setup # Type to setup the "application" layer
./rdk7-docker.sh sync # Sync the source codeAdd a New Application
Let's add a new application to the application layer:
mkdir application-layer/rdke/application/meta-application-rdke-dev/recipes-thirdparty/guessing-game/Edit
application-layer/rdke/application/meta-application-rdke-dev/recipes-thirdparty/guessing-game/guessing-game.bb
in your favorite editor and add a new recipe:
SUMMARY = "RDK application to showcase rdkservices"
SECTION = "rdk/samples"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=387be95ea3370b9ae768c395d4eeaeea"
SRC_URI = "git://github.com/zoltan-ongithub/lightning-guessing-game;protocol=https;branch=main"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}/git"
PACKAGE_ARCH = "${APP_LAYER_ARCH}"
#Lightning application, no need for configuration/compilation
do_compile[noexec] = "1"
do_configure[noexec] = "1"
do_patch[noexec] = "1"
RDEPENDS:${PN}-dev = ""
do_install() {
install -d ${D}/home/root/guessinggame
cp -r ${S}/* ${D}/home/root/guessinggame
}
FILES:${PN} += "/home/root/*"In application-layer/rdke/application/meta-application-rdke-dev/recipes-core/packagegroups/packagegroup-application-layer.bb
add the guessinggame to packagegroup-application-layer section to ensure the package is built into the final image.
Build the Application Layer
./rdk7-docker.sh runAssemble All Layers
Now let's switch to the assembler layer and assemble all the layers:
./rdk7-docker.sh setupWhen asked, choose 'local' for application layer. This will ensure that your local application layer will be used instead of the prebuilt remote packages. See the note below on layers for explanation.
Build the Full Stack Image
Build the full stack image:
./rdk7-docker.sh runThe final image will be:
./image-assembler-layer/build-raspberrypi4-64-rdke/tmp/deploy/images/raspberrypi4-64-rdke/lib32-rdk-fullstack-image-RPI4-20251118092409.rootfs.wicYou can flash it using dd or Balena Etcher.
Note on Layers
Building a layer publishes the packages to a local IPK repository ~/community_shared. When the final full stack layer is combined, the packages can be pulled from the local repository or from the remote pre-built repository.




Comments