From patchwork Fri Jul 10 07:49:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1326538 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=sDTZPjrI; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B34vc11RHz9sRN for ; Fri, 10 Jul 2020 17:50:01 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 742BD81BD9; Fri, 10 Jul 2020 09:49:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1594367391; bh=zy07kTNQcBAdygN0TH9DAUUeIJyPMkeAH1GG93EOOoY=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=sDTZPjrIXaoZgl7xXLC/pCiXMp2dFMUMXGhFHHiyXU9n9bhyJbP0WHqQBdBiUtSee HzZ5wSmUSA2xWl1arey55MHYPfssXdxKo1lml130Y3G1VF1k7oUwoIOyOLqIZVxnKG jjb1Lfnc6VExjeg6vLeJwnQewlqhRIwwmwwvyNA6jTotlKBS6xG5E/Zdzn15FMJNai ePYGq6PG7uasvge9ehLklWfHgjUqhftFOL2zJQfPW7Nb1WLPCBdQgwk8gowwdGlwIc dep0kdEK/2j1AS8qQcsPWAdBL5v6n2KIV5zKQhBegGcf/JKwgNLIPcxleyEo7QLQPl OvVG/nNjfMA2g== Received: by phobos.denx.de (Postfix, from userid 109) id 60BBB81BEB; Fri, 10 Jul 2020 09:49:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B0B8781BC8 for ; Fri, 10 Jul 2020 09:49:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=lukma@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4B34vG1JSQz1rsMq; Fri, 10 Jul 2020 09:49:46 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4B34vG0k5Rz1qw6q; Fri, 10 Jul 2020 09:49:46 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id TO7nd9F5kDuZ; Fri, 10 Jul 2020 09:49:44 +0200 (CEST) X-Auth-Info: jZHlHT4QxcJ+XgoMKDCTBS6N4D6cKxP4yCD5d5b4+lY= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 10 Jul 2020 09:49:44 +0200 (CEST) From: Lukasz Majewski To: Stefano Babic , Peng Fan Cc: Lukasz Majewski , Tom Rini , u-boot@lists.denx.de Subject: [PATCH] arm: Add extra boot device (UART) to run Ymodem u-boot.img boot on XEA (imx28) Date: Fri, 10 Jul 2020 09:49:32 +0200 Message-Id: <20200710074932.19553-1-lukma@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This commit enables imx28 based XEA board's u-boot.sb (SPL) to download u-boot proper (u-boot.img) via Ymodem protocol. This is extremely useful in the recovery scenario where u-boot.sb is downloaded via uuu utility to SDRAM [*], and then one can upload u-boot proper via serial console to fully debrick the device. Note - debricking procedure of imx28 devices: - NXP's original USB based tools (like mxsldr or uuu) expect single u-boot.sb which is a relic of the old U-Boot (~2013) without SPL and U-Boot proper distinction. [*] On Host: ------------ cat << EOF > imx28_xea.lst uuu_version 1.3.0 SDPS: boot -f /srv/tftp/xea/u-boot.sb SDPU: done EOF Please start picocom: sudo picocom -b 115200 -s "sz -vv" /dev/ttyUSB1 sudo ./uuu/uuu -V imx28_xea.lst On the U-boot console one shall see: Trying to boot from UART CCC Then please press CTRL+A, S and type u-boot.img Signed-off-by: Lukasz Majewski Acked-by: Peng Fan --- board/liebherr/xea/xea.c | 1 + configs/imx28_xea_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c index 8159f3a2d9..4062c6fb82 100644 --- a/board/liebherr/xea/xea.c +++ b/board/liebherr/xea/xea.c @@ -116,6 +116,7 @@ void board_boot_order(u32 *spl_boot_list) { spl_boot_list[0] = BOOT_DEVICE_MMC1; spl_boot_list[1] = BOOT_DEVICE_SPI; + spl_boot_list[2] = BOOT_DEVICE_UART; } int spl_start_uboot(void) diff --git a/configs/imx28_xea_defconfig b/configs/imx28_xea_defconfig index b879de5042..38f3fa6871 100644 --- a/configs/imx28_xea_defconfig +++ b/configs/imx28_xea_defconfig @@ -36,6 +36,7 @@ CONFIG_SPL_MMC_TINY=y CONFIG_SPL_DM_SPI_FLASH=y CONFIG_SPL_OS_BOOT=y CONFIG_SPL_SPI_LOAD=y +CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_HUSH_PARSER=y CONFIG_CMD_SPL=y CONFIG_CMD_ASKENV=y