All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Tony Dinh <mibodhi@gmail.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: kwboot: Marvell Dove UART booting
Date: Mon, 20 Mar 2023 21:33:05 +0100	[thread overview]
Message-ID: <20230320203305.53c4o7enoneaoatu@pali> (raw)
In-Reply-To: <CAJaLiFwCJgSq3ZMdEX+9yq2axaCa0bTMxp-8kUhKVXR2-vQm6g@mail.gmail.com>

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 <pali@kernel.org> 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 <Enter> 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 % [......................................................................]
> > > <snip>
> > >  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.
> 
> <BEGIN 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 % [......................................................................]
> <snip>
>  97 % [......................................................................]
>  99 % [......................................                                ]
> Done
> Finishing transfer
> [Type Ctrl-\ + c to quit]
> 
> <END log>
> 
> 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?

  reply	other threads:[~2023-03-20 20:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23  4:08 kwboot: Marvell Dove UART booting Tony Dinh
2021-12-26 21:41 ` Tony Dinh
2022-01-01 21:53   ` Pali Rohár
2022-01-01 22:54     ` Tony Dinh
2022-01-01 23:12       ` Pali Rohár
2022-01-02  0:00         ` Tony Dinh
2022-01-02  0:28           ` Pali Rohár
2022-02-13 16:10 ` Pali Rohár
2022-02-13 16:16 ` Pali Rohár
2022-02-13 19:41   ` Pali Rohár
2022-02-13 21:15     ` Marek Behún
2022-02-13 21:23       ` Pali Rohár
2022-02-13 21:33         ` Marek Behún
2022-02-13 21:55           ` Tony Dinh
2022-02-13 22:45   ` Tony Dinh
2022-02-13 22:48     ` Pali Rohár
2022-02-13 23:24       ` Tony Dinh
2022-02-13 23:42         ` Pali Rohár
2022-02-14  0:08           ` Tony Dinh
2022-02-14  0:21             ` Pali Rohár
2022-02-14  1:10               ` Tony Dinh
2022-02-14  9:58                 ` Pali Rohár
2022-02-14 22:00                   ` Tony Dinh
2022-02-15 19:11                     ` Pali Rohár
2022-02-15 22:11                       ` Tony Dinh
2022-02-15 23:02 ` Pali Rohár
2022-02-17  4:18   ` Tony Dinh
2023-03-20 20:33     ` Pali Rohár [this message]
2023-03-20 20:48       ` Tony Dinh
2023-03-20 21:06         ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230320203305.53c4o7enoneaoatu@pali \
    --to=pali@kernel.org \
    --cc=mibodhi@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.