On Sun, 2012-12-02 at 20:15 +0100, Luka Perkov wrote: > Hi Sebastian, > > On Sun, Dec 02, 2012 at 03:36:22PM +0100, Sebastian Hesselbarth wrote: > > On Dove kwboot can also be used to boot an u-boot image into RAM. > > In contrast to Kirkwood, Dove does not support the UART boot mode > > sequence but requires the UART boot mode to be selected through > > strap pins. The SolidRun CuBox has a push button to allow uart > > boot mode but fails on the boot sequence sent by kwboot. > > > > This patch adds another cmdline option to allow to send a boot > > image without the boot sequence and adds support for Dove. > > > > Signed-off-by: Sebastian Hesselbarth <sebastian.hesselba...@gmail.com> > > --- > > Cc: u-boot@lists.denx.de > > Cc: Sebastian Hesselbarth <sebastian.hesselba...@gmail.com> > > Cc: Rabeeh Khoury <rab...@solid-run.com> > > Cc: Albert Aribaud <albert.u.b...@aribaud.net> > > Cc: Prafulla Wadaskar <prafu...@marvell.com> > > Cc: Andy Fleming <aflem...@gmail.com> > > Cc: Joe Hershberger <joe.hershber...@gmail.com> > > Cc: Daniel Stodden <daniel.stod...@gmail.com> > > Cc: Dieter Kiermaier <dk-arm-li...@gmx.de> > > --- > > tools/Makefile | 2 ++ > > tools/kwboot.c | 44 ++++++++++++++++++++++++++++++++++++++++---- > > 2 files changed, 42 insertions(+), 4 deletions(-) > > Please update the documentation too (doc/kwboot.1).
Second that. Hey Sebastian, since the protocol remains the same, and just doesn't take a boot message while polling, better to keep the bootmsg_call() intact and just make the option parsing flip the message type? The original BootROM had a couple more message, the tool just no immediate use for that. Eventual options to change message type wasn't unanticipated. Ok, no message at all was. Sketchy patch attached for your consideration. Beware, I can't test it right now. Also, while I've got nothing against adding a flag for that, I'm partly wondering whether this took a patch at all -- what's the target behavior if you keep shooting it with the original boot message? I would assume it would keep responding with NAKs. But doesn't? Cheers, Daniel
diff --git a/tools/kwboot.c b/tools/kwboot.c index e773f01..f598dc1 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -37,6 +37,10 @@ static unsigned char kwboot_msg_boot[] = { 0xBB, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 }; +static unsigned char kwboot_msg_none[] = { + 0x00 +}; + #define KWBOOT_MSG_REQ_DELAY 10 /* ms */ #define KWBOOT_MSG_RSP_TIMEO 50 /* ms */ @@ -268,17 +272,21 @@ kwboot_bootmsg(int tty, void *msg) int rc; char c; - kwboot_printv("Sending boot message. Please reboot the target..."); + kwboot_printv(msg != kwboot_msg_none + ? "Sending boot message. Please reboot the target..." + : "Sensing target. Please reboot target into UART mode..." ); do { rc = tcflush(tty, TCIOFLUSH); if (rc) break; - rc = kwboot_tty_send(tty, msg, 8); - if (rc) { - usleep(KWBOOT_MSG_REQ_DELAY * 1000); - continue; + if (msg != kwboot_msg_none) { + rc = kwboot_tty_send(tty, msg, 8); + if (rc) { + usleep(KWBOOT_MSG_REQ_DELAY * 1000); + continue; + } } rc = kwboot_tty_recv(tty, &c, 1, KWBOOT_MSG_RSP_TIMEO); @@ -646,6 +654,10 @@ main(int argc, char **argv) imgpath = optarg; break; + case 'n': + bootmsg = kwboot_msg_none; + break; + case 'p': patch = 1; break;
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot