From: Marcel Ziswiler <marcel@ziswiler.com>
To: "Stefan Roese" <sr@denx.de>, "Pali Rohár" <pali@kernel.org>,
"Marek Behún" <marek.behun@nic.cz>
Cc: u-boot@lists.denx.de, Konstantin Porotchkin <kostap@marvell.com>,
Robert Marko <robimarko@gmail.com>,
Sergey Sergeev <adron@yapic.net>
Subject: Re: [PATCH] tools/mrvl_uart.sh: Remove script
Date: Sat, 05 Feb 2022 00:43:28 +0100 [thread overview]
Message-ID: <8a13f2672d2484e2b2ea9e2ddf8398fc5e199612.camel@ziswiler.com> (raw)
In-Reply-To: <a70ac9b1-bf1f-0f83-420c-cbc3ad1e3624@denx.de>
Hi Stefan et. al
Putting Robi and Sergey on CC.
On Fri, 2022-02-04 at 06:46 +0100, Stefan Roese wrote:
> Added Kosta to Cc, as he is the author of this script.
>
> On 2/3/22 17:50, Pali Rohár wrote:
> > There are two tools for sending images over UART to Marvell SoCs: kwboot
> > and mrvl_uart.sh. kwboot received lot of new features and improvements in
> > last few months. There is no need to maintain two tools in U-Boot, so
> > remove old mrvl_uart.sh tool.
> >
> > Signed-off-by: Pali Rohár <pali@kernel.org>
> > ---
> > tools/mrvl_uart.sh | 119 ---------------------------------------------
> > 1 file changed, 119 deletions(-)
> > delete mode 100755 tools/mrvl_uart.sh
>
> Kosta, do you see any problems with removing this script? As you might
> have seen, Pali and Marek did some great work on kwboot in the mean
> time. Is there anything left in mrvl_uart.sh that kwboot can't handle?
Disclaimer: I am not really a Kirkwood developer or at least not yet (;-p).
Recently, we started playing with mainline U-Boot/Linux kernel as part of an effort to port OpenWrt to the
MikroTik RB5009UG [1]. It features an Armada 7040 which is a 64-bit Arm SoC while kwboot mentions 32-bit
platforms only. Anyway, so far I was able to boot it using the good oldé mrvl_uart.sh script as follows:
⬢[zim@toolbox ~]$ ~/u-boot/tools/mrvl_uart.sh /dev/ttyUSB3 ~/arm-trusted-
firmware/build/a70x0_rb5009/release/flash-image.bin
Using device connected on serial port "/dev/ttyUSB3"
Loading flash image file "/var/home/zim/arm-trusted-firmware/build/a70x0_rb5009/release/flash-image.bin"
Recovery will run at 115200 baud
========================================
Press the "Reset" button on the target board and the "Enter" key on the host keyboard simultaneously
Sending /var/home/zim/Sources/arm-trusted-firmware.git/build/a70x0_rb5009/release/flash-image.bin, 11377
blocks: Give your local XMODEM receive command now.
Bytes Sent:1456384 BPS:7871
Transfer complete
Trying this with kwboot instead I was not successful as of yet. Not sure whether I am just missing something or
support for booting 64-bit platforms would yet need to be added.
Suggestions welcome. Thanks!
> Thanks,
> Stefan
[1] https://forum.openwrt.org/t/add-support-for-mikrotik-rb5009ug
Cheers
Marcel
> > diff --git a/tools/mrvl_uart.sh b/tools/mrvl_uart.sh
> > deleted file mode 100755
> > index a46411fc99fb..000000000000
> > --- a/tools/mrvl_uart.sh
> > +++ /dev/null
> > @@ -1,119 +0,0 @@
> > -#!/bin/bash
> > -# SPDX-License-Identifier: GPL-2.0
> > -#
> > -######################################################
> > -# Copyright (C) 2016 Marvell International Ltd.
> > -#
> > -# https://spdx.org/licenses
> > -#
> > -# Author: Konstantin Porotchkin kostap@marvell.com
> > -#
> > -# Version 0.3
> > -#
> > -# UART recovery downloader for Armada SoCs
> > -#
> > -######################################################
> > -
> > -port=$1
> > -file=$2
> > -speed=$3
> > -
> > -pattern_repeat=1500
> > -default_baudrate=115200
> > -tmpfile=/tmp/xmodem.pattern
> > -tools=( dd stty sx minicom )
> > -
> > -case "$3" in
> > - 2)
> > - fast_baudrate=230400
> > - prefix="\xF2"
> > - ;;
> > - 4)
> > - fast_baudrate=460800
> > - prefix="\xF4"
> > - ;;
> > - 8)
> > - fast_baudrate=921600
> > - prefix="\xF8"
> > - ;;
> > - *)
> > - fast_baudrate=$default_baudrate
> > - prefix="\xBB"
> > -esac
> > -
> > -if [[ -z "$port" || -z "$file" ]]
> > -then
> > - echo -e "\nMarvell recovery image downloader for Armada SoC family."
> > - echo -e "Command syntax:"
> > - echo -e "\t$(basename $0) <port> <file> [2|4|8]"
> > - echo -e "\tport - serial port the target board is connected to"
> > - echo -e "\tfile - recovery boot image for target download"
> > - echo -e "\t2|4|8 - times to increase the default serial port speed by"
> > - echo -e "For example - load the image over ttyUSB0 @ 460800 baud:"
> > - echo -e "$(basename $0) /dev/ttyUSB0 /tmp/flash-image.bin 4\n"
> > - echo -e "=====WARNING====="
> > - echo -e "- The speed-up option is not available in SoC families prior to A8K+"
> > - echo -e "- This utility is not compatible with Armada 37xx SoC family\n"
> > -fi
> > -
> > -# Sanity checks
> > -if [ -c "$port" ]
> > -then
> > - echo -e "Using device connected on serial port \"$port\""
> > -else
> > - echo "Wrong serial port name!"
> > - exit 1
> > -fi
> > -
> > -if [ -f "$file" ]
> > -then
> > - echo -e "Loading flash image file \"$file\""
> > -else
> > - echo "File $file does not exist!"
> > - exit 1
> > -fi
> > -
> > -# Verify required tools installation
> > -for tool in ${tools[@]}
> > -do
> > - toolname=`which $tool`
> > - if [ -z "$toolname" ]
> > - then
> > - echo -e "Missing installation of \"$tool\" --> Exiting"
> > - exit 1
> > - fi
> > -done
> > -
> > -
> > -echo -e "Recovery will run at $fast_baudrate baud"
> > -echo -e "========================================"
> > -
> > -if [ -f "$tmpfile" ]
> > -then
> > - rm -f $tmpfile
> > -fi
> > -
> > -# Send the escape sequence to target board using default debug port speed
> > -stty -F $port raw ignbrk time 5 $default_baudrate
> > -counter=0
> > -while [ $counter -lt $pattern_repeat ]; do
> > - echo -n -e "$prefix\x11\x22\x33\x44\x55\x66\x77" >> $tmpfile
> > - let counter=counter+1
> > -done
> > -
> > -echo -en "Press the \"Reset\" button on the target board and "
> > -echo -en "the \"Enter\" key on the host keyboard simultaneously"
> > -read
> > -dd if=$tmpfile of=$port &>/dev/null
> > -
> > -# Speed up the binary image transfer
> > -stty -F $port raw ignbrk time 5 $fast_baudrate
> > -sx -vv $file > $port < $port
> > -#sx-at91 $port $file
> > -
> > -# Return the port to the default speed
> > -stty -F $port raw ignbrk time 5 $default_baudrate
> > -
> > -# Optional - fire up Minicom
> > -minicom -D $port -b $default_baudrate
> > -
>
> Viele Grüße,
> Stefan Roese
next prev parent reply other threads:[~2022-02-04 23:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 16:50 [PATCH] tools/mrvl_uart.sh: Remove script Pali Rohár
2022-02-03 17:05 ` Marek Behún
2022-02-04 5:46 ` Stefan Roese
2022-02-04 23:43 ` Marcel Ziswiler [this message]
2022-02-05 0:01 ` Marcel Ziswiler
2022-02-05 0:25 ` Pali Rohár
2022-02-05 0:40 ` Marcel Ziswiler
2022-02-05 0:54 ` Pali Rohár
2022-02-05 2:07 ` Marcel Ziswiler
2022-02-05 14:54 ` Pali Rohár
2022-02-07 7:20 ` Marcel Ziswiler
2022-02-07 9:02 ` Pali Rohár
2022-02-07 10:36 ` Robert Marko
2022-02-06 9:03 ` Stefan Roese
2022-02-07 7:26 ` Marcel Ziswiler
2022-02-07 8:19 ` Tony Dinh
2022-02-06 6:32 ` [EXT] " Kostya Porotchkin
2022-04-21 13:55 ` Stefan Roese
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=8a13f2672d2484e2b2ea9e2ddf8398fc5e199612.camel@ziswiler.com \
--to=marcel@ziswiler.com \
--cc=adron@yapic.net \
--cc=kostap@marvell.com \
--cc=marek.behun@nic.cz \
--cc=pali@kernel.org \
--cc=robimarko@gmail.com \
--cc=sr@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox