297 Commits
Author SHA1 Message Date
Dmitry Baryshkov 7e4eb185eb Merge pull request #99 from brgl/contrib/conky-lua
contrib: add a lua module allowing to display cdba board status with conky
2026-09-11 13:41:49 +03:00
Bartosz Golaszewski 00ef5d9656 contrib: add a lua module allowing to display cdba board status with conky
Conky is a light-weight system monitor that can be easily customized
with lua scripts. This adds a module that can be directly loaded via
conky.conf and be used to display information about current usage of
boards controlled by cdba.

Put the script under a new directory: contrib/. It'll be used to store
misc files that don't fit anywhere else.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-09-10 16:27:53 +02:00
Dmitry Baryshkov 78d0983fa4 Merge pull request #92 from quic-bjorande/for-linux-msm/codex-skill
skills: Introduce cdba Codex skill
2026-07-21 22:23:20 +03:00
Bjorn Andersson 7ded06f9e1 skills: Introduce cdba Codex skill
cdba can be used directly from e.g. Codex to integrate board automation
tasks in the agent's workflow. Introduce the cdba Codex skill to
facilitate this.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-09 15:00:15 -05:00
Dmitry Baryshkov ec466aca24 Merge pull request #96 from quic-bjorande/for-linux-msm/client-usage
For linux msm/client usage
2026-07-05 23:14:06 +03:00
Dmitry Baryshkov 5db246fec8 Merge pull request #94 from quic-bjorande/for-linux-msm/progress-bar
cdba: Add progress bar
2026-07-05 23:13:19 +03:00
Dmitry Baryshkov 7beb8cb5c9 Merge pull request #95 from quic-bjorande/for-linux-msm/server-alive-interval
ssh tunnel can time out when idle
2026-07-05 22:36:37 +03:00
Bjorn Andersson 9d18604b95 ssh tunnel can time out when idle
Remote CDBA sessions currently rely on users configuring
ServerAliveInterval in ~/.ssh/config to keep the underlying ssh
connection active.

Pass ServerAliveInterval and ServerAliveCountMax directly when the
client launches ssh so otherwise idle tunnels stay alive and ssh can
detect dead connections.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 19:33:37 +00:00
Bjorn Andersson 9df0c5f8e8 cdba: Add progress bar
Uploading large imaged, in particular during flashing, can take time.
Provide user feedback in the form of a progress bar.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 19:32:56 +00:00
Bjorn Andersson 9785de94e9 treewide: Use stdio file descriptor constants
The numeric constants for stdout and stderr are used in a couple of
places, replace them with the friendlier constants.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 19:32:56 +00:00
Bjorn Andersson 496e9acc75 README: Update client usage
As with the client usage printout, the usage description in the README
is outdated. Update this.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 19:32:18 +00:00
Bjorn Andersson 463b013017 cdba: Update client usage printout
The client usage printout is seriously outdated, which if nothing else
confuses the AI agents as they look at it from time to time. Fix this by
documenting the current set of options.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 19:32:18 +00:00
Dmitry Baryshkov e6dcfc57df Merge pull request #97 from quic-bjorande/for-linux-msm/ci-fixes
For linux msm/ci fixes
2026-07-05 21:52:38 +03:00
Bjorn Andersson 18ea7c8998 cdba: avoid zero-length memcpy from NULL
cdba_queue() passes a NULL payload with length zero through
cdba_queue_data(). That eventually called memcpy() unconditionally,
which is undefined for NULL pointers even when the requested copy length
is zero.

Ubuntu noble GCC with fortified libc inlines that call and reports the
NULL source argument with -Wnonnull, which becomes a build failure under
-Werror. Only copy the payload when the queued message actually has one.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 18:29:05 +00:00
Bjorn Andersson daee1325c1 ci: install target libc headers for Debian cross builds
The Debian cross jobs install packages with --no-install-recommends.
The cross compiler packages only recommend the target libc development
headers, so the jobs can reach the compile step without basic headers
such as sys/file.h, sys/socket.h, and bits/wordsize.h.

Install libc6-dev for the target architecture explicitly. This provides
the normal system headers needed by the cross compiler and keeps the CI
setup independent of package recommendations.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 18:29:05 +00:00
Bjorn Andersson f08d673b01 meson: fix forkpty dependency detection
The forkpty check was compiled without including <pty.h>, which is
the header that declares the function. On stricter toolchains, and in
some cross builds, that can make Meson conclude that forkpty is not
available from libc even when the target provides it there.

The fallback then looked for a separate libutil as a required library.
That breaks modern glibc targets where forkpty moved into libc and no
separate libutil is available for Meson to find.

Include <pty.h> in the function probe so libc implementations are
detected correctly. Keep libutil as an optional compatibility fallback
for older targets that still need it, without failing configuration
when the separate library is absent.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 18:29:05 +00:00
Bjorn Andersson 1bead0f004 drivers: initialize libgpiod v1 request config
Ubuntu noble still ships libgpiod 1.x, which selects the local-gpio v1
implementation. That path declared struct gpiod_line_request_config
without initializing the whole structure before passing it to libgpiod,
leaving padding or future fields undefined under stricter toolchains.

Zero-initialize the request configuration before filling the fields
cdba uses, matching the defensive style needed for older supported
distributions and newer compilers.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 18:29:05 +00:00
Bjorn Andersson 2175378afe ci: install full Alpine build toolchain
The Alpine clang jobs fail during Meson compiler setup rather than
during source compilation. Installing clang alone does not guarantee
the complete native build environment needed for compiler sanity
checks, linking, and startup objects on Alpine.

Install build-base in the Alpine CI setup so both gcc and clang jobs
have the standard compiler, libc, binutils, and make toolchain expected
by Meson.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 18:29:05 +00:00
Bjorn Andersson 3d788536e9 ci: use current libftdi package on Debian
Debian testing no longer provides the legacy libftdi-dev package used
by the CI install scripts. As a result, native, i386, and
cross-compile Debian testing jobs fail at apt install before the build
starts.

Install libftdi1-dev instead. The Meson build already prefers the
libftdi1 pkg-config dependency, so this matches the dependency that
the source is actually using.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 18:29:05 +00:00
Bjorn Andersson 163aad04dd ci: drop EOL distro images
Several scheduled jobs are failing because the matrix still includes
release-specific container images for distributions that have reached
end of life. These images may still be pullable, but their package
repositories are no longer maintained in the normal location and can
fail during dependency installation.

Remove the EOL Debian buster, Ubuntu oracular, and fixed Fedora
release jobs. Keep rolling and moving targets such as debian:testing,
alpine:edge, and latest tags so CI continues to catch issues users
may see on active distributions.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 18:29:04 +00:00
Bjorn Andersson c423029c61 ci: update checkout action for Node 24
GitHub Actions now warns that actions targeting Node.js 20 are
being forced to run on Node.js 24. The warning is emitted by
actions/checkout@v4 in every matrix job, which obscures the real
CI failures and will eventually become a hard compatibility problem
as Node 20 support is removed from runners.

Move to actions/checkout@v5 so the workflow uses an action version
that is compatible with the current runner JavaScript runtime.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-07-05 18:29:04 +00:00
Konrad Dybcio 24d4a7ba81 Merge pull request #91 from quic-bjorande/for-linux-msm/flashing-support
For linux msm/flashing support
2026-06-15 15:36:09 +02:00
Bjorn Andersson 48efa3096e cdba-server: Provide QDL access control list
The newly introduced support for QDL-based remote flashing of devices is
powerful, but provides an easy way to alter shared boards in unwanted
ways.

Introduce an optional "qdl_access" entry to the device configuration,
which allows to specify a list of entries each one defining a set of
users and their accepted flash targets.

A special target "all" can be used to give e.g. administrators
unrestricted access to the flash.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-06-14 22:14:26 +00:00
Bjorn Andersson 4be6c26fbe device_parser: Extract parsing of "users"
The open-coded parsing of the "users" object in parse_board() makes the
parse loop unnecessarily long, and with the upcoming introduction of
a QDL access list this would be an even bigger problem.

Extract the "users" parsing into a helper function of it own, to clean
up the code and prepare for the introduction of parsing of "qdl_access".

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-05-20 22:26:18 +00:00
Bjorn Andersson 7af96ab6c6 cdba: Consider stdin and stderr for inactivity timer as well
The inactivity timeout is only bumped on incoming messages on stdout.

But during upload of images (MSG_FASTBOOT_DOWNLOAD or MSG_EDL_DOWNLOAD)
there is no traffic on stdout. Likewise MSG_EDL_WRITE would trigger the
write of an image to the storage media, which will emit updated on
stderr.

Both of these additional pipes represents activity, so let's bump the
timeout there as well.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
2026-05-20 22:26:18 +00:00