Skip to main content
Qualcomm Linux · OTA · Files
Companion to the OTA tutorial·← Back to the post

This page holds the full source of every file from the OTA tutorial so you don’t have to retype anything. Each block has a copy button in its top-right corner — hover over it. They’re listed in the same order the post creates them; each heading shows the path to save the file at.

layer.conf

Registers meta-ota-demo with the build. Save it at meta-ota-demo/conf/layer.conf.
layer.conf

ota-demo-version.bb

The version-marker recipe. Bumping OTA_DEMO_VERSION is “knob 1”; it writes the value to /etc/ota-demo-version, shipped as a conffile so it survives updates. Save it at meta-ota-demo/recipes-ota/ota-demo-version/ota-demo-version.bb.
ota-demo-version.bb

weston-init.bbappend

The wallpaper override — a weston-init bbappend that prepends our file path so our qcom-background.png wins over the stock one (“knob 2”). Save it at meta-ota-demo/recipes-graphics/wayland/weston-init.bbappend.
weston-init.bbappend

ota-agent_1.0.bb

The BitBake recipe that packages the agent. The one non-obvious part is RDEPENDS: the agent is pure Python stdlib, but on a minimal Yocto image the stdlib is split into separate packages, so you have to name exactly the ones it imports. Save it at meta-ota-demo/recipes-ota/ota-agent/ota-agent_1.0.bb.
ota-agent_1.0.bb

ota-agent.service

The systemd unit that keeps the agent running and brings it up after the network is online. Save it at meta-ota-demo/recipes-ota/ota-agent/files/ota-agent.service.
ota-agent.service

ota-agent.conf

The agent’s configuration. Edit SERVER_URL to point at your update server (the post does this with a sed one-liner). Save it at meta-ota-demo/recipes-ota/ota-agent/files/ota-agent.conf.
ota-agent.conf

ota-agent.py

The on-device web agent. Pure Python standard library, so it runs on a minimal QLI image with no extra packages. Save it at meta-ota-demo/recipes-ota/ota-agent/files/ota-agent.py.
ota-agent.py

ota-demo.yml

The kas fragment that pulls the layer into the build and adds packages to the image. It lives next to the other Qualcomm CI fragments, not inside the layer. You edit the IMAGE_INSTALL:append line per build to add or drop Vim (“knob 3”). Save it at meta-qcom/ci/ota-demo.yml.
ota-demo.yml

publish.sh

The server-side script that copies a freshly built ostree_repo into the update server’s web root and writes the version.json the device’s agent reads. Put it on the update server, make it executable, and check DEPLOY_DIR matches where your build dropped its output.
publish.sh

← Back to the OTA tutorial