[PATCH v3 7/9] ratp: new md and mw commands

2018-02-24 Thread Aleksander Morgado
This commit introduces support for running the md and mw commands using the binary interface provided by RATP. This allows clients to read and write memory files without needing to do custom string parsing on the data returned by the console 'md' and 'mw' operations. The request and response

[PATCH v3 6/9] ratp: use xstrndup() instead of a custom xmemdup_add_zero()

2018-02-24 Thread Aleksander Morgado
The console operations done via RATP expect strings, so just use xstrndup() instead of defining a custom method. Signed-off-by: Aleksander Morgado --- common/ratp/ratp.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git

[PATCH v3 9/9] docs: add reference to libratp-barebox in the remote-control docs

2018-02-24 Thread Aleksander Morgado
Signed-off-by: Aleksander Morgado --- Documentation/user/remote-control.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/user/remote-control.rst b/Documentation/user/remote-control.rst index 217251429..c8b7442f1 100644 ---

[PATCH v3 8/9] ratp: new reset command

2018-02-24 Thread Aleksander Morgado
E.g.: $ ./bbremote -v --port /dev/ttyUSB2 reset Signed-off-by: Aleksander Morgado --- common/ratp/Makefile | 1 + common/ratp/reset.c | 55 include/ratp_bb.h| 1 +

[PATCH v3 5/9] ratp: implement getenv as a standard ratp command

2018-02-24 Thread Aleksander Morgado
Also, use xstrndup() instead of the custom xmemdup_add_zero() as we're working with strings anyway. Signed-off-by: Aleksander Morgado --- common/ratp/Makefile | 1 + common/ratp/getenv.c | 51 +++ common/ratp/ratp.c |

[PATCH v3 3/9] ratp: allow building without full console support

2018-02-24 Thread Aleksander Morgado
Make CONFIG_RATP a selectable config option, so that the user can enable RATP support without explicitly needing to enable the full console support over RATP (e.g. only for RATP FS or built-in command support). The full console can still be explicitly enabled with CONFIG_CONSOLE_RATP.

[PATCH v3 2/9] ratp: moved logic to its own subdirectory

2018-02-24 Thread Aleksander Morgado
We are going to add new RATP command implementations in separate files within this subdirectory. Signed-off-by: Aleksander Morgado --- common/Kconfig | 13 + common/Makefile | 4 ++-- common/ratp/Kconfig | 14 ++

[PATCH v3 4/9] ratp: implement ping as a standard ratp command

2018-02-24 Thread Aleksander Morgado
Signed-off-by: Aleksander Morgado --- common/ratp/Makefile | 1 + common/ratp/ping.c | 40 common/ratp/ratp.c | 24 3 files changed, 41 insertions(+), 24 deletions(-) create mode 100644

[PATCH v3 0/9] ratp: new generic RATP command support

2018-02-24 Thread Aleksander Morgado
This v3 series includes new md, mw and reset operations in bbremote, using the new binary API interface. The actual commits including the new RATP commands include the bbremote changes as well. An additional patch is also included to add a reference to the third-party libratp-barebox and

[PATCH v3 1/9] ratp: implement generic command support

2018-02-24 Thread Aleksander Morgado
The RATP implementation now allows executing generic commands with a binary interface: binary requests are received and binary responses are returned. Each command can define its own RATP request contents (e.g. to specify command-specific options) as well as its own RATP response contents (if any