From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B4AFC6FD1C for ; Mon, 20 Mar 2023 20:33:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A737885B86; Mon, 20 Mar 2023 21:33:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="l5YwnbUT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 008DB85B92; Mon, 20 Mar 2023 21:33:15 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 DCF5A85B70 for ; Mon, 20 Mar 2023 21:33:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EC439617EF; Mon, 20 Mar 2023 20:33:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08401C433D2; Mon, 20 Mar 2023 20:33:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679344389; bh=QcsGHPv/EgNbMk+6LSr65nYm2wmG/yqwzK9LMAT++Oo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=l5YwnbUT3p73qHmqX/p9ER7+WL2J7492GjaH8Hr0FuthXepEgmJC6H8KRMMN+OKnN Ehp9ueXuRNA8xeZ2fDfLwICIse4KIDOwAZwqxAt67RJkheINvm7KwVRGwcGvp+IL9J LcF0F24oTlIlH4C4x8FoKPZSoIgr/O+tD4weE4hfCPcUhaBr3roRBjTxLp8DA6kElr wOmn+4epwyJngClNZkyyqIZrGPUJG3Z1qHzej92lFW/KZv6M8ctQ612yrLVIxi0KLb O5VYw6OqhQyFKDNWf2kyuFu0FwtuSrmbXLwP5HlG4X3D5xgHnohdPCSbv8Mofov7xd hMFrt0jtHk7Sw== Received: by pali.im (Postfix) id 0C38360F; Mon, 20 Mar 2023 21:33:05 +0100 (CET) Date: Mon, 20 Mar 2023 21:33:05 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tony Dinh Cc: U-Boot Mailing List Subject: Re: kwboot: Marvell Dove UART booting Message-ID: <20230320203305.53c4o7enoneaoatu@pali> References: <20220215230205.54momowovora7f2i@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Hello! After longer time I have something new in this area. On Wednesday 16 February 2022 20:18:31 Tony Dinh wrote: > Hi Pali, > > Please see below. > > On Tue, Feb 15, 2022 at 3:02 PM Pali Rohár wrote: > > > > Hello! > > > > On Wednesday 22 December 2021 20:08:56 Tony Dinh wrote: > > > *** With jumper inserted, serial console connected, start serial console > > > > > > # picocom --b 115200 --f n --p n --d 8 /dev/ttyUSB0 > > > Terminal ready > > > > > > *** Hit here to get to the prompt and execute "x 0x0E" > > > > > > Bootstrap 2.33> > > > Bootstrap 2.33>x 0x0E > > > > > > *** No more input possible here, so Control-A-X to exit serial console > > > > > > Terminating... > > > Thanks for using picocom > > > > > > *** Run kwboot > > > > > > # kwboot -t -p -B 115200 /dev/ttyUSB0 -D /localdisk/mtd0.t5335z > > > Patching image boot signature to UART > > > Aligning image header to Xmodem block size > > > Waiting 2s and flushing tty > > > Sending boot image header (512 bytes)... > > > 25 % [.... ] > > > Done > > > Sending boot image data (607664 bytes)... > > > 0 % [......................................................................] > > > 1 % [......................................................................] > > > 2 % [......................................................................] > > > > > > 95 % [......................................................................] > > > 97 % [......................................................................] > > > 98 % [.......................................................... ] > > > Done > > > Finishing transfer > > > [Type Ctrl-\ + c to quit] > > > > > > *** Hung here! BootROM did not execute the image payload. > > > > I found this github repository https://github.com/rabeeh/u-boot with > > Dove version of U-Boot. In its README file is section about UART: > > https://github.com/rabeeh/u-boot/blob/master/README.MARVELL#L131-L138 > > It points to the file with "w" commands which needs to be executed in > > bootrom prior doing calling "x" command (which enters into x-modem): > > https://github.com/rabeeh/u-boot/blob/master/tools/doimage_dove/uart_init.txt > > > > Could you try to execute all those "w" commands in that other and then > > use kwboot if it helps? > > Unfortunately, it did not help. I ran the same procedure. Connected > the HP t5335z jumper to get to the BootROM debug prompt, and executed > the "w" commands. And then "x e" to enter UART booting mode. And then > execute kwboot. Here is the log. > > > > Bootstrap 2.33>w D00D0210 00000050 > >w D00D802C 01010000 > >w D00D802C 00010000 > >w d0800E40 00000100 > >w d0800E50 00120012 > >w d0800E40 00000101 > >w d0800E50 000d000d > >w d0800E40 00000102 > >w d0800E50 000a000a > >w d0800E40 00000103 > >w d0800E50 00080008 > >w d0800E40 00000200 > >w d0800E50 00120012 > >w d0800E40 00000201 > >w d0800E50 000d000d > >w d0800E40 00000202 > >w d0800E50 000a000a > >w d0800E40 00000203 > >w d0800E50 00080008 > > >x e > > Terminating... > Thanks for using picocom > > ./kwboot-2022/kwboot -t -B 115200 /dev/ttyUSB0 -D mtd0.t5335z > kwboot version 2022.04-rc2-00001-gab8903a24d-dirty > Patching image boot signature to UART > Sending boot image header (3072 bytes)... > 4 % [........................ ] > Done > Sending boot image data (605104 bytes)... > 0 % [......................................................................] > 1 % [......................................................................] > > 97 % [......................................................................] > 99 % [...................................... ] > Done > Finishing transfer > [Type Ctrl-\ + c to quit] > > > > Thanks, > Tony I looked at the mentioned rabeeh/u-boot repository again and there are two important bits of informations: 1) https://github.com/rabeeh/u-boot/blob/master/README.MARVELL#L136 README.MARVELL says that for UART booting should be used file named with _uart. 2) https://github.com/rabeeh/u-boot/blob/master/Makefile#L313 Build rules for _uart file and normal file are different. For example UART file has different doimage DDR input file (-R) and is _without_ doimage binary file (-B option). But it has _same_ main u-boot binary u-boot.bin So I think that for converting Dove SPI image to UART image are more steps needed. And I think you could do it by first unpacking all kwbimage parts via u-boot's tools/dumpimage tool and then packing all required parts via Marvell doimage tool from that rabeeh/u-boot github repository. Are you going to try it?