Correctly reference `--port` instead of `--baudrate` when explaining
how to specify the port.
Signed-off-by: Aleksander Morgado
---
Documentation/user/remote-control.rst | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/Documentation/user/remote-control.rst
b
ul usecases.
What do you think?
Aleksander Morgado (2):
sandbox: fix registering multiple consoles
sandbox: --stdin and --stdout allow max one bidirectional console
arch/sandbox/board/console.c | 5 ++-
arch/sandbox/mach-sandbox/include/mach/linux.h | 2 +-
tivated (CONFIG_CONSOLE_ACTIVATE_ALL=n), the
default stdin/stdout console will be preferred instead of the new
FIFO/file based, which would need to be activated explicitly later on.
e.g.:
barebox@barebox sandbox:/ cs1.active=ioe
Signed-off-by: Aleksander Morgado
---
arch/sandbox/os/common
so that a new unique device id is given to each newly registered
console device.
Signed-off-by: Aleksander Morgado
---
arch/sandbox/board/console.c | 5 ++---
arch/sandbox/mach-sandbox/include/mach/linux.h | 2 +-
arch/sandbox/os/common.c | 6 +++---
drivers/se
> On Wed, May 31, 2017 at 06:12:41PM +0200, Aleksander Morgado wrote:
>> Allow up to one bidirectional FIFO/file based console in addition to
>> the default stdin/stdout console that is always registered.
>>
>> We avoid opening the FIFO files while parsing the options
On Thu, Jun 1, 2017 at 9:30 AM, Sascha Hauer wrote:
> On Tue, May 30, 2017 at 11:46:34PM +0200, Aleksander Morgado wrote:
>> Correctly reference `--port` instead of `--baudrate` when explaining
>> how to specify the port.
>>
>> Signed-off-by: Aleksander Morgad
On Thu, Jun 1, 2017 at 2:31 PM, Sascha Hauer wrote:
>> >> Correctly reference `--port` instead of `--baudrate` when explaining
>> >> how to specify the port.
>> >>
>> >> Signed-off-by: Aleksander Morgado
>> >> ---
>> &
=0x77277ed8,
active=active@entry=false, timeout_ms=timeout_ms@entry=100) at lib/ratp.c:1645
#6 0x0040b888 in barebox_ratp (cdev=cdev@entry=0x77212bd0) at
common/ratp.c:470
#7 0x004046c3 in getc_raw () at common/console.c:416
...
Signed-off-by: Aleksander Morgado
In addition to allowing read-only and write-only consoles with --stdin
and --stdout, we now allow bidirectional read/write consoles with FIFO
files. This is e.g. to allow doing RATP over the FIFO based consoles.
Signed-off-by: Aleksander Morgado
---
arch/sandbox/os/common.c | 53
If ratp_establish() fails we would be accessing the ratp_internal
struct after having disposed it.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index d596a0e8b..22e83636f 100644
--- a/lib/ratp.c
Hey,
I've been playing a bit with the possibility of having a C library to
talk RATP with barebox, totally equivalent to what bbremote does in
python, but as a general C lib with a stable API that may be
integrated in other C/C++ applications.
>From my POV I see two options to try:
a) build a
gt;>
>> Signed-off-by: Aleksander Morgado
>> ---
>> arch/sandbox/os/common.c | 53
>> ++--
>> 1 file changed, 42 insertions(+), 11 deletions(-)
>
> Applied, thanks.
>
> Have you tried RATP over the FIFO console
=active@entry=false, timeout_ms=timeout_ms@entry=100) at lib/ratp.c:1645
#6 0x0040b888 in barebox_ratp (cdev=cdev@entry=0x77212bd0) at
common/ratp.c:470
#7 0x004046c3 in getc_raw () at common/console.c:416
...
Signed-off-by: Aleksander Morgado
---
common/ratp.c
one had RST set.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/ratp.c b/lib/ratp.c
index 43b8b04dc..d3c252047 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -1033,6 +1033,9 @@ static int ratp_behaviour_g(struct ratp_internal *ri,
void
e OR-ed
to the current value.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index a8ac52c75..43b8b04dc 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -1038,7 +1038,7 @@ static int ratp_behaviou
Hey Sascha,
I went through the RFC916 and ended up preparing a set of fixes and
improvements for the RATP logic in barebox.
Let me know what you think.
Cheers!
Aleksander Morgado (16):
ratp: add missing transition to SYN-RECEIVED in behavior B
ratp: avoid unnecessary variable
have data.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 4 ++--
scripts/remote/ratp.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index d3c252047..c946bea1a 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -165,7 +165,7 @@ static
The reference says:
If SYN was set we assume that the other end crashed and has
attempted to open a new connection. We respond by sending a
legal reset:
Add this missing step.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 7 +++
1 file changed, 7 insertions
one.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 8 +---
scripts/remote/ratp.py | 16 +---
2 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index 846f8130c..321721ab7 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -721,9 +721,6
This is no code change in ratp_sn_expected(), it's just rewritten in
the same way as ratp_an_expected(), which follows the RFC916 approach.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ratp.c b/lib/ratp.c
.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index 22e83636f..0d384aa4e 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -619,21 +619,25 @@ static void ratp_behaviour_b(struct ratp_internal
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index 0d384aa4e..e9536499e 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -382,7 +382,7 @@ static int ratp_send_ack(struct ratp_internal *ri, struct
x27;t have it, they would
be filtered out in the F2 behavior, never arriving the I1 behavior,
which is where the received data is processed.
Signed-off-by: Aleksander Morgado
---
scripts/remote/ratp.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/remote/ratp.py b/scr
Instead of manually constructing an ACK, use the ratp_send_ack()
method, which already does that properly.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index 46a2b645c..c7f3f4171 100644
When a single data byte is sent, it is flagged as SO and the actual
data goes in the length byte within the header.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index c946bea1a..846f8130c
And also, use ratp_send_ack() instead of manually constructing an ACK
if no data is pending to be sent.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index c7f3f4171..e810a9e54 100644
--- a
desired, and also
hide the computation of the actual flag value within the macro, so the
previous example would now look like:
ratp_set_next_an(ratp_sn(hdr));
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 30 --
1 file changed, 16 insertions(+), 14 deletions
All ACKs without data must be built in the same way from the input
message:
The code was actually doing this instead:
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index
The reference says:
5.2.3. SYN-RECEIVED
...
Departures
- A CLOSE request is made by the user. Create a packet with
FIN set. Send it and go to the FIN-WAIT state.
Add this missing step.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 2
e and execute procedure I1 to process
any data which might be in this packet.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 8 +++-
scripts/remote/ratp.py | 14 ++
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
Hey,
For anyone interested, I ended up preparing a pair of C libraries and
a CLI tool that allow controlling barebox remotely using RATP, in the
same way as bbremote does it. The libraries would allow easy
integration on C applications that may want to remotely control
barebox.
Repositories:
ht
Hey,
On 19/06/17 08:46, Sascha Hauer wrote:
>> I went through the RFC916 and ended up preparing a set of fixes and
>> improvements for the RATP logic in barebox.
>> Let me know what you think.
> As far as I can say the patches look good. It's quite a while since I
> last looked at the RATP code,
This is just a cleanup; the variables are completely initialized later
on so the initial values are totally discarded anyway.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index 0d384aa4e
.
This fix isn't related to any barebox<->bbremote interaction issue,
because the case where both ends start an active connection doesn't
apply in this case.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
box command specific header).
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index c946bea1a..846f8130c 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -384,6 +384,7 @@ static int ratp_send_next_
ng the channel and restarts opening a complete
new connection.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/lib/ratp.c b/lib/ratp.c
index e9536499e..a8ac52c75 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -731,8 +731,15 @@ stat
e OR-ed
to the current value.
This fix isn't related to any failed barebox<->bbremote interaction
(it really is a very rare corner case).
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index
255, but the cat stdout
messages via RATP go byte by byte...). After that, the additional read
operations above offset 1024 end up timing out. I believe I'm going to have to
work with RATFS in the near future, so I'll likely spend some time looking at
those issues soon anyway.
Aleksander
ata.
This commit fixed a segfault in barebox when an unexpected SYN packet
was sent in the middle of a connection; barebox thought the packet had
data because the "data length" in the SYN packet was different than 0.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 4 ++--
one had RST set.
This commit fixes an infinite loop of messages sent and received
between both ends during the connection close procedure, found when
testing barebox against a third party ratp implementation.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 3 +++
1 file changed, 3 insertions
one.
These two fixes are a cleanup to follow the protocol correctly.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 8 +---
scripts/remote/ratp.py | 16 +---
2 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index 846f8130c
All ACKs without data must be built in the same way from the input
message:
The code was actually doing this instead:
This change fixes how the retransmissions are ACK-ed by the peer, and
would have affected the barebox<->bbremote interactions.
Signed-off-by: Aleksander M
This is no code change in ratp_sn_expected(), it's just rewritten in
the same way as ratp_an_expected(), which follows the RFC916 approach.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ratp.c b/lib/ratp.c
x27;t have it, they would
be filtered out in the F2 behavior, never arriving the I1 behavior,
which is where the received data is processed.
Signed-off-by: Aleksander Morgado
---
scripts/remote/ratp.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/remote/ratp.py b/scr
Instead of manually constructing an ACK, use the ratp_send_ack()
method, which already does that properly.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index 46a2b645c..c7f3f4171 100644
And also, use ratp_send_ack() instead of manually constructing an ACK
if no data is pending to be sent.
The current barebox implementation doesn't allow any queueing of data
until the connection is established, so this is probably not a case
that would get run anyway.
Signed-off-by: Aleks
desired, and also
hide the computation of the actual flag value within the macro, so the
previous example would now look like:
ratp_set_next_an(ratp_sn(hdr));
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 30 --
1 file changed, 16 insertions(+), 14 deletions
nection is
completely established, but it allows third party ratp implementations
to do that.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 8 +++-
scripts/remote/ratp.py | 14 ++
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/lib/ratp.c b/lib/r
close.
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 2 +-
scripts/remote/ratp.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index 46a82c69a..e7fbf640a 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -1689,7 +1689,7 @@ void
tp: Closed
ratp: Closed
ratp: Closed
ratp: Closed
...
Signed-off-by: Aleksander Morgado
---
lib/ratp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ratp.c b/lib/ratp.c
index e7fbf640a..4c5c748b4 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -1717,7 +1717
interfering with the countdown and menu just
when switching one of the consoles to RATP mode.
As a hint, this is what the standard console was printing due to this
issue when the RATP console was activated:
Hit m for menu or any other key to stop autoboot: [: missing `]'
Signed-off-by: Aleks
Don't reuse unrelated subparser variables for new command subparsers,
make each subparser have its own variable.
Just for consistency really, not a bugfix.
Signed-off-by: Aleksander Morgado
---
scripts/remote/main.py | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
()
(gdb) fr 1
#1 0x5556fd91 in of_get_machine_compatible () at
drivers/of/base.c:2380
2380 p = strchr(name, ',');
Signed-off-by: Aleksander Morgado
---
drivers/of/base.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/of/base.c b/drivers/of/ba
The 'ratp_command_ctx' seems to specify that this variable is only
used to process command operations, but it really is used in every
async operation (e.g. also in FS), so just rename it to a more generic
name for clarity.
Signed-off-by: Aleksander Morgado
---
common/r
The ratp_run_command() is really an implementation detail of the
barebox ratp 'command' operation support. Move it to the barebox
specific header and rename it with the correct prefix.
Signed-off-by: Aleksander Morgado
---
common/ratp.c | 2 +-
include/ratp.h| 2 --
include
This struct type is used in the RATP FS implementation, but was never
used as a list element anywhere.
Signed-off-by: Aleksander Morgado
---
include/ratp_bb.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/ratp_bb.h b/include/ratp_bb.h
index 70fd58a67..f485f7d8a 100644
--- a
Signed-off-by: Aleksander Morgado
---
common/ratp.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/common/ratp.c b/common/ratp.c
index 6db4df870..80863f81f 100644
--- a/common/ratp.c
+++ b/common/ratp.c
@@ -54,14 +54,8 @@ struct ratp_bb_command_return {
struct ratp_ctx
).
Signed-off-by: Aleksander Morgado
---
arch/arm/lib32/barebox.lds.S | 4 +
arch/arm/lib64/barebox.lds.S | 4 +
arch/blackfin/boards/ipe337/barebox.lds.S | 5 +-
arch/mips/lib/barebox.lds.S | 4 +
arch/nios2/cpu/barebox.lds.S | 5 +-
arch
t not sure how many other RATP API users are around except for
bbremote (ported along with the changes) and the libratp-barebox I'm
writing.
Aleksander Morgado (10):
ratp: define message type flags
ratp: port command operation to req/rsp/ind format
ratp: port ping operation to req/rs
Also, use xstrndup() instead of the custom xmemdup_add_zero() as we're
working with strings anyway.
Signed-off-by: Aleksander Morgado
---
commands/Makefile | 1 +
commands/ratp-getenv.c | 50 ++
common/ratp.c
box console.
We now consolidate this process using the request, response and
indication packet flags, and making them part of the same 'console'
packet type. In this specific message type, indications may be sent in
both directions.
Signed-off-by: Aleksander Morgado
---
common/ratp.c
e 'ping' packet type.
Signed-off-by: Aleksander Morgado
---
common/ratp.c| 12 ++--
scripts/remote/controller.py | 14 +++---
scripts/remote/messages.py | 18 ++
3 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/common/ratp.c b
.
* Indications: messages generated by one RATP endpoint for which
there is no need to generate an explicit response message.
These message types are identified by new command flags.
Signed-off-by: Aleksander Morgado
---
common/ratp.c | 4
scripts/remote/messages.py | 5 +
2
olidate this process using the request and response
packet flags, and making them part of the same 'getenv' packet type.
Signed-off-by: Aleksander Morgado
---
common/ratp.c| 10 ++
scripts/remote/controller.py | 13 -
scripts/remote/messages.py | 1
lt of the filesystem operation.
We now consolidate this process using the request and response
packet flags, and making them part of the same 'fs' packet type.
Signed-off-by: Aleksander Morgado
---
common/ratp.c| 9 ++---
scripts/remote/controller.py | 1
Signed-off-by: Aleksander Morgado
---
commands/Makefile| 1 +
commands/ratp-ping.c | 38 ++
common/ratp.c| 27 ---
3 files changed, 39 insertions(+), 27 deletions(-)
create mode 100644 commands/ratp-ping.c
diff --git a
meout 1000
Sending md request: read '/dev/pic_eeprom_rdu': 0x0107 (+5 bytes)
00:00:00:00:00
Signed-off-by: Aleksander Morgado
---
commands/md.c | 209 ++
commands/mw.c | 150 ++-
include/
Signed-off-by: Aleksander Morgado
---
commands/reset.c | 48 +---
1 file changed, 41 insertions(+), 7 deletions(-)
diff --git a/commands/reset.c b/commands/reset.c
index 6eac53262..7971b9f2f 100644
--- a/commands/reset.c
+++ b/commands/reset.c
>>
>> The first patches (1-5) break the current RATP API, by introducing
>> the concept of requests, responses and indications:
>> * Requests sent to one endpoint are expected to be replied with
>>a response by the peer endpoint.
>> * Indications are messages sent from one endpoint to another
>> +
>> +#define BAREBOX_RATP_CMD_START(_name)
>> \
>> +extern const struct ratp_command __barebox_cmd_##_name;
>> \
>
> You shouldn't use the same name as the existing barebox commands,
> otherwise there
On Tue, Feb 6, 2018 at 10:33 AM, Sascha Hauer wrote:
> On Fri, Feb 02, 2018 at 12:14:39PM +0100, Aleksander Morgado wrote:
>> Signed-off-by: Aleksander Morgado
>> ---
>> commands/Makefile| 1 +
>> commands/ratp-ping.c | 38 +
wip2/md-mw branch) in https://github.com/aleksander0m/libratp-barebox
Aleksander Morgado (8):
ratp: implement generic command support
ratp: moved logic to its own subdirectory
ratp: allow building without full console support
ratp: implement ping as a standard ratp command
ratp: implement g
-by: Aleksander Morgado
---
common/Makefile| 1 -
common/ratp/ratp.c | 7 +--
fs/Kconfig | 2 +-
lib/Kconfig| 2 +-
lib/readline.c | 2 +-
5 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/common/Makefile b/common/Makefile
index 90d5f19ec..8a0ce84e1 100644
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 common/ratp/ping.c
diff --git a
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 ++
common/ratp/Makefile | 1
introduced are unique).
Signed-off-by: Aleksander Morgado
---
arch/arm/lib32/barebox.lds.S | 4 ++
arch/arm/lib64/barebox.lds.S | 4 ++
arch/blackfin/boards/ipe337/barebox.lds.S | 5 +-
arch/mips/lib/barebox.lds.S | 4 ++
arch/nios2/cpu/barebox.lds.S
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 a/common/ratp/ratp.c b/common/ratp/ratp.c
Signed-off-by: Aleksander Morgado
---
common/ratp/Makefile | 1 +
common/ratp/reset.c | 55
include/ratp_bb.h| 1 +
3 files changed, 57 insertions(+)
create mode 100644 common/ratp/reset.c
diff --git a/common/ratp/Makefile b/common
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
meout 1000
Sending md request: read '/dev/pic_eeprom_rdu': 0x0107 (+5 bytes)
00:00:00:00:00
Signed-off-by: Aleksander Morgado
---
common/ratp/Makefile | 2 +
common/ratp/md.c | 202 +++
common/ratp/mw.c | 173
>> 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 messages used for these new operations are
>> structured in the same way:
>>
>> * An initial fixed-sized section includes the f
-barebox-cli tools.
Aleksander Morgado (9):
ratp: implement generic command support
ratp: moved logic to its own subdirectory
ratp: allow building without full console support
ratp: implement ping as a standard ratp command
ratp: implement getenv as a standard ratp command
ratp: use
introduced are unique).
Signed-off-by: Aleksander Morgado
---
arch/arm/lib32/barebox.lds.S | 4 ++
arch/arm/lib64/barebox.lds.S | 4 ++
arch/blackfin/boards/ipe337/barebox.lds.S | 5 +-
arch/mips/lib/barebox.lds.S | 4 ++
arch/nios2/cpu/barebox.lds.S
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 ++
common/ratp/Makefile | 1
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 common/ratp/ping.c
diff --git a
-by: Aleksander Morgado
---
common/Makefile| 1 -
common/ratp/ratp.c | 7 +--
fs/Kconfig | 2 +-
lib/Kconfig| 2 +-
lib/readline.c | 2 +-
5 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/common/Makefile b/common/Makefile
index bc9474a3a..a9abcd1bc 100644
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 +
scripts/remote/controller.py | 9 +---
scripts
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
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
--- a/Documentation/user/remote-control.rst
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 a/common/ratp/ratp.c b/common/ratp/ratp.c
107 00
5 bytes written
$ ./bbremote --port /dev/ttyUSB2 md /dev/pic_eeprom_rdu 0x107 5
000000
Signed-off-by: Aleksander Morgado
---
common/ratp/Makefile | 2 +
common/ratp/md.c | 202 +++
common/ratp/mw
Hey,
>
> This topic could be ignored. GPIO set/get value functions from
> barebox are working fine BUT gpioinfo function has some bug it reports
> unchanged status for gpios value.
>
Not that I got into much detail, but when I saw that same issue (I
have some WIP patches to manage GPIOs via R
Signed-off-by: Aleksander Morgado
---
scripts/remote/controller.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/remote/controller.py b/scripts/remote/controller.py
index 2ed834613..1a8390904 100644
--- a/scripts/remote/controller.py
+++ b/scripts/remote/controller.py
@@ -46,6
If no start register is explicitly given, receive data in master
receive mode.
Signed-off-by: Aleksander Morgado
---
commands/i2c.c | 21 +++--
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/commands/i2c.c b/commands/i2c.c
index 57dc092c2..2f7f820d4 100644
--- a
This patch series implements support for i2c and GPIO operations via RATP.
[PATCH 1/4] ratp: implement i2c read/write support
[PATCH 2/4] bbremote: implement i2c read/write support
[PATCH 3/4] ratp: implement support for GPIO commands
[PATCH 4/4] bbremote: implement support for GPIO operat
the message flags field. If this flag is unset, the start
register address is assumed 8-bit long.
If the message includes the I2C_FLAG_MASTER_MODE flag, the start
register field is ignored and a i2c master send/receive operation is
performed.
Signed-off-by: Aleksander Morgado
---
common/ratp
i2c-write 0x00 0x68 0x06A0 0x01
"8f30"
4 bytes written
$ ./scripts/bbremote --port /dev/ttyUSB2 i2c-read 0x00 0x68 0x06A0 0x01 4
8f300000
Signed-off-by: Aleksander Morgado
---
scripts/remote/controller.py | 24 ++
scripts/remote/main.py | 37
Introduce three new RATP commands that allow getting and setting GPIO
values as well as configuring the direction of the GPIO pins.
Signed-off-by: Aleksander Morgado
---
common/ratp/Makefile | 1 +
common/ratp/gpio.c | 148 +++
include/ratp_bb.h
When no explicit start register is given, the i2c message is emitted
in master send mode.
Signed-off-by: Aleksander Morgado
---
commands/i2c.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/commands/i2c.c b/commands/i2c.c
index f0d16af0c..57dc092c2 100644
--- a
The i2c master send support was already implemented in the i2c_write command,
but it was not properly documented. The first patch in the series addresses
that.
In the second patch, the i2c master receive mode is implemented in the i2c_read
command.
[PATCH 1/2] i2c_write: document master send
1 - 100 of 112 matches
Mail list logo