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 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); }