From 61355a767f534457a7eba060ce7fbbb3664f661d Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Mon, 15 Jun 2026 19:46:27 +0000 Subject: [PATCH 1/2] 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 --- cdba.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/cdba.c b/cdba.c index 68cbdc3..6bcfef5 100644 --- a/cdba.c +++ b/cdba.c @@ -610,13 +610,25 @@ static void usage(void) { extern const char *__progname; - fprintf(stderr, "usage: %s -b [-h ] [-t ] " - "[-T ] [boot.img]\n", + fprintf(stderr, "usage: %s -b [options] " + "[write ]... [boot.img]\n", __progname); - fprintf(stderr, "usage: %s -i -b [-h ]\n", + fprintf(stderr, "usage: %s -i -b [connection-options]\n", __progname); - fprintf(stderr, "usage: %s -l [-h ]\n", + fprintf(stderr, "usage: %s -l [connection-options]\n", __progname); + fprintf(stderr, "\n"); + fprintf(stderr, "connection-options:\n"); + fprintf(stderr, " -h connect to remote host using ssh\n"); + fprintf(stderr, " -S cdba-server binary or command\n"); + fprintf(stderr, "\n"); + fprintf(stderr, "boot options:\n"); + fprintf(stderr, " -c power-cycle count on timeout or power-off marker\n"); + fprintf(stderr, " -C power-cycle count on power-off marker only\n"); + fprintf(stderr, " -R repeat fastboot boot when fastboot reappears\n"); + fprintf(stderr, " -s write status updates to fifo\n"); + fprintf(stderr, " -t total timeout, 0 disables it (default: 600)\n"); + fprintf(stderr, " -T inactivity timeout\n"); exit(1); } From 35116e9fe7a14cb56ddbf199d99318074836c06b Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Mon, 15 Jun 2026 19:46:53 +0000 Subject: [PATCH 2/2] 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 --- README | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/README b/README index 64258bb..cc4c741 100644 --- a/README +++ b/README @@ -19,20 +19,36 @@ from sandbox/cdba/cdba-server. Available devices are read from $HOME/.cdba = Client side The client is invoked as: - cdba -b [-h ] [-c ] [-s ] [boot.img] + cdba -b [-h ] [-S ] [-c ] + [-C ] [-R] [-s ] + [-t ] [-T ] + [write ]... [boot.img] + cdba -i -b [-h ] [-S ] + cdba -l [-h ] [-S ] will be connected to using ssh and will be selected for operation. As the board's fastboot interface shows up the given boot.img will be transfered and booted on the device. If is omitted, the -cdba-server is started locally without using ssh. If [boot.img] is omitted, -"fastboot continue" is run to boot the installed operating system. +cdba-server is started locally without using ssh. The -S option can be used +to specify an alternative cdba-server binary or command. If [boot.img] is +omitted, "fastboot continue" is run to boot the installed operating system. + +The optional write arguments can be repeated to flash one or +more images through EDL before booting or continuing the board. The board will execute until the key sequence ^A q is invoked or the board outputs a sequence of 20 ~ (tilde) chards in a row. If the optional -c is given, the board will upon receiving the tilde sequence restart the board the given number of times. Each time booting the given -boot.img. +boot.img. If -C is given instead, the board is only power-cycled for the tilde +sequence and not for timeouts. + +The optional -t argument controls the total timeout in seconds, and can be set +to 0 to disable the total timeout. The optional -T argument specifies an +inactivity timeout in seconds. + +The optional -R argument repeats the fastboot boot when fastboot reappears. The optional -s argument can be used to specify that a fifo should be created and opened. cdba will request the server to start sending status/measurement