[U-Boot] [PATCH] imx_common: check for Serial Downloader in spl_boot_device

Stefano Babic
2015-12-04T11:49:48Z

Hi Fabio,

On 04/12/2015 11:51, Fabio Estevam wrote:
> Hi Stefano,
>
> On Fri, Dec 4, 2015 at 7:02 AM, Stefano Babic <sbabic@denx.de> wrote:
>> Check for bmode before reading the boot device
>> to check if a serial downloader is started,
>> and returns UART if the serial downloader is set,
>> letting SPL to wait for an image if
>> CONFIG_SPL_YMODEM_SUPPORT is set.
>>
>> This allows to load again a SPL based board
>> with imx_usb_loader together with a tool
>> such as kermit.
>
> Just curious: what were the commands you usned with imx_usb_loader to
> load SPL + u-boot.img?
>

I did in this way:

sudo ../imx_usb_loader/imx_usb -v SPL
kermit kermit_uboot

And kermit_uboot (a kermit script) contains the lines:

set line /dev/ttyUSB1
set speed 115200
SET CARRIER-WATCH OFF
set flow-control none
set handshake none
set prefixing all
set file type bin
set protocol ymodem
send u-boot.img
c

The last "c" command tells kermit (from ckermit package in most distro)
to switch from command line mode to communication mode, and when the
script is finished, I get U-Boot prompt in the same shell. I tested on a
custom board booting from SPI (when internal mode is used), and changing
BOOT_MODE to serial, SPL starts automatically a download with y-modem.

Best regards,
Stefano

--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================