From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Fri, 4 Dec 2015 14:09:25 +0100 Subject: [U-Boot] [PATCH] imx_common: check for Serial Downloader in spl_boot_device In-Reply-To: <56617DDC.2050100@denx.de> References: <1449219732-5396-1-git-send-email-sbabic@denx.de> <56617DDC.2050100@denx.de> Message-ID: <56619085.4000509@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefano, On 04.12.2015 12:49, Stefano Babic wrote: > On 04/12/2015 11:51, Fabio Estevam wrote: >> Hi Stefano, >> >> On Fri, Dec 4, 2015 at 7:02 AM, Stefano Babic 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. Could you please add this description to some imx README in the U-Boot source tree? I'm pretty sure this could be helpful to others as well. Thanks, Stefan