summaryrefslogtreecommitdiffstats
path: root/scripts/kwboot.c
Commit message (Collapse)AuthorAgeFilesLines
* kwboot: do a filetype check before sending the imageUwe Kleine-König2016-01-261-2/+70
| | | | | Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: kwboot: fix detection of timeoutUwe Kleine-König2014-11-171-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In function kwboot_xm_sendblock() the loop that implements retrying to send a boot block might be quit if kwboot_tty_send or kwboot_tty_recv return a failure. In this case the value of the variable c that is expected to hold the response byte is uninitialized and most likely still holds an ACK from the previous call to kwboot_xm_sendblock(). So the right thing to do is not to clobber rc if it's already != 0. The result of this patch in my current scenario is that kwboot dies with xmodem: Connection timed out when the SoC stops replying instead of continuing to try sending the remaining blocks which results in select() blocking for one second for each block. Fixes: 0535713bbfa0 ("scripts: add kwboot tool") Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> -- Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com> Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> I also tried to increase the timeout, but without success :-(. Will test a different USB-to-RS232 adapter ... Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts/kwboot: Remove redundant assignmentAlexander Shiyan2014-02-171-1/+0
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: kwboot: fix missing soh initializationSebastian Hesselbarth2013-11-181-0/+1
| | | | | | | | | Xmodem blocks should start with SOH but kwboot never sets the first block byte. This fixes kwboot's Xmodem block initialization and sets first block byte to SOH. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: kwboot: add support for Marvell DoveSebastian Hesselbarth2013-05-141-9/+22
| | | | | | | | | | | | | | | | Marvell Dove SoC also has an UART bootmode to upload payload after powerup. In contrast to Kirkwood and Armada 370/XP, Dove does not respond to a special sequence sent on UART0 but requires to be booted into UART bootmode by bootstraps. This is usually done by pressing a push button that will set bootstraps accordingly. This patch adds a new option, documentation and corresponding prompts to support the above requirements. Also a left-over option ('-p') is removed. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: add kwboot toolThomas Petazzoni2013-05-111-0/+717
This tool is used with Marvell EBU SoC to trigger the UART boot mode provided by the SoC BootROM, and push the bootloader image to the target using the Xmodem protocol. It has been taken from the U-Boot source code, with minor modifications to make it work with Armada 370/XP platforms. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>