Discussion:
[PATCH 1/2] scripts/kwboot: document -n option
Uwe Kleine-König
2017-06-30 09:51:44 UTC
Permalink
This was forgotten in the commit that added support for that option

Signed-off-by: Uwe Kleine-König <u.kleine-***@pengutronix.de>
---
scripts/kwboot.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/kwboot.c b/scripts/kwboot.c
index 4c6b19aa219e..db177ceb5f2e 100644
--- a/scripts/kwboot.c
+++ b/scripts/kwboot.c
@@ -716,7 +716,7 @@ static void
kwboot_usage(FILE *stream, char *progname)
{
fprintf(stream,
- "Usage: %s [-d | -b <image> | -D <image> ] [ -t ] [-B <baud> ] <TTY>\n",
+ "Usage: %s [-d | -b <image> [ -n <naks> ] | -D <image> ] [ -t ] [-B <baud> ] <TTY>\n",
progname);
fprintf(stream, "\n");
fprintf(stream,
@@ -724,6 +724,8 @@ kwboot_usage(FILE *stream, char *progname)
fprintf(stream,
" -D <image>: boot <image> without preamble (Dove)\n");
fprintf(stream, " -d: enter debug mode\n");
+ fprintf(stream,
+ " -n <naks>: wait for <naks> NAK before uploading image (default: 1)\n");
fprintf(stream, "\n");
fprintf(stream, " -t: mini terminal\n");
fprintf(stream, "\n");
--
2.11.0
Uwe Kleine-König
2017-06-30 09:51:45 UTC
Permalink
Signed-off-by: Uwe Kleine-König <u.kleine-***@pengutronix.de>
---
Documentation/boards/mvebu.rst | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/Documentation/boards/mvebu.rst b/Documentation/boards/mvebu.rst
index 8e5612283e7a..b28fd443b668 100644
--- a/Documentation/boards/mvebu.rst
+++ b/Documentation/boards/mvebu.rst
@@ -37,9 +37,15 @@ Booting from UART

The mvebu SoCs support booting from UART. For this there is a tool available in
barebox called ``kwboot``. Quite some mvebu boards are reset once more when
-they already started to read the first block of the image to boot. If you want
-to boot such a board, use the parameter ``-n 15`` for ``kwboot``. (The number
-might have to be adapted per board.)
+they already started to read the first block of the image to boot which
+obviously results in a failure to boot this image. If you want to boot such a
+board, use the parameter ``-n 15`` for ``kwboot`` to delay uploading the image
+and try to hit the right (i.e. second) window harder.
+(The number might have to be adapted per board. The semantic is that the magic
+string is sent until the 15th NAK is seen and only then the image is sent.) A
+typical commandline is:
+
+ kwboot -b barebox.img -n 15 -B 115200 -t /dev/ttyUSB

mvebu boards
------------
--
2.11.0
Sascha Hauer
2017-06-30 11:33:43 UTC
Permalink
Post by Uwe Kleine-König
This was forgotten in the commit that added support for that option
---
scripts/kwboot.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Applied, thanks

Sascha
Post by Uwe Kleine-König
diff --git a/scripts/kwboot.c b/scripts/kwboot.c
index 4c6b19aa219e..db177ceb5f2e 100644
--- a/scripts/kwboot.c
+++ b/scripts/kwboot.c
@@ -716,7 +716,7 @@ static void
kwboot_usage(FILE *stream, char *progname)
{
fprintf(stream,
- "Usage: %s [-d | -b <image> | -D <image> ] [ -t ] [-B <baud> ] <TTY>\n",
+ "Usage: %s [-d | -b <image> [ -n <naks> ] | -D <image> ] [ -t ] [-B <baud> ] <TTY>\n",
progname);
fprintf(stream, "\n");
fprintf(stream,
@@ -724,6 +724,8 @@ kwboot_usage(FILE *stream, char *progname)
fprintf(stream,
" -D <image>: boot <image> without preamble (Dove)\n");
fprintf(stream, " -d: enter debug mode\n");
+ fprintf(stream,
+ " -n <naks>: wait for <naks> NAK before uploading image (default: 1)\n");
fprintf(stream, "\n");
fprintf(stream, " -t: mini terminal\n");
fprintf(stream, "\n");
--
2.11.0
_______________________________________________
barebox mailing list
http://lists.infradead.org/mailman/listinfo/barebox
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Loading...