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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>