diff --git a/common/Makefile b/common/Makefile index bc9474a..a9abcd1 100644 --- a/common/Makefile +++ b/common/Makefile @@ -47,7 +47,6 @@ obj-$(CONFIG_SHELL_SIMPLE) += parser.o obj-$(CONFIG_STATE) += state/ obj-$(CONFIG_RATP) += ratp/ -obj-$(CONFIG_CONSOLE_RATP) += ratp/ obj-$(CONFIG_BOOTCHOOSER) += bootchooser.o obj-$(CONFIG_UIMAGE) += image.o uimage.o obj-$(CONFIG_FITIMAGE) += image-fit.o diff --git a/common/ratp/ratp.c b/common/ratp/ratp.c index b051fde..7c8a2f6 100644 --- a/common/ratp/ratp.c +++ b/common/ratp/ratp.c @@ -260,7 +260,7 @@ switch (type) { case BB_RATP_TYPE_COMMAND: - if (ratp_command) + if (!IS_ENABLED(CONFIG_CONSOLE_RATP) || ratp_command) return 0; ratp_command = xmemdup_add_zero(&rbb->data, dlen); @@ -274,6 +274,8 @@ break; case BB_RATP_TYPE_CONSOLEMSG: + if (!IS_ENABLED(CONFIG_CONSOLE_RATP)) + return 0; kfifo_put(ctx->console_recv_fifo, rbb->data, dlen); break; @@ -420,7 +422,8 @@ size_t len; void *buf; - ratp_queue_console_tx(ctx); + if (IS_ENABLED(CONFIG_CONSOLE_RATP)) + ratp_queue_console_tx(ctx); ret = ratp_poll(&ctx->ratp); if (ret == -EINTR) diff --git a/fs/Kconfig b/fs/Kconfig index 57f2676..3512000 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -94,7 +94,7 @@ config FS_RATP bool - depends on CONSOLE_RATP + depends on RATP prompt "RATP filesystem support" help This enables support for transferring files over RATP. A host can diff --git a/lib/Kconfig b/lib/Kconfig index dca93b8..4e9213f 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -95,7 +95,7 @@ config RATP select CRC16 - bool + bool "RATP protocol support" help Reliable Asynchronous Transfer Protocol (RATP) is a protocol for reliably transferring packets over serial links described in RFC916. This implementation diff --git a/lib/readline.c b/lib/readline.c index 1e380ab..904a776 100644 --- a/lib/readline.c +++ b/lib/readline.c @@ -202,7 +202,7 @@ while (1) { while (!tstc()) { poller_call(); - if (IS_ENABLED(CONFIG_RATP)) + if (IS_ENABLED(CONFIG_CONSOLE_RATP)) barebox_ratp_command_run(); }