From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Fri, 4 Dec 2015 12:49:48 +0100 Subject: [U-Boot] [PATCH] imx_common: check for Serial Downloader in spl_boot_device In-Reply-To: References: <1449219732-5396-1-git-send-email-sbabic@denx.de> Message-ID: <56617DDC.2050100@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 Fabio, 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. 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 =====================================================================